{% if not sub.is_event %}
{% if sub.sub.type == 3 %}
{# Supervisement #}
{{ sub.sub.corridor.name }}
{% elif sub.sub.type == 1 or sub.sub.type == 2 %}
{# Canceled lesson: no room #}
{% elif sub.room and sub.lesson_period.room %}
{# New and old room available #}
{{ sub.lesson_period.room.short_name }}
→
{{ sub.room.short_name }}
{% elif sub.room and not sub.lesson_period.room %}
{# Only new room available #}
{{ sub.room.short_name }}
{% elif not sub.room and not sub.lesson_period.room %}
{# Nothing to view #}
{% else %}
{# Only old room available #}
{{ sub.lesson_period.room.short_name }}
{% endif %}
{% else %}
{% for room in sub.rooms %}
{{ room.short_name }}{% if not forloop.last %},{% endif %}
{% endfor %}
{% endif %}