Skip to content
Snippets Groups Projects
Verified Commit c1a73c49 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Fix some smart plan features

parent 913922fc
No related branches found
No related tags found
1 merge request!31Biscuit merge. Closes #53.
...@@ -7,15 +7,13 @@ ...@@ -7,15 +7,13 @@
{% for lesson_period in lessons %} {% for lesson_period in lessons %}
<div style=" <div style="
{# Display background color only if no badge exists and it is not the old room and there are no holidays #} {# 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.get_substitution.cancelled and not lesson_period.is_hol %}
{% if not lesson_period.is_old or type != 1 %} {% if not lesson_period.room != lesson_period.get_room or type != 1 %}
{% if not lesson_period.is_hol %} {% if lesson_period.lesson.subject.colour_fg %}
{% if lesson_period.lesson.subject.colour_fg %} color: {{ lesson_period.lesson.subject.colour_fg }};
color: {{ lesson_period.lesson.subject.colour_fg }}; {% endif %}
{% endif %} {% if lesson_period.lesson.subject.colour_bg %}
{% if lesson_period.lesson.subject.colour_bg %} background-color: {{ lesson_period.lesson.subject.colour_bg }};
background-color: {{ lesson_period.lesson.subject.colour_bg }};
{% endif %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %} {% endif %}
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
{# TODO: Support other cases#} {# TODO: Support other cases#}
<span class="badge new green hide-on-med-and-up">{% trans "Cancelled" %}</span> <span class="badge new green hide-on-med-and-up">{% trans "Cancelled" %}</span>
{% endif %} {% endif %}
<em>{{ sub.text|default:"" }}</em> {# <em>{{ sub.text|default:"" }}</em>#}
</td> </td>
<td class="hide-on-small-and-down"> <td class="hide-on-small-and-down">
{% if sub.cancelled %} {% if sub.cancelled %}
......
...@@ -101,6 +101,7 @@ def my_timetable( ...@@ -101,6 +101,7 @@ def my_timetable(
context["type"] = type_ context["type"] = type_
context["day"] = wanted_day context["day"] = wanted_day
context["periods"] = TimePeriod.get_times_dict() context["periods"] = TimePeriod.get_times_dict()
context["smart"] = True
context["url_prev"], context["url_next"] = get_prev_next_by_day( context["url_prev"], context["url_next"] = get_prev_next_by_day(
wanted_day, "my_timetable_by_date" wanted_day, "my_timetable_by_date"
......
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