{% load get_item %}
| Time Slot | {% for weekday, label in weekdays %}{{ label }} | {% endfor %}
|---|---|
| {{ slot }} | {% for weekday, _ in weekdays %} {% with cell=timetable_data|get_item:weekday|get_item:slot.id %} {% with break_key=weekday|stringformat:"s"|add:"_"|add:slot.id|stringformat:"s" %} {% with break_item=break_map|get_item:break_key %} {% with break_fallback=break_any_slots|get_item:slot.id %}
{% if break_item or break_fallback %}
{{ break_item.name|default:break_fallback.name|default:"Break" }}
{% elif cell %}
{{ cell.subject }}
{% else %}
{{ cell.teacher|default:"-" }}
Room: {{ cell.classroom|default:"-" }}
Free
{% endif %}
|
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endfor %}