{% load i18n week_helpers %} {% now_datetime as now_dt %} {% if has_documentation or register_object.has_documentation %} {% include "alsijil/partials/lesson_status_icon.html" with text=_("Data complete") icon="mdi:check-circle-outline" color="green" %} {% elif not register_object.period %} {% if week %} {% period_to_time_start week register_object.raw_period_from_on_day as time_start %} {% period_to_time_end week register_object.raw_period_to_on_day as time_end %} {% else %} {% period_to_time_start register_object.date_start register_object.period_from as time_start %} {% period_to_time_end register_object.date_end register_object.period_to as time_end %} {% endif %} {% if now_dt > time_end %} {% include "alsijil/partials/lesson_status_icon.html" with text=_("Missing data") icon="mdi:alert-outline" color="red" %} {% elif now_dt > time_start and now_dt < time_end %} {% include "alsijil/partials/lesson_status_icon.html" with text=_("Pending") icon="mdi:dots-horizontal" color="orange" %} {% else %} {% include "alsijil/partials/lesson_status_icon.html" with text=_("Event") icon="mdi:calendar" color="purple" %} {% endif %} {% else %} {% period_to_time_start week register_object.period as time_start %} {% period_to_time_end week register_object.period as time_end %} {% if substitution.cancelled or register_object.get_substitution.cancelled %} {% include "alsijil/partials/lesson_status_icon.html" with text=_("Lesson cancelled") icon="mdi:close" color="red" %} {% elif now_dt > time_end %} {% include "alsijil/partials/lesson_status_icon.html" with text=_("Missing data") icon="mdi:alert-outline" color="red" %} {% elif now_dt > time_start and now_dt < time_end %} {% include "alsijil/partials/lesson_status_icon.html" with text=_("Pending") icon="mdi:dots-horizontal" color="orange" %} {% elif substitution or register_object.get_substitution %} {% include "alsijil/partials/lesson_status_icon.html" with text=_("Substitution") icon="mdi:update" color="orange" %} {% endif %} {% endif %}