show steering person in logs if not cox #376
@ -222,56 +222,58 @@
|
||||
<div class="text-sm text-gray-600 dark:text-gray-100">
|
||||
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
|
||||
<small class="text-gray-600 dark:text-gray-100">(ohne Account)</small>:
|
||||
{{ amount_guests }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ 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
|
||||
<small class="text-gray-600 dark:text-gray-100">(ohne Account)</small>:
|
||||
{{ amount_guests }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro show_old %}
|
||||
{% macro home(log) %}
|
||||
<form class="grid grid-cols-1 gap-3"
|
||||
action="/log/{{ log.id }}"
|
||||
method="post">
|
||||
{{ macros::input(label='Ankunftszeit', name='arrival', type='datetime-local', required=true, class="change-id-js rounded-md current-date-time") }}
|
||||
<div>
|
||||
<label for="destination" class="text-sm text-gray-600 dark:text-gray-100">Ziel</label>
|
||||
<input class="input rounded-md set-distance-js change-id-js"
|
||||
type="search"
|
||||
list="destinations"
|
||||
placeholder="Destination"
|
||||
required="required"
|
||||
id="destination{{ log.id }}"
|
||||
name="destination"
|
||||
value="{{ log.destination }}"
|
||||
data-relation="distance_in_km{{ log.id }}" />
|
||||
</div>
|
||||
<div class="relative">
|
||||
{{ 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") }}
|
||||
<span class="absolute right-0 bottom-0 py-1.5 px-2 bg-white dark:bg-primary-950 border-0 text-gray-600 dark:text-gray-100 ring-1 ring-inset ring-gray-300 dark:ring-primary-950 rounded-br-md rounded-tr-md">km</span>
|
||||
</div>
|
||||
{{ macros::input(label="Kommentar", name="comments", id="comments" ~ log.id, type="text", value=log.comments, class="rounded-md change-id-js") }}
|
||||
<details class="bg-gray-200 bg-opacity-80 dark:bg-primary-900 rounded-md p-2">
|
||||
<summary class="cursor-pointer">Details ändern</summary>
|
||||
<div class="grid grid-cols-1 gap-3">
|
||||
{{ 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) }}
|
||||
<div>
|
||||
{{ 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") }}
|
||||
</div>
|
||||
{{ macros::select(label="Typ", data=logtypes, name="logtype", id="logtype" ~ log.id, default="Normal", selected_id=log.logtype, class="rounded-md change-id-js") }}
|
||||
</div>
|
||||
</details>
|
||||
<input class="btn btn-primary" type="submit" value="Ausfahrt beenden" />
|
||||
</form>
|
||||
{% endmacro home %}
|
||||
</div>
|
||||
{% endmacro show_old %}
|
||||
{% macro home(log) %}
|
||||
<form class="grid grid-cols-1 gap-3"
|
||||
action="/log/{{ log.id }}"
|
||||
method="post">
|
||||
{{ macros::input(label='Ankunftszeit', name='arrival', type='datetime-local', required=true, class="change-id-js rounded-md current-date-time") }}
|
||||
<div>
|
||||
<label for="destination" class="text-sm text-gray-600 dark:text-gray-100">Ziel</label>
|
||||
<input class="input rounded-md set-distance-js change-id-js"
|
||||
type="search"
|
||||
list="destinations"
|
||||
placeholder="Destination"
|
||||
required="required"
|
||||
id="destination{{ log.id }}"
|
||||
name="destination"
|
||||
value="{{ log.destination }}"
|
||||
data-relation="distance_in_km{{ log.id }}" />
|
||||
</div>
|
||||
<div class="relative">
|
||||
{{ 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") }}
|
||||
<span class="absolute right-0 bottom-0 py-1.5 px-2 bg-white dark:bg-primary-950 border-0 text-gray-600 dark:text-gray-100 ring-1 ring-inset ring-gray-300 dark:ring-primary-950 rounded-br-md rounded-tr-md">km</span>
|
||||
</div>
|
||||
{{ macros::input(label="Kommentar", name="comments", id="comments" ~ log.id, type="text", value=log.comments, class="rounded-md change-id-js") }}
|
||||
<details class="bg-gray-200 bg-opacity-80 dark:bg-primary-900 rounded-md p-2">
|
||||
<summary class="cursor-pointer">Details ändern</summary>
|
||||
<div class="grid grid-cols-1 gap-3">
|
||||
{{ 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) }}
|
||||
<div>
|
||||
{{ 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") }}
|
||||
</div>
|
||||
{{ macros::select(label="Typ", data=logtypes, name="logtype", id="logtype" ~ log.id, default="Normal", selected_id=log.logtype, class="rounded-md change-id-js") }}
|
||||
</div>
|
||||
</details>
|
||||
<input class="btn btn-primary" type="submit" value="Ausfahrt beenden" />
|
||||
</form>
|
||||
{% endmacro home %}
|
||||
|
Loading…
Reference in New Issue
Block a user