From 0ee9967d3a04b11cad51d88cc7054a37fb3dbffe Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Fri, 7 Apr 2023 08:57:18 +0200 Subject: [PATCH] [TASK] improve styling list view --- templates/index.html.tera | 503 ++++++++++++++++++++------------------ 1 file changed, 269 insertions(+), 234 deletions(-) diff --git a/templates/index.html.tera b/templates/index.html.tera index ae9fc73..0d66077 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -3,263 +3,298 @@ {% extends "base" %} {% block content %} -
- {% if flash %} - {% if flash.0 == "success" %} -
- {{ flash.1 }} -
- {% endif %} - {% if flash.0 == "error" %} -
- {{ flash.1 }} -
- {% endif %} +
+ {% if flash %} + {% if flash.0 == "success" %} +
+ {{ flash.1 }} +
{% endif %} + {% if flash.0 == "error" %} +
+ {{ flash.1 }} +
+ {% endif %} + {% endif %} -

Ausfahrten

+

+ Ausfahrten

- {% for day in days %} -
-
-

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

+ {% for day in days %} +
+
+

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

- {% if day.planned_events | length > 0 %} -
- {% for planned_event in day.planned_events %} -
-
-
- {% if planned_event.cox_needed %} - zusätzliche steuerperson notwendig!!!!!!elf!! - {% else %} - keine zusätzliche unbedingt notwendig - {% endif %} - {{ planned_event.planned_starting_time }} Uhr ({{ planned_event.name }})
- Details -
-
- {% set_global cur_user_participates = false %} - {% for rower in planned_event.rower%} - {% if rower.name == loggedin_user.name %} - {% set_global cur_user_participates = true %} - {% endif %} - {% endfor %} - {% if cur_user_participates %} - Abmelden - {% endif %} - {% if planned_event.max_people > planned_event.rower | length %} - {% if cur_user_participates == false %} - Mitrudern - {% endif %} - {% endif %} -
-
+ {% if day.planned_events | length > 0 %} +
+ {% for planned_event in day.planned_events %} +
+
+
+ {{ planned_event.planned_starting_time }} Uhr ({{ planned_event.name }})
+ Details
- {% if loggedin_user.is_cox %} - {% set_global cur_user_participates = false %} - {% for cox in planned_event.cox %} - {% if cox.name == loggedin_user.name %} - {% set_global cur_user_participates = true %} +
+ {% set_global cur_user_participates = false %} + {% for rower in planned_event.rower%} + {% if rower.name == loggedin_user.name %} + {% set_global cur_user_participates = true %} {% endif %} {% endfor %} - {% if cur_user_participates %} - - - Abmelden - - {% else %} - - - Steuern - - {% endif %} - {% endif %} - - - - {% endfor %} -
- {% endif %} - - - {% if day.trips | length > 0 %} -
- {% for trip in day.trips %} -
-
-
- {{ trip.planned_starting_time }} Uhr ({{ trip.cox_name }})
- Details -
-
- {% set_global cur_user_participates = false %} - {% for rower in trip.rower %} - {% if rower.name == loggedin_user.name %} - {% set_global cur_user_participates = true %} - {% endif %} - {% endfor %} - {% if cur_user_participates %} - Abmelden - {% endif %} - {% if trip.max_people > trip.rower | length and trip.cox_id != loggedin_user.id and cur_user_participates == false%} - Mitrudern - {% endif %} -
-
-
- - - {% endfor %} -
- {% endif %} -
+ {% endif %} -
- {% if loggedin_user.is_admin %} - Event hinzufügen - - - + + +
+ + {% if planned_event.planned_amount_cox > 0 %} + {% set amount_cur_cox = planned_event.cox | length %} +
{{ planned_event.planned_amount_cox + - amount_cur_cox }} Steuerleute werden benötigt ({{ planned_event.planned_amount_cox }})
+
+ {% if planned_event.cox | length > 0 %} + {% for cox in planned_event.cox %} + {{ cox.name }}
+ {% endfor %} + {% else %} + Keine Steuerleute angemeldet + {% endif %} +
+ {% endif %} + + {% if planned_event.max_people > 0 %} +
{{ planned_event.max_people }} + - {{ planned_event.rower | length }} Ruderer können teilnehmen ({{ planned_event.max_people }})
+
+ {% if planned_event.rower | length > 0 %} + {% for rower in planned_event.rower %} + {{ rower.name }}
+ {% endfor %} + {% else %} + Keine Ruderer angemeldet + {% endif %} +
+ {% endif %} + + {% if planned_event.allow_guests %} +
Gäste sind erlaubt
+ {% endif %} + + {% if loggedin_user.is_admin %} + + + + + + Termin löschen + + {% endif %} +
+
+ +
+ {% endfor %} +
+ {% endif %} + + + {% if day.trips | length > 0 %} +
+ {% for trip in day.trips %} +
+
+
+ {{ trip.planned_starting_time }} Uhr ({{ trip.cox_name }})
+ Details +
+
+ {% set_global cur_user_participates = false %} + {% for rower in trip.rower %} + {% if rower.name == loggedin_user.name %} + {% set_global cur_user_participates = true %} + {% endif %} + {% endfor %} + {% if cur_user_participates %} + Abmelden + {% endif %} + {% if trip.max_people > trip.rower | length and trip.cox_id != loggedin_user.id and cur_user_participates + == false%} + Mitrudern + {% endif %} +
+
+
+ + + {% endfor %}
- + {% endif %} +
+ +
+ {% if loggedin_user.is_admin %} + Event hinzufügen + + + + {% endif %} {% if loggedin_user.is_cox%} - Ausfahrt hinzufügen + Ausfahrt hinzufügen - - {% endfor %}
+
+ {% endfor %}
-{% endblock content %} +
+{% endblock content %} \ No newline at end of file