{% if type == "substitution" %}
{% if el.cancelled or el.cancelled_for_teachers %}
{# Cancelled lesson: no room #}
{% elif el.room and el.lesson_period.room %}
{# New and old room available #}
{{ el.lesson_period.room.short_name }}
→
{{ el.room.short_name }}
{% 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 %}
{{ supervision.area.short_name }}
{% 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 %}