{% extends "wafer/base.html" %} {% load i18n %} {% block content %}

{% trans "Schedule" %}

{% if not schedule_days %} {# Schedule is incomplete / invalid, so show nothing #} {% blocktrans %}

The final schedule has not been published yet.

{% endblocktrans %} {% else %} {% for schedule_day in schedule_days %} {# We assume that the admin has created a valid timetable #} {% for venue in schedule_day.venues %} {% endfor %} {% for row in schedule_day.rows %} {% for item in row.get_sorted_items %} {% if item.item == "unavailable" %} {# Venue isn't available, so we add an empty table element with the 'unavailable' class #} {% else %} {# Add item details #} {% endif %} {% endfor %} {% endfor %}
{{ schedule_day.day.date|date:"l (d b)" }}
{% trans "Time" %}{{ venue.name }}
{{ row.slot.get_start_time|time:"H:i" }} - {{ row.slot.end_time|time:"H:i" }} {% include "wafer.schedule/schedule_item.html" with item=item.item %}
{% endfor %} {% endif %}
{% endblock %}