{% import "includes/macros" as macros %} {% import "includes/forms/log" as log %} {% extends "base" %} {% block content %}
{% if "paid" not in loggedin_user.roles and "Donau Linz" in loggedin_user.roles %}
{% endif %}

Ausfahrten

{% include "includes/buttons" %} {% for day in days %} {% set amount_trips = day.events | length + day.trips | length %} {% set_global day_cox_needed = false %} {% if day.events | length > 0 %} {% for event in day.events %} {% if event.cox_needed %} {% set_global day_cox_needed = true %} {% endif %} {% endfor %} {% endif %}

{{ day.day| date(format="%d.%m.%Y") }} {{ day.day | date(format="%A", locale="de_AT") }} {% if day.max_waterlevel %} • 🌊{{ day.max_waterlevel }} cm {% endif %} {% if day.weather %} Temp: {{ day.weather.max_temp | round }}° • Windböe: {{ day.weather.wind_gust | round }} km/h • Regen: {{ day.weather.rain_mm | round }} mm {% endif %}

{% if day.events | length > 0 or day.trips | length > 0 %}
{# --- START Events --- #} {% if day.events | length > 0 %} {% for event in day.events | sort(attribute="planned_starting_time") %} {% set amount_cur_cox = event.cox | length %} {% set amount_cox_missing = event.planned_amount_cox - amount_cur_cox %}
{% if event.max_people == 0 %} ⚠ Absage {{ event.planned_starting_time }} Uhr ({{ event.name }} {%- if event.trip_type %} - {{ event.trip_type.icon | safe }} {{ event.trip_type.name }} {%- endif -%} ) {% else %} {{ event.planned_starting_time }} Uhr ({{ event.name }} {%- if event.trip_type %} - {{ event.trip_type.icon | safe }} {{ event.trip_type.name }} {%- endif -%} ) {% endif %}
Details
{# --- START Row Buttons --- #} {% set_global cur_user_participates = false %} {% for rower in event.rower %} {% if rower.name == loggedin_user.name %} {% set_global cur_user_participates = true %} {% endif %} {% endfor %} {% if cur_user_participates %} Abmelden {% endif %} {% if event.max_people > event.rower | length and cur_user_participates == false %} Mitrudern {% endif %} {# --- END Row Buttons --- #} {# --- START Cox Buttons --- #} {% if "cox" in loggedin_user.roles %} {% set_global cur_user_participates = false %} {% for cox in event.cox %} {% if cox.name == loggedin_user.name %} {% set_global cur_user_participates = true %} {% endif %} {% endfor %} {% if cur_user_participates %} {% include "includes/cox-icon" %} Abmelden {% elif event.planned_amount_cox > 0 %} {% include "includes/cox-icon" %} Steuern {% endif %} {% endif %} {# --- END Cox Buttons --- #}
{# --- START Sidebar Content --- #} {# --- END Sidebar Content --- #}
{% endfor %} {% endif %} {# --- END Events --- #} {# --- START Trips --- #} {% if day.trips | length > 0 %} {% for trip in day.trips | sort(attribute="planned_starting_time") %}
{% if trip.max_people == 0 %} ⚠ {{ trip.planned_starting_time }} Uhr (Absage {{ trip.cox_name -}} {% if trip.trip_type %} - {{ trip.trip_type.icon | safe }} {{ trip.trip_type.name }} {%- endif -%} ) {% else %} {{ trip.planned_starting_time }} Uhr ({{ trip.cox_name -}} {% if trip.trip_type %} - {{ trip.trip_type.icon | safe }} {{ trip.trip_type.name }} {%- endif -%} ) {% endif %}
Details
{% set_global cur_user_participates = false %} {% for rower in trip.rower %} {% if rower.name == loggedin_user.name %} {% set_global cur_user_participates = true %} {% endif %} {% endfor %} {% if cur_user_participates %} Abmelden {% endif %} {% if trip.max_people > trip.rower | length and trip.cox_id != loggedin_user.id and cur_user_participates == false %} Mitrudern {% endif %}
{# --- START Sidebar Content --- #} {# --- END Sidebar Content --- #}
{% endfor %} {% endif %} {# --- END Trips --- #}
{% endif %}
{# --- START Add Buttons --- #} {% if "event" in loggedin_user.roles or "cox" in loggedin_user.roles %}
{% if "event" in loggedin_user.roles %} {% include "includes/plus-icon" %} Event {% endif %} {% if "cox" in loggedin_user.roles %} {% include "includes/plus-icon" %} Ausfahrt {% endif %}
{% endif %} {# --- END Add Buttons --- #}
{% endfor %}
{% if "cox" in loggedin_user.roles %} {% include "forms/trip" %} {% endif %} {% if "event" in loggedin_user.roles %} {% include "forms/event" %} {% endif %} {% endblock content %}