From d9bb190301241545822be01949f6eac0353ec321 Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 17 Apr 2023 19:21:19 +0200 Subject: [PATCH] be more precise with cox_needed --- templates/index.html.tera | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/index.html.tera b/templates/index.html.tera index 5069411..7a484f2 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -108,7 +108,12 @@ {# --- START List Coxes --- #} {% if planned_event.planned_amount_cox > 0 %} {% set amount_cur_cox = planned_event.cox | length %} - {{ macros::box(participants=planned_event.cox, empty_seats=planned_event.planned_amount_cox - amount_cur_cox, header='Steuerleute werden benötigt', text='Keine Steuerleute angemeldet') }} + {% set amount_cox_missing = planned_event.planned_amount_cox - amount_cur_cox %} + {% if amount_cox_missing > 0 %} + {{ macros::box(participants=planned_event.cox, empty_seats=planned_event.planned_amount_cox - amount_cur_cox, header='Steuerleute werden noch benötigt', text='Keine Steuerleute angemeldet') }} + {% else %} + {{ macros::box(participants=planned_event.cox, empty_seats="", header='Genügend Steuerleute haben sich angemeldet :-)', text='Keine Steuerleute angemeldet') }} + {% endif %} {% endif %} {# --- END List Coxes --- #}