From 244eb1be07e68b3b8f644f0ebcc8e9f2e371cea7 Mon Sep 17 00:00:00 2001 From: philipp Date: Tue, 2 Apr 2024 21:31:02 +0200 Subject: [PATCH] show 'no reservations' if no reservations :-) --- templates/includes/macros.html.tera | 46 ++++++++++++++--------------- templates/kiosk.html.tera | 4 +-- templates/log.html.tera | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index ab69fdc..9caa809 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -1,28 +1,28 @@ {% macro boatreservation() %} - {% if reservations %} -
-

Reservierungen ({{ reservations | length }})

-
- {% for reservation in reservations %} -
- - {{ reservation.start_date | date(format="%d.%m.%Y") }} - {% if reservation.end_date != reservation.start_date %} - - - {{ reservation.end_date | date(format="%d.%m.%Y") }} - {% endif %} - ({{ reservation.time_desc }}) - - - {{ reservation.boat.name }} - ({{ reservation.user_applicant.name }}) - - {{ reservation.usage }} -
- {% endfor %} -
+
+

Reservierungen ({{ reservations | length }})

+
+ {% for reservation in reservations %} +
+ + {{ reservation.start_date | date(format="%d.%m.%Y") }} + {% if reservation.end_date != reservation.start_date %} + - + {{ reservation.end_date | date(format="%d.%m.%Y") }} + {% endif %} + ({{ reservation.time_desc }}) + + + {{ reservation.boat.name }} + ({{ reservation.user_applicant.name }}) + + {{ reservation.usage }} +
+ {% else %} +

Keine Reservierung

+ {% endfor %}
- {% endif %} +
{% endmacro boatreservation %} {% macro header(loggedin_user) %}
diff --git a/templates/kiosk.html.tera b/templates/kiosk.html.tera index 0778ed0..06b7842 100644 --- a/templates/kiosk.html.tera +++ b/templates/kiosk.html.tera @@ -16,12 +16,12 @@
{{ log::show_boats(only_ones=false) }}
-
+

Neue Ausfahrt

{{ log::new(only_ones=false, shipmaster=-1) }}
-
+

Am Wasser

{% if on_water | length > 0 %} diff --git a/templates/log.html.tera b/templates/log.html.tera index 779bc36..11fac2d 100644 --- a/templates/log.html.tera +++ b/templates/log.html.tera @@ -11,7 +11,7 @@
{{ log::show_boats(only_ones=false) }}
-
+

Neue Ausfahrt

{{ log::new(shipmaster=loggedin_user.id) }}
-- 2.45.2