{% if type == "substitution" %}
  {% if el.cancelled or el.cancelled_for_teachers %}
    {# Canceled lesson: no room #}
  {% elif el.room and el.lesson_period.room %}
    {# New and old room available #}
    <span class="tooltipped" data-position="bottom"
          data-tooltip="{{ el.lesson_period.room.name }} → {{ el.room.name }}"
          title="{{ el.lesson_period.room.name }} → {{ el.room.name }}">
      <a href="{% url "timetable" "room" el.lesson_period.room.pk %}">
          <s>{{ el.lesson_period.room.short_name }}</s>
      </a>
      →
      <a href="{% url "timetable" "room" el.room.pk %}">
          <strong>{{ el.room.short_name }}</strong>
      </a>
    </span>
  {% elif el.room and not el.lesson_period.room %}
    {# Only new room available #}
    {% include "chronos/partials/room.html" with room=el.room %}
  {% elif not el.room and not el.lesson_period.room %}
    {# Nothing to view #}
  {% else %}
    {# Only old room available #}
    {% include "chronos/partials/room.html" with room=el.lesson_period.room %}
  {% endif %}
{% elif type == "supervision_substitution" %}
  {% with supervision=el.supervision %}
    <span data-position="bottom" class="tooltipped"
          data-tooltip="{{ supervision.area.name }}" title="{{ supervision.area.name }}">
      {{ supervision.area.short_name }}
    </span>
  {% endwith %}
{% elif type == "extra_lesson" %}
  {% include "chronos/partials/room.html" with room=el.room %}
{% elif type == "event" %}
  {% for room in el.rooms.all %}
    {% include "chronos/partials/room.html" with room=room %}{% if not forloop.last %},{% endif %}
  {% endfor %}
{% endif %}
