From f46e6b47c72312511ec9d1c705d646c448c37e6d Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Thu, 28 Sep 2023 14:53:08 +0200 Subject: [PATCH] [TASK] text no boats on water --- README.md | 5 ++++- templates/kiosk.html.tera | 10 +++++++--- templates/log.html.tera | 18 +++++++++++------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 4bd52cb..c4d31bd 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,11 @@ # Notes / Bugfixes ## Frontend - [] support esc to close sidebar -- [] after an hour(?) of inactivity -> show large popup w/ "maybe old data (ignore) (reload page)" (ignore bc maybe use is actively doing something -> don't throw input away!) +- [] reload page -> don't throw input away! +## Backend +- [] variable for kiosk mode (needed especially for header) +- [] Logbuch form -> can't be submitted if arrival date is set (needed for Nachtrag) # Nice to have ## Frontend diff --git a/templates/kiosk.html.tera b/templates/kiosk.html.tera index 95715da..95cfb92 100644 --- a/templates/kiosk.html.tera +++ b/templates/kiosk.html.tera @@ -30,9 +30,13 @@

Am Wasser

- {% for log in on_water %} - {{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=false) }} - {% endfor %} + {% if on_water | length > 0 %} + {% for log in on_water %} + {{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=false) }} + {% endfor %} + {% else %} +

Kein Boot am Wasser

+ {% endif %}
diff --git a/templates/log.html.tera b/templates/log.html.tera index 7e21ffe..09c24b5 100644 --- a/templates/log.html.tera +++ b/templates/log.html.tera @@ -31,13 +31,17 @@

Am Wasser

- {% for log in on_water %} - {% if log.shipmaster == loggedin_user.id %} - {{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=loggedin_user.is_cox==false) }} - {% else %} - {{ log::show(log=log, state="on_water", only_ones=true) }} - {% endif %} - {% endfor %} + {% if on_water | length > 0 %} + {% for log in on_water %} + {% if log.shipmaster == loggedin_user.id %} + {{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=loggedin_user.is_cox==false) }} + {% else %} + {{ log::show(log=log, state="on_water", only_ones=true) }} + {% endif %} + {% endfor %} + {% else %} +

Kein Boot am Wasser

+ {% endif %}