From fc42559f1b064ef294acd910fc8d6a1662979ff4 Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 23 Oct 2023 21:44:39 +0200 Subject: [PATCH] show amount of guests --- templates/includes/forms/log.html.tera | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/includes/forms/log.html.tera b/templates/includes/forms/log.html.tera index 53d4552..060e1f1 100644 --- a/templates/includes/forms/log.html.tera +++ b/templates/includes/forms/log.html.tera @@ -177,6 +177,12 @@ {% for rower in log.rowers %}

{{ rower.name }}

{% endfor %} + + {% set amount_rowers = log.rowers | length %} + {% set amount_guests = log.boat.amount_seats - amount_rowers -1 %} + {% if amount_guests > 0 %} + Gäste (ohne Account): {{ amount_guests }} + {% endif %} {% if allowed_to_close and state == "on_water" %} LÖSCHEN @@ -235,8 +241,7 @@ {{ rower.name }}{% if not loop.last or amount_guests > 0 %}, {% endif %} {% endfor %} {% if amount_guests > 0 %} - {{ amount_guests }} - Gäste (ohne Account) + Gäste (ohne Account): {{ amount_guests }} {% endif %} {% endif %}