From d070c7731a5b35a43bab42fc22bf7df4809d6602 Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 15 Apr 2024 20:45:26 +0200 Subject: [PATCH] show steering person in logs if not cox --- templates/includes/forms/log.html.tera | 102 +++++++++++++------------ 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/templates/includes/forms/log.html.tera b/templates/includes/forms/log.html.tera index d79b824..56c4ad0 100644 --- a/templates/includes/forms/log.html.tera +++ b/templates/includes/forms/log.html.tera @@ -222,56 +222,58 @@
Ruderer: {% for rower in log.rowers -%} - {{ rower.name -}} - {% if not loop.last or amount_guests > 0 and log.boat.name != 'Externes Boot' %},{% endif %} - {% endfor %} - {% if amount_guests > 0 and log.boat.name != 'Externes Boot' %} - Gäste - (ohne Account): - {{ amount_guests }} - {% endif %} -
+ {{ rower.name }} + {% if rower.id == log.steering_user.id and rower.id != log.shipmaster_user.id %} + (Steuerperson){%- endif -%} + {%- if not loop.last or amount_guests > 0 and log.boat.name != 'Externes Boot' %},{% endif %} + {% endfor %} + {% if amount_guests > 0 and log.boat.name != 'Externes Boot' %} + Gäste + (ohne Account): + {{ amount_guests }} + {% endif %} + + {% endif %} {% endif %} {% endif %} - {% endif %} - - -{% endmacro show_old %} -{% macro home(log) %} -
- {{ macros::input(label='Ankunftszeit', name='arrival', type='datetime-local', required=true, class="change-id-js rounded-md current-date-time") }} -
- - -
-
- {{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km" ~ log.id , type="number", min=0, value=log.distance_in_km, required=true, class="rounded-md change-id-js") }} - km -
- {{ macros::input(label="Kommentar", name="comments", id="comments" ~ log.id, type="text", value=log.comments, class="rounded-md change-id-js") }} -
- Details ändern -
- {{ macros::input(label='Abfahrtszeit', name='departure', type='datetime-local', required=true, class="change-id-js rounded-md", value=log.departure) }} - {{ log::rower_select(id="rowers"~log.id, selected=log.rowers, amount_seats=log.boat.amount_seats, steering_person_id=log.steering_user.id, cox_on_boat=log.shipmaster_user.id) }} - {{ macros::select(label="Schiffsführer", data=[], name='shipmaster', id="shipmaster-rowers"~log.id, class="change-id-js", selected_id=log.shipmaster_user.id, required=true) }} - {{ macros::select(label="Steuerperson", data=[], name='steering_person', id="steering_person-rowers"~log.id, class="change-id-js", selected_id=log.steering_user.id, required=true) }} -
- {{ macros::checkbox(label="Handgesteuert", name="shipmaster_only_steering", id="shipmaster_only_steering" ~ log.id , checked=log.shipmaster_only_steering,class="rounded-md change-id-js") }} -
- {{ macros::select(label="Typ", data=logtypes, name="logtype", id="logtype" ~ log.id, default="Normal", selected_id=log.logtype, class="rounded-md change-id-js") }}
-
- -
-{% endmacro home %} + + {% endmacro show_old %} + {% macro home(log) %} +
+ {{ macros::input(label='Ankunftszeit', name='arrival', type='datetime-local', required=true, class="change-id-js rounded-md current-date-time") }} +
+ + +
+
+ {{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km" ~ log.id , type="number", min=0, value=log.distance_in_km, required=true, class="rounded-md change-id-js") }} + km +
+ {{ macros::input(label="Kommentar", name="comments", id="comments" ~ log.id, type="text", value=log.comments, class="rounded-md change-id-js") }} +
+ Details ändern +
+ {{ macros::input(label='Abfahrtszeit', name='departure', type='datetime-local', required=true, class="change-id-js rounded-md", value=log.departure) }} + {{ log::rower_select(id="rowers"~log.id, selected=log.rowers, amount_seats=log.boat.amount_seats, steering_person_id=log.steering_user.id, cox_on_boat=log.shipmaster_user.id) }} + {{ macros::select(label="Schiffsführer", data=[], name='shipmaster', id="shipmaster-rowers"~log.id, class="change-id-js", selected_id=log.shipmaster_user.id, required=true) }} + {{ macros::select(label="Steuerperson", data=[], name='steering_person', id="steering_person-rowers"~log.id, class="change-id-js", selected_id=log.steering_user.id, required=true) }} +
+ {{ macros::checkbox(label="Handgesteuert", name="shipmaster_only_steering", id="shipmaster_only_steering" ~ log.id , checked=log.shipmaster_only_steering,class="rounded-md change-id-js") }} +
+ {{ macros::select(label="Typ", data=logtypes, name="logtype", id="logtype" ~ log.id, default="Normal", selected_id=log.logtype, class="rounded-md change-id-js") }} +
+
+ +
+ {% endmacro home %}