[TASK] beautify Steuerperson/Schiffsführer tag in list view

This commit is contained in:
Marie Birner 2023-10-31 20:57:28 +01:00
parent abe4a68c23
commit 3c7f56e94f

View File

@ -135,14 +135,13 @@
{% endif %}
{% for rower in log.rowers %}
<p>{{ rower.name }} {% if rower.id == log.shipmaster %}Schiffsführer {% endif %}{% if rower.id == log.steering_person%}Steuerperson{% endif %}</p>
{# @MB: shipmaster + steering_person could be prettier :') #}
<p>{{ rower.name }} {% if rower.id == log.shipmaster or rower.id == log.steering_person %}<small class="text-gray-600">({% 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 %})</small>{% endif %}</p>
{% endfor %}
{% set amount_rowers = log.rowers | length %}
{% set amount_guests = log.boat.amount_seats - amount_rowers -1 %}
{% if amount_guests > 0 %}
Gäste (ohne Account):
Gäste <small class="text-gray-600">(ohne Account)</small>:
{{ amount_guests }}
{% endif %}
@ -203,7 +202,7 @@
{{ rower.name }}{% if not loop.last or amount_guests > 0 %}, {% endif %}
{% endfor %}
{% if amount_guests > 0 %}
Gäste (ohne Account): {{ amount_guests }}
Gäste <small class="text-gray-600">(ohne Account)</small>: {{ amount_guests }}
{% endif %}
</div>
{% endif %}