{# Shows a fancy, optional lists of boats. They are grouped by boat category.
Inputs: boats
#}
{% macro show_boats() %}
{% for amount_seats, grouped_boats in boats | group_by(attribute="amount_seats") %}
{% if grouped_boats[0].amount_seats < 9 or grouped_boats[0].amount_seats == 24 %}
{{ amount_seats }}x
{% elif grouped_boats[0].amount_seats == 9 %}
{{ grouped_boats[0].amount_seats - 1 }}+
{% else %}
Vereinsfremde Boote
{% endif %}
({{ grouped_boats | length }})
{{ rower.name }} {% if rower.id == log.shipmaster or rower.id == log.steering_person %} ( {%- if rower.id == log.shipmaster %}Schiffsführer {%- endif -%} {% if rower.id == log.shipmaster and rower.id == log.steering_person %}/{% endif %} {%- if rower.id == log.steering_person %}Steuerperson {%- endif -%} ) {% endif %}
{% endfor %} {% set amount_rowers = log.rowers | length %} {% set amount_guests = log.boat.amount_seats - amount_rowers %} {% if amount_guests > 0 %} Gäste (ohne Account): {{ amount_guests }} {% endif %} {% if allowed_to_close and state == "on_water" %} Löschen {% endif %}