From 504192e5f225f014e1eecd6e08b66bb6f7f2746c Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Mon, 10 Apr 2023 15:00:25 +0200 Subject: [PATCH] [TASK] improve functionality cox_needed filter --- templates/index.html.tera | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/templates/index.html.tera b/templates/index.html.tera index 6ef5c9c..b8cda64 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -29,7 +29,15 @@ {% for day in days %} {% set amount_trips = day.planned_events | length + day.trips | length %} -
+ {% set_global day_cox_needed = false %} + {% if day.planned_events | length > 0 %} + {% for planned_event in day.planned_events %} + {% if planned_event.cox_needed %} + {% set_global day_cox_needed = true %} + {% endif %} + {% endfor %} + {% endif %} +

{{ day.day| date(format="%d.%m.%Y") }} {{ day.day | date(format="%A", locale="de_AT") }} @@ -39,7 +47,7 @@ {% if day.planned_events | length > 0 %}
{% for planned_event in day.planned_events %} -
+
{{ planned_event.planned_starting_time }} Uhr