This commit is contained in:
2023-02-09 15:29:44 +01:00
parent 03dcfc6255
commit 9a72413934
12 changed files with 293 additions and 254 deletions

View File

@ -1,31 +1,26 @@
{% extends "base" %}
{% block content %}
{% for day in next_days %}
{% set day_string = day | date(format="%Y-%m-%d") %}
{{ day | date(format="%d.%m.%Y")}}
{% for day_with_trip in data %}
{% set day = day_with_trip.day %}
{% set day_string = day.day | date(format="%Y-%m-%d") %}
{% set trips = day_with_trip.trips %}
{{ day.day | date(format="%d.%m.%Y")}}
<br />
{% if dwu[day_string] and dwu[day_string].day.planned_amount_cox > 0%}
{% set cur_day = dwu[day_string].day %}
{% set_global already_registered = false %}
Geplante Steuerpersonen: {{ cur_day.planned_amount_cox}}<br />
Geplante Abfahrtszeit: {{ cur_day.planned_starting_time }}<br />
{% if day.planned_amount_cox > 0%}
Geplante Steuerpersonen: {{ day.planned_amount_cox}}<br />
Geplante Abfahrtszeit: {{ day.planned_starting_time }}<br />
Angemeldete Personen:
<ol>
{% for trip in dwu[day_string].trips %}
<li>
{% if trip.user.name == name.name %}
{% set_global already_registered = true %}
DU
{% else %}
{{ trip.user.name }}
{% endif %}
{% for trip in trips %}
<li>{{ trip.user.name }}</li>
{% endfor %}
</ol>
{% if cur_day.open_registration %}
{% if day.open_registration %}
<details>
<summary class="button">&plus;</summary>
<form method="post" action="/register">
@ -34,7 +29,7 @@
<div class="row">
<div class="six columns">
<label for="name">Name</label>
<input class="u-full-width" type="text" id="name" name="name" value="{% if already_registered == false %}{{ name.name }}{% endif %}" />
<input class="u-full-width" type="text" id="name" name="name" value="{{ user.name }}" />
</div>
<div class="six columns">
<input class="button-primary" type="submit" value="Speichern">
@ -57,15 +52,15 @@
<div class="row">
<div class="three columns">
<label for="planned_amount_cox">Geplante Steuerpersonen</label>
<input class="u-full-width" type="number" id="planned_amount_cox" name="planned_amount_cox" value="{{ cur_day.planned_amount_cox | default(value=2) }}">
<input class="u-full-width" type="number" id="planned_amount_cox" name="planned_amount_cox" value="{{ day.planned_amount_cox }}">
</div>
<div class="three columns">
<label for="planned_starting_time">Geplante Abfahrtszeit</label>
<input class="u-full-width" type="time" id="planned_starting_time" name="planned_starting_time" value="{{ cur_day.planned_starting_time | default(value='17:00') }}">
<input class="u-full-width" type="time" id="planned_starting_time" name="planned_starting_time" value="{% if day.planned_starting_time %}{{ day.planned_starting_time }}{% else %}17:00{%endif%}">
</div>
<div class="three columns">
<label for="open_registration">Registrierung offen</label>
<input class="u-full-width" type="checkbox" id="open_registration" name="open_registration" {% if not cur_day or cur_day.open_registration %} checked="true" {% endif %}/>
<input class="u-full-width" type="checkbox" id="open_registration" name="open_registration" {% if not day or day.open_registration %} checked="true" {% endif %}/>
</div>
<div class="three columns">
<input class="button-primary" type="submit" value="Speichern">