{% macro new() %}
{{ macros::select(data=boats, select_name='boat_id', display=["name", " (","amount_seats", " x)"], extras=["default_shipmaster_only_steering", "amount_seats"]) }} {{ macros::select(data=coxes, select_name='shipmaster', selected_id=loggedin_user.id) }} {{ macros::checkbox(label='shipmaster_only_steering', name='shipmaster_only_steering') }} Departure: Arrival: Destination: {% for distance in distances %} {{ macros::input(label="Distanz", name="distance_in_km", type="number", min=0) }} {{ macros::input(label="Kommentar", name="comments", type="text") }} {{ macros::select(data=logtypes, select_name='logtype', default="Normal") }}
{% endmacro new %} {% macro show(log, state) %} Bootsname: {{ log.boat.name }}
Schiffsführer: {{ log.shipmaster_user.name }}
{% if log.shipmaster_only_steering %} Schiffsführer steuert nur {% endif %} Weggefahren: {{ log.departure }}
{% if state == "completed" %} Angekommen: {{ log.arrival}}
{% endif %} Ziel: {{ log.destination }}
{% if state == "completed" %} Km: {{ log.distance_in_km }}
{% endif %} Kommentare: {{ log.comments }}
Logtype: {{ log.logtype }}
Ruderer: {% set amount_rowers = log.rowers | length %} {% set amount_guests = log.boat.amount_seats - amount_rowers -1 %} {{ amount_guests }} Gäste (ohne Account) {% for rower in log.rowers %} {{ rower.name }} {% endfor %} {% if log.shipmaster == loggedin_user.id and state == "on_water" %} {{ log::home(log=log) }} {% endif %} {% endmacro show %} {% macro home(log) %}
Destination: {{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km_home", type="number", min=0, value=log.distance_in_km) }} {{ macros::input(label="Kommentar", name="comments", type="text", value=log.comments) }} {{ macros::select(data=logtypes, select_name='logtype', default="Normal", selected_id=log.logtype) }}
{% endmacro home %}