{% if type == "substitution" %} {% if el.cancelled and el.lesson_period.lesson.teachers.all %} {% include "chronos/partials/teachers.html" with teachers=el.lesson_period.lesson.teachers.all %} {% elif el.teachers.all and el.lesson_period.lesson.teachers.all %} {% include "chronos/partials/teachers.html" with teachers=el.lesson_period.lesson.teachers.all %} {% include "chronos/partials/teachers.html" with teachers=el.teachers.all %} {% elif el.teachers.all and not el.lesson_period.lesson.teachers.all %} {% include "chronos/partials/teachers.html" with teachers=el.teachers.all %} {% elif el.lesson_period.lesson.teachers.all %} {% include "chronos/partials/teachers.html" with teachers=el.lesson_period.lesson.teachers.all %} {% endif %} {% elif type == "supervision_substitution" %} {% include "chronos/partials/teachers.html" with teachers=el.supervision.teachers %} {% include "chronos/partials/teachers.html" with teachers=el.teachers %} {% elif type == "extra_lesson" or type == "event" %} {% include "chronos/partials/teachers.html" with teachers=el.teachers.all %} {% endif %}