From 5d0bfddadfa33ec467e8bf59bb93e5d72d04079f Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Thu, 8 Jun 2023 11:25:08 +0200 Subject: [PATCH] [BUGFIX] sorting trips & events --- templates/dynamics/sidebar.html.tera | 2 +- templates/index.html.tera | 35 ++++++++++++++-------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/templates/dynamics/sidebar.html.tera b/templates/dynamics/sidebar.html.tera index ce2341a..1720f1b 100644 --- a/templates/dynamics/sidebar.html.tera +++ b/templates/dynamics/sidebar.html.tera @@ -10,7 +10,7 @@ {% include "includes/plus-icon" %} -
+
Formular wird ersetzt
diff --git a/templates/index.html.tera b/templates/index.html.tera index bb0a145..55473ba 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -22,23 +22,23 @@ {% endif %} {% endfor %} {% endif %} -
+
-

{{ day.day| date(format="%d.%m.%Y") }} +

{{ day.day| date(format="%d.%m.%Y") }} {{ day.day | date(format="%A", locale="de_AT") }}

{% if day.planned_events | length > 0 or day.trips | length > 0 %} -
+
{# --- START Events --- #} {% if day.planned_events | length > 0 %} {% for planned_event in day.planned_events | sort(attribute="planned_starting_time") %} {% set amount_cur_cox = planned_event.cox | length %} {% set amount_cox_missing = planned_event.planned_amount_cox - amount_cur_cox %} -
+
-
+
{{ planned_event.planned_starting_time }} Uhr {% if planned_event.trip_type %} @@ -126,10 +126,10 @@

Ausfahrt bearbeiten

- - + + {{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=planned_event.max_people, min='0') }} - {{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', value=planned_event.planned_amount_cox, required=true, min='0') }} + {{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', value=planned_event.planned_amount_cox, required=true, min='0') }} {{ macros::input(label='Anmerkungen', name='notes', type='input', value=planned_event.notes) }} @@ -156,10 +156,10 @@ {# --- START Trips --- #} {% if day.trips | length > 0 %} - {% for trip in day.trips %} -
+ {% for trip in day.trips | sort(attribute="planned_starting_time") %} +
-
+
{% if trip.max_people == 0 %} ⚠ {{ trip.planned_starting_time }} Uhr {% if trip.trip_type %} @@ -201,10 +201,8 @@ {% endif %}
-
- - {# --- START Sidebar Content --- #} -