hacky-ruadat/templates/index.html.tera

84 lines
2.8 KiB
Plaintext
Raw Normal View History

2023-02-08 16:25:06 +01:00
{% extends "base" %}
{% block content %}
{% for day in next_days %}
{% set day_string = day | date(format="%Y-%m-%d") %}
{{ day | date(format="%d.%m.%Y")}}
<br />
2023-02-09 12:16:04 +01:00
{% 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 %}
2023-02-08 22:02:17 +01:00
Geplante Steuerpersonen: {{ cur_day.planned_amount_cox}}<br />
Geplante Abfahrtszeit: {{ cur_day.planned_starting_time }}<br />
2023-02-09 12:16:04 +01:00
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 %}
{% endfor %}
</ol>
2023-02-08 22:02:17 +01:00
{% if cur_day.open_registration %}
2023-02-09 12:16:04 +01:00
<details>
<summary class="button">&plus;</summary>
<form method="post" action="/register">
<input type="hidden" name="_method" value="put" />
<input type="hidden" name="day" value="{{ day_string }}" />
<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 %}" />
</div>
<div class="six columns">
<input class="button-primary" type="submit" value="Speichern">
</div>
</div>
</form>
</details>
2023-02-08 16:25:06 +01:00
{% else %}
Anmeldung an diesem Tag leider nicht möglich (zB bei USI Kursen)
{% endif %}
{% else %}
(Noch) keine Ausfahrt geplant
2023-02-08 22:02:17 +01:00
{% endif %}
2023-02-08 16:25:06 +01:00
<details>
2023-02-08 22:02:17 +01:00
<summary class="button">&#x270e;</summary>
2023-02-08 16:25:06 +01:00
<form method="post" action="/day">
<input type="hidden" name="_method" value="put" />
2023-02-08 22:02:17 +01:00
<input type="hidden" name="day" value="{{ day_string }}" />
2023-02-08 16:25:06 +01:00
<div class="row">
<div class="three columns">
<label for="planned_amount_cox">Geplante Steuerpersonen</label>
2023-02-08 22:02:17 +01:00
<input class="u-full-width" type="number" id="planned_amount_cox" name="planned_amount_cox" value="{{ cur_day.planned_amount_cox | default(value=2) }}">
2023-02-08 16:25:06 +01:00
</div>
<div class="three columns">
<label for="planned_starting_time">Geplante Abfahrtszeit</label>
2023-02-08 22:02:17 +01:00
<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') }}">
2023-02-08 16:25:06 +01:00
</div>
<div class="three columns">
<label for="open_registration">Registrierung offen</label>
2023-02-08 22:02:17 +01:00
<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 %}/>
2023-02-08 16:25:06 +01:00
</div>
<div class="three columns">
2023-02-08 22:02:17 +01:00
<input class="button-primary" type="submit" value="Speichern">
2023-02-08 16:25:06 +01:00
</div>
</div>
</form>
</details>
2023-02-08 22:02:17 +01:00
2023-02-08 16:25:06 +01:00
<hr />
{% endfor %}
{% endblock content %}