{% extends "cms/publication.html" %}
{# generic page to display programs #}
{% load i18n %}
{% load wagtailcore_tags %}
{# TODO message if program is no more active #}
{% block content_extras %}
{% if page.program.active %}
{% trans "Schedule" %}
{% for schedule in page.program.schedule_set.all %}
{% with frequency=schedule.get_frequency_display day=schedule.date|date:'l' %}
{% with start=schedule.date|date:"H:i" end=schedule.end|date:"H:i" %}
{% blocktrans %}
{{ day }} {{ start }} until {{ end }}, {{ frequency }}
{% endblocktrans %}
{% endwith %}
{% endwith %}
{% if schedule.initial %}
{% trans "Rerun" %}
{% endif %}
{% endfor %}
{% else %}
{% trans "This program is no longer active" %}
{% endif %}
{% endblock %}
{% block page_nav_extras %}
{% if page.program.active %}
{% with object_list=page.next_diffs %}
{% if object_list %}
{% trans "Next Diffusions" %}
{% include "cms/list.html" %}
{% endif %}
{% endwith %}
{% endif %}{# program.active #}
{% with object_list=page.prev_diffs %}
{% if object_list %}