{% load i18n %}

{% if type == "substitution" %}
  {% if not el.lesson_period.lesson.subject and not el.subject %}
  {% elif el.cancelled or el.cancelled_for_teachers %}
    <span data-position="bottom" class="tooltipped" data-tooltip="{{ el.lesson_period.lesson.subject.name }}">
    <s>{{ el.lesson_period.lesson.subject.short_name }}</s>
  </span>
  {% elif el.subject and el.lesson_period.lesson.subject %}
    <span data-position="bottom" class="tooltipped" data-tooltip="{{ el.lesson_period.lesson.subject.name }}">
    <s>{{ el.lesson_period.lesson.subject.short_name }}</s>
  </span>
    →
    <span data-position="bottom" class="tooltipped" data-tooltip="{{ el.subject.name }}">
    <strong>{{ el.subject.short_name }}</strong>
  </span>
  {% elif el.subject and not el.lesson_period.lesson.subject %}
    {% include "chronos/partials/subject.html" with subject=el.subject %}
  {% else %}
    {% include "chronos/partials/subject.html" with subject=el.lesson_period.lesson.subject %}
  {% endif %}
{% elif type == "supervision_substitution" %}
  {% trans "Supervision" %}
{% elif type == "extra_lesson" %}
  {% include "chronos/partials/subject.html" with subject=el.subject %}
{% elif type == "event" %}
  {% trans "Event" %}
{% endif %}
