From 204195c0081262db271f8284d9ccea9761123ed6 Mon Sep 17 00:00:00 2001 From: lloydmeins <github@lloydmeins.de> Date: Fri, 25 Sep 2020 16:50:52 +0200 Subject: [PATCH] Fix view of regular plans --- aleksis/apps/chronos/templates/chronos/partials/elements.html | 4 ++-- aleksis/apps/chronos/templates/chronos/partials/lesson.html | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/aleksis/apps/chronos/templates/chronos/partials/elements.html b/aleksis/apps/chronos/templates/chronos/partials/elements.html index 825a3291..d7c4fb17 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/elements.html +++ b/aleksis/apps/chronos/templates/chronos/partials/elements.html @@ -3,9 +3,9 @@ {% for element in elements %} {% if element.label_ == "lesson_period" %} {% include "chronos/partials/lesson.html" with lesson_period=element %} - {% elif element.label_ == "extra_lesson" %} + {% elif element.label_ == "extra_lesson" and smart %} {% include "chronos/partials/extra_lesson.html" with extra_lesson=element %} - {% elif element.label_ == "event" %} + {% elif element.label_ == "event" and smart %} {% include "chronos/partials/event.html" with event=element %} {% endif %} {% endfor %} diff --git a/aleksis/apps/chronos/templates/chronos/partials/lesson.html b/aleksis/apps/chronos/templates/chronos/partials/lesson.html index 70ef9e72..5b7ceb6c 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/lesson.html +++ b/aleksis/apps/chronos/templates/chronos/partials/lesson.html @@ -12,9 +12,7 @@ class="{% if lesson_period.get_substitution and smart %}lesson-with-sub{% endif %}" > <p> - {% if lesson_period.is_hol and smart %} - {# Do nothing #} - {% elif lesson_period.get_substitution and smart %} + {% if 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 %} -- GitLab