Skip to content
Snippets Groups Projects
Verified Commit e6a5fa82 authored by Lloyd Meins's avatar Lloyd Meins :thought_balloon:
Browse files

Keep colour in regular timetable and change colour on substitutions

parent 56388f38
No related branches found
No related tags found
1 merge request!153Resolve "Check generation of regular timetable"
Pipeline #10852 canceled
{% load i18n %}
<div style="
{% with sub=lesson_period.get_substitution %}
{# Display background color only if lesson is not cancelled and it is not the old room #}
{% if not lesson_period.get_substitution.cancelled and not lesson_period.get_substitution.cancelled_for_teachers %}
{% 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 %}
{% if not type.value == "room" or lesson_period.room == lesson_period.get_room or lesson_period.get_room == el %}
{% include "chronos/partials/subject_colour.html" with subject=lesson_period.lesson.subject %}
{% if sub and sub.subject %}
{% include "chronos/partials/subject_colour.html" with subject=sub.subject %}
{% else %}
{% include "chronos/partials/subject_colour.html" with subject=lesson_period.lesson.subject %}
{% endif %}
{% endif %}
{% endif %}
{% endwith %}
"
{# Add CSS class for sub when it's a sub #}
class="{% if lesson_period.get_substitution and smart %}lesson-with-sub{% endif %}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment