hacky-ruadat/templates/index.html.tera
2023-02-08 22:02:17 +01:00

54 lines
1.9 KiB
Plaintext

{% 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 />
{% if days[day_string] and days[day_string].planned_amount_cox > 0%}
{% set cur_day = days[day_string] %}
Geplante Steuerpersonen: {{ cur_day.planned_amount_cox}}<br />
Geplante Abfahrtszeit: {{ cur_day.planned_starting_time }}<br />
{% if cur_day.open_registration %}
ANMELDEN
{% else %}
Anmeldung an diesem Tag leider nicht möglich (zB bei USI Kursen)
{% endif %}
{% else %}
(Noch) keine Ausfahrt geplant
{% endif %}
<details>
<summary class="button">&#x270e;</summary>
<form method="post" action="/day">
<input type="hidden" name="_method" value="put" />
<input type="hidden" name="day" value="{{ day_string }}" />
<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) }}">
</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') }}">
</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 %}/>
</div>
<div class="three columns">
<input class="button-primary" type="submit" value="Speichern">
</div>
</div>
</form>
</details>
<hr />
{% endfor %}
{% endblock content %}