{# -*- engine:django -*- #} {% extends 'core/base.html' %} {% load data_helpers rules static i18n %} {% block extra_head %} {% endblock %} {% block browser_title %}{% blocktrans %}Timetable{% endblocktrans %}{% endblock %} {% block no_page_title %}{% endblock %} {% block content %} {% if smart %} {{ week_select|json_script:"week_select" }} {% endif %}

{% trans "Timetable" %} {{ el }}

{# Show class teacher and deputy class teacher #} {% if type.value == "group" and el.owners.all %}

{% trans "Group teachers:" %} {% for teacher in el.owners.all %} {{ teacher.short_name }}{% if not forloop.last %},{% endif %} {% endfor %}

{% endif %}
{% if smart %} {# Show if smart #} {# Toggle button to regular and smart plan badge #}
{% trans "SMART PLAN" %} {% trans "Show regular timetable" %} {% has_perm "alsijil.view_week_rule" user as can_view_week_view %} {% if is_alsijil_installed and can_view_week_view %} {% trans "View class register of this week" %} {% endif %}
{# Week select #} {% include "chronos/partials/week_select.html" with wanted_week=week %} {% else %} {# Show if regular #} {% trans "Show SMART PLAN" %} {% has_perm "alsijil.view_week_rule" user as can_view_week_view %} {% if is_alsijil_installed and can_view_week_view %} {% trans "View class register of this week" %} {% endif %} {% endif %}
{% include "core/partials/announcements.html" with announcements=announcements show_interval=1 %} {# show full timetable on tablets, laptops and pcs #}
{% include "chronos/partials/week_timetable.html" %}
{# show 5 seperate ones on mobiles #}
{% for weekday in weekdays %}
{{ weekday.name }} {% if smart %} {{ weekday.date }} {% if weekday.holiday %}
{% include "chronos/partials/holiday.html" with holiday=weekday.holiday %} {% endif %} {% endif %}
{% for row in timetable %}
{% include "chronos/partials/period_time.html" with period=row.period periods=periods %}
{% for col in row.cols %} {% if forloop.counter0 == weekday.key %}
{# A lesson #} {% if row.type == "period" %} {% include "chronos/partials/elements.html" with elements=col %} {% else %} {% include "chronos/partials/supervision.html" with supervision=col %} {% endif %}
{% endif %} {% endfor %}
{% endfor %} {% endfor %}
{% endblock %}