{% load get_item %} Class Timetable
{{ school.school_name }}
Class Timetable
Academic Year: {{ academic_year }} Term: {{ term }} Class Stream: {{ class_stream }}
{% for weekday, label in weekdays %} {% endfor %} {% for slot in time_slots %} {% 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 %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endfor %} {% endfor %}
Time Slot{{ label }}
{{ slot }} {% if break_item or break_fallback %}
{{ break_item.name|default:break_fallback.name|default:"Break" }}
{% elif cell %}
{{ cell.subject }}
{{ cell.teacher|default:"-" }}
Room: {{ cell.classroom|default:"-" }}
{% else %}
Free
{% endif %}