diff --git a/aleksis/apps/chronos/templates/chronos/partials/lesson.html b/aleksis/apps/chronos/templates/chronos/partials/lesson.html index b6b2ae962b5b89accb13bba31924b9cef2071431..8dc4f9fb2f264cfe188241502d298cf3e095ccf3 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/lesson.html +++ b/aleksis/apps/chronos/templates/chronos/partials/lesson.html @@ -7,15 +7,13 @@ {% for lesson_period in lessons %} <div style=" {# Display background color only if no badge exists and it is not the old room and there are no holidays #} - {% if not lesson_period.substitution.table.badge %} - {% if not lesson_period.is_old or type != 1 %} - {% if not lesson_period.is_hol %} - {% if lesson_period.lesson.subject.colour_fg %} - color: {{ lesson_period.lesson.subject.colour_fg }}; - {% endif %} - {% if lesson_period.lesson.subject.colour_bg %} - background-color: {{ lesson_period.lesson.subject.colour_bg }}; - {% endif %} + {% if not lesson_period.get_substitution.cancelled and not lesson_period.is_hol %} + {% if not lesson_period.room != lesson_period.get_room or type != 1 %} + {% if lesson_period.lesson.subject.colour_fg %} + color: {{ lesson_period.lesson.subject.colour_fg }}; + {% endif %} + {% if lesson_period.lesson.subject.colour_bg %} + background-color: {{ lesson_period.lesson.subject.colour_bg }}; {% endif %} {% endif %} {% endif %} diff --git a/aleksis/apps/chronos/templates/chronos/substitutions.html b/aleksis/apps/chronos/templates/chronos/substitutions.html index a195696d52d59fdac4f67bb869db9c0fbcf13f72..e2dae3c19fc9a1261c5ee6835944d1678c4fef93 100644 --- a/aleksis/apps/chronos/templates/chronos/substitutions.html +++ b/aleksis/apps/chronos/templates/chronos/substitutions.html @@ -100,7 +100,7 @@ {# TODO: Support other cases#} <span class="badge new green hide-on-med-and-up">{% trans "Cancelled" %}</span> {% endif %} - <em>{{ sub.text|default:"" }}</em> +{# <em>{{ sub.text|default:"" }}</em>#} </td> <td class="hide-on-small-and-down"> {% if sub.cancelled %} diff --git a/aleksis/apps/chronos/views.py b/aleksis/apps/chronos/views.py index fd26e5e6a18f6394be23af42e95302dfba94e550..90cac9127e56297b181583de6d8b0572024b59b6 100644 --- a/aleksis/apps/chronos/views.py +++ b/aleksis/apps/chronos/views.py @@ -101,6 +101,7 @@ def my_timetable( context["type"] = type_ context["day"] = wanted_day context["periods"] = TimePeriod.get_times_dict() + context["smart"] = True context["url_prev"], context["url_next"] = get_prev_next_by_day( wanted_day, "my_timetable_by_date"