<div class="lesson-with-sub"
     style="{% include "chronos/partials/subject_colour.html" with subject=extra_lesson.subject %}">
  <p>
    {# Teacher or room > Display groups #}
    {% if type.value == "teacher" or type.value == "room" %}
      {% include "chronos/partials/groups.html" with groups=extra_lesson.groups.all %}
    {% endif %}

    {# Class or room > Display teachers #}
    {% if type.value == "room" or type.value == "group" %}
      {% include "chronos/partials/teachers.html" with teachers=extra_lesson.teachers.all %}
    {% endif %}

    {% include "chronos/partials/subject.html" with subject=extra_lesson.subject %}

    {# Teacher or class > Display rooms #}
    {% if type.value == "teacher" or type.value == "group" %}
      {% include "chronos/partials/room.html" with room=extra_lesson.room %}
    {% endif %}

    {% if extra_lesson.comment %}
      <br/>
      <small>
        <em>{{ extra_lesson.comment }}</em>
      </small>
    {% endif %}
  </p>
</div>
