Skip to content
Snippets Groups Projects

Resolve "Events should lead to the cancellation of lessons"

3 files
+ 50
20
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -5,7 +5,7 @@
{# Display background color only if lesson is not cancelled and it is not the old room #}
{% if not smart %}
{% include "chronos/partials/subject_colour.html" with subject=lesson_period.lesson.subject %}
{% elif not sub.cancelled and not lesson_period.get_substitution.cancelled_for_teachers %}
{% elif not sub.cancelled and not lesson_period.get_substitution.cancelled_for_teachers and not lesson_period.replaced_by_event %}
{% if not type.value == "room" or lesson_period.room == lesson_period.get_room or lesson_period.get_room == el %}
{% if sub and sub.subject %}
{% include "chronos/partials/subject_colour.html" with subject=sub.subject %}
@@ -17,10 +17,15 @@
{% endwith %}
"
{# Add CSS class for sub when it's a sub #}
class="{% if lesson_period.get_substitution and smart %}lesson-with-sub{% endif %}"
class="{% if smart %}{% if lesson_period.get_substitution or lesson_period.replaced_by_event %}lesson-with-sub{% endif %}{% endif %}"
>
<p>
{% if lesson_period.get_substitution and smart %}
{% if lesson_period.replaced_by_event and smart %}
{% include "chronos/partials/groups.html" with groups=lesson_period.lesson.groups.all %}
{% include "chronos/partials/subject.html" with subject=lesson_period.lesson.subject %}
<br/>
<span class="badge new green">{% trans "Cancelled due to an event" %}</span>
{% elif lesson_period.get_substitution and smart %}
{% with sub=lesson_period.get_substitution %}
{# SUBSTITUTION #}
{% if type.value == "room" and lesson_period.room != lesson_period.get_room and lesson_period.get_room != el %}
Loading