From 0e7c03a2b20d19d7d4327dc7092ff778f2adc2a8 Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Wed, 5 Apr 2023 22:35:52 +0200 Subject: [PATCH] [WIP] list view --- templates/index.html.tera | 207 +++++++++++++++++++------------------- 1 file changed, 106 insertions(+), 101 deletions(-) diff --git a/templates/index.html.tera b/templates/index.html.tera index 41d6128..7436316 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -2,122 +2,127 @@ {% block content %} -{% if loggedin_user %} - Hi {{ loggedin_user.name }}. LOGOUT +
+ {% if loggedin_user %} + Hi {{ loggedin_user.name }}. LOGOUT - {% if loggedin_user.is_admin %} - USER - {% endif %} -{% endif %} + {% if loggedin_user.is_admin %} + USER + {% endif %} + {% endif %} -{% if flash %} - {% if flash.0 == "success" %} -
-
- {{ flash.1 }} + {% if flash %} + {% if flash.0 == "success" %} +
+
+ {{ flash.1 }} +
-
- {% endif %} - {% if flash.0 == "error" %} -
-
- {{ flash.1 }} + {% endif %} + {% if flash.0 == "error" %} +
+
+ {{ flash.1 }} +
-
+ {% endif %} + {% endif %} + +

Ausfahrten

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

{{ day.day }}

+ + {% for planned_event in day.planned_events %} +

Planned event '{{ planned_event.name }}'

+ Planned amount cox: {{ planned_event.planned_amount_cox }}
+ Allow guests: {{ planned_event.allow_guests }}
+ Planned starting time: {{ planned_event.planned_starting_time }}
+ Max people: {{ planned_event.max_people }}
+ Notes: {{ planned_event.notes }}
+ Folgende Steuerpersonen haben sich schon angemeldet: + {% for cox in planned_event.cox %} + {{ cox }} + {% if cox == loggedin_user.name %} + ABMELDEN + {% endif %} + {% endfor %} +
+ + Folgende Ruderer haben sich schon angemeldet: + {% for rower in planned_event.rower%} + {{ rower.name }} (angemeldet seit {{ rower.registered_at }}) + {% if rower.name == loggedin_user.name %} + ABMELDEN + {% endif %} + {% endfor %} + + {% if planned_event.max_people > planned_event.rower | length %} + MITRUDERN {% endif %} -{% endif %} - -

Ausfahrten

- -{% for day in days %} -

{{ day.day }}

- - {% for planned_event in day.planned_events %} -

Planned event '{{ planned_event.name }}'

- Planned amount cox: {{ planned_event.planned_amount_cox }}
- Allow guests: {{ planned_event.allow_guests }}
- Planned starting time: {{ planned_event.planned_starting_time }}
- Max people: {{ planned_event.max_people }}
- Notes: {{ planned_event.notes }}
- Folgende Steuerpersonen haben sich schon angemeldet: - {% for cox in planned_event.cox %} - {{ cox }} - {% if cox == loggedin_user.name %} - ABMELDEN - {% endif %} - {% endfor %} -
- - Folgende Ruderer haben sich schon angemeldet: - {% for rower in planned_event.rower%} - {{ rower.name }} (angemeldet seit {{ rower.registered_at }}) - {% if rower.name == loggedin_user.name %} - ABMELDEN - {% endif %} - {% endfor %} - - {% if planned_event.max_people > planned_event.rower | length %} - MITRUDERN - {% endif %} - {% if loggedin_user.is_cox %} - STEUERN - {% endif %} + {% if loggedin_user.is_cox %} + STEUERN + {% endif %} - {% if loggedin_user.is_admin %} - DELETE - {% endif %} - {% endfor %} + {% if loggedin_user.is_admin %} + DELETE + {% endif %} + {% endfor %} - {% for trip in day.trips %} -

Ausfahrt von {{ trip.cox_name }}

- Planned starting time: {{ trip.planned_starting_time }}
- Max people: {{ trip.max_people }}
- Notes: {{ trip.notes }}
- Folgende Ruderer haben sich schon angemeldet: - {% for rower in trip.rower %} - {{ rower.name }} (angemeldet seit {{ rower.registered_at }}) - {% if rower.name == loggedin_user.name %} - ABMELDEN - {% endif %} - {% endfor %} + {% for trip in day.trips %} +

Ausfahrt von {{ trip.cox_name }}

+ Planned starting time: {{ trip.planned_starting_time }}
+ Max people: {{ trip.max_people }}
+ Notes: {{ trip.notes }}
+ Folgende Ruderer haben sich schon angemeldet: + {% for rower in trip.rower %} + {{ rower.name }} (angemeldet seit {{ rower.registered_at }}) + {% if rower.name == loggedin_user.name %} + ABMELDEN + {% endif %} + {% endfor %} - {% if trip.max_people > trip.rower | length and trip.cox_id != loggedin_user.id %} - MITRUDERN - {% endif %} - {% endfor %} + {% if trip.max_people > trip.rower | length and trip.cox_id != loggedin_user.id %} + MITRUDERN + {% endif %} + {% endfor %} - {% if loggedin_user.is_admin %} -

Add planned event

-
- - - - Gäste - - - + {% if loggedin_user.is_admin %} +

Add planned event

+ + + + + Gäste + + + - -
- {% endif %} + + + {% endif %} - {% if loggedin_user.is_cox%} -

Add trip

-
- - - - + {% if loggedin_user.is_cox%} +

Add trip

+ + + + + - -
- {% endif %} + + + {% endif %} -
-{% endfor %} - +
+ {% endfor %} +
+
{% endblock content %}