{# -*- engine:django -*- #}

{% extends 'core/base.html' %}

{% load i18n static %}

{% block extra_head %}
  <link rel="stylesheet" href="{% static 'css/chronos/timetable.css' %}">
{% endblock %}

{% block browser_title %}{% blocktrans %}All timetables{% endblocktrans %}{% endblock %}
{% block page_title %}{% trans "All timetables" %}{% endblock %}

{% block content %}
  <div class="row">
    <div class="col s12 m4">
      <h2>{% trans "Teachers" %}</h2>

      {% for teacher in teachers %}
        <a class="waves-effect waves-light btn btn-timetable-quicklaunch primary"
           href="{% url 'timetable' 'teacher' teacher.pk %}">
          {{ teacher.short_name }}
        </a>
      {% empty %}
        {% trans 'No teachers timetables available.' as message %}
        {% include 'components/msgbox.html' with status='info' icon='mdi:alert-outline' msg=message %}
      {% endfor %}
    </div>

    <div class="col s12 m4">
      <h2>{% trans "Groups" %}</h2>

      {% for class in classes %}
        <a class="waves-effect waves-light btn btn-timetable-quicklaunch primary"
           href="{% url 'timetable' 'group' class.pk %}">
          {{ class.short_name }}
        </a>
      {% empty %}
        {% trans 'No group timetables available.' as message %}
        {% include 'components/msgbox.html' with status='info' icon='mdi:alert-outline' msg=message %}
      {% endfor %}
    </div>

    <div class="col s12 m4">
      <h2>{% trans "Rooms" %}</h2>

      {% for room in rooms %}
        <a class="waves-effect waves-light btn btn-timetable-quicklaunch primary"
           href="{% url 'timetable' 'room' room.pk %}">
          {{ room.short_name }}
        </a>
      {% empty %}
        {% trans 'No room timetables available.' as message %}
        {% include 'components/msgbox.html' with status='info' icon='mdi:alert-outline' msg=message %}
      {% endfor %}
    </div>
  </div>

{% endblock %}
