{% extends "base" %} {% block content %}

Ausfahrten

{% for day_with_trip in data %} {% set day = day_with_trip.day %} {% set day_string = day.day | date(format="%Y-%m-%d") %} {% set_global default_trips = [] %} {% set_global indep_trips = [] %} {% for trip in day_with_trip.trips %} {% if trip.trip.begin or trip.trip.cox_id %} {% set_global indep_trips = indep_trips | concat(with=trip) %} {% else %} {% set_global default_trips = default_trips | concat(with=trip) %} {% endif %} {% endfor %} {% set cox = default_trips | filter(attribute="user.is_cox", value=true) %} {% set amount_cox = cox | length %} {% set cox_needed = amount_cox < day.planned_amount_cox %}
{{ day.day | date(format="%A, %d.%m.%Y", locale="de_AT")}} {% if user.is_cox %}
NEUE AUSFAHRT
{% endif %} {% if user.is_admin %}
{% endif %} {% if day.planned_amount_cox > 0%} {% set rowers = default_trips | filter(attribute="user.is_cox", value=false) | sort(attribute="trip.created") %} {% if cox_needed %} {% set cox_left = day.planned_amount_cox - amount_cox %}
Es {{ cox_left | pluralize(singular="wird", plural="werden")}} noch {{ cox_left }} Steuerperson{{ cox_left | pluralize(plural="en")}} gesucht!
{% endif %} Abfahrtszeit: {{ day.planned_starting_time }} Uhr
{{ default_trips | length }} angemeldete Person{{ default_trips | length | pluralize(plural="en") }}: {{ cox | length }} Steuerperson{{ cox | length | pluralize(plural="en") }} ({% for c in cox %}{{ c.user.name }} {% if c.user.name == user.name %}
{% endif %} {% endfor %}), {{ rowers | length }} Ruderer:
    {% for r in rowers %}
  1. {{ r.user.name }} (angemeldet seit {{ r.trip.created | date(format="%d.%m. %H:%M", timezone="Europe/Vienna") }}) {% if r.user.name == user.name %}
    {% endif %}
  2. {% endfor %}
{% if day.open_registration or user.is_cox %}
+
{% else %} Anmeldung an diesem Tag leider nicht möglich (zB bei USI Kursen) {% endif %} {% endif %} {% for trip in indep_trips %} {% if trip.trip.begin %} {{trip.user.name}} @ {{trip.trip.begin}} {% set rowers = indep_trips | filter(attribute="trip.cox_id", value=trip.trip.id) %} {% if trip.user.name == user.name and rowers | length == 0 %}
{% endif %} :
    {% for r in rowers %}
  1. {{ r.user.name }} (angemeldet seit {{ r.trip.created | date(format="%d.%m. %H:%M", timezone="Europe/Vienna") }}) {% if r.user.name == user.name %}
    {% endif %}
  2. {% endfor %}
+
{% endif %} {% endfor %}
{% endfor %} {% if user.is_cox %} Alle heurigen Ausfahrten anzeigen {% endif %} {% endblock content %}