{% 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 %} {% set_global user_registered = false %} 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 %} {% set_global user_registered = true %}
{% 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 %} {% set_global user_registered = true %}
    {% endif %}
  2. {% endfor %}
{% if day.open_registration or user.is_cox %} {% if not user_registered or user.add_different_user %}
+
{% if user.add_different_user %} {% else %} {% endif %}
{% else %} {% endif %} {% else %} Anmeldung an diesem Tag leider nicht möglich (zB bei USI Kursen) {% endif %} {% endif %} {% for trip in indep_trips %} {% set_global user_registered = false %} {% if trip.trip.begin %} {{trip.user.name}} @ {{trip.trip.begin}} {% set rowers = indep_trips | filter(attribute="trip.cox_id", value=trip.trip.id) | sort(attribute="trip.created")%} {% if trip.user.name == user.name and rowers | length == 0 %} {% set_global user_registered = true %}
{% 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 %} {% set_global user_registered = true %}
    {% endif %}
  2. {% endfor %}
{% if not user_registered or user.add_different_user %}
+
{% if user.add_different_user %} {% else %} {% endif %}
{% endif %} {% endif %} {% endfor %}
{% endfor %} {% if user.is_cox %} Alle heurigen Ausfahrten anzeigen {% endif %} {% endblock content %}