{% if sub.cancelled or sub.cancelled_for_teachers %} {# 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 %}