aircox/aircox_cms/templates/aircox_cms/program_page.html

35 lines
1.1 KiB
HTML
Executable File

{% extends "aircox_cms/publication.html" %}
{# generic page to display programs #}
{% load i18n %}
{% load wagtailcore_tags %}
{# TODO message if program is no more active #}
{% block content_extras %}
<section class="schedule">
{% if page.program.active and page.program.schedule_set.count %}
<h2>{% trans "Schedule" %}</h2>
<ul>
{% for schedule in page.program.schedule_set.all %}
<li>
{% 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 trimmed %}
{{ day }} at {{ start }} until {{ end }}, <span class="info">{{ frequency }}</span>
{% endblocktrans %}
{% endwith %}
{% endwith %}
{% if schedule.initial %}
<span class="info">{% trans "Rerun" %}</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
<div class="warning">{% trans "This program is no longer active" %}</div>
{% endif %}
</section>
{% endblock %}