rowt/templates/ergo.html.tera
2023-11-02 15:34:21 +01:00

104 lines
3.4 KiB
Plaintext

{% import "includes/macros" as macros %}
{% extends "base" %}
{% block content %}
<div class="max-w-screen-lg w-full">
{% if flash %}
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
{% endif %}
<details>
<summary>Deine Daten</summary>
<p>
Folgende Daten hat der Ruderassistent von dir. Wenn diese nicht mehr aktuell sind, bitte gewünschte Änderungen an Philipp melden (Tel. nr siehe Signal, oder an it@rudernlinz.at).
<br /><br />
<ul>
<li>Geburtsdatum: {{ loggedin_user.dob }}</li>
<li>Gewicht: {{ loggedin_user.weight}} kg</li>
<li>Geschlecht: {{ loggedin_user.sex}}</li>
</ul>
</p>
</details>
<h1 class="h1">Neuer Eintrag</h1>
<details>
<summary>Dirty Thirty</summary>
<p>
<div class="border-r border-l">
<form action="/ergo/thirty" method="post" enctype="multipart/form-data">
<label for="user-thirty" class="text-sm text-gray-600">Ergo-Fahrer</label>
<select name="user" id="user-thirty" class="input">
{% for user in users %}
{% if user.id == loggedin_user.id %}
<option value="{{ user.id }}" selected="selected">{{ user.name }}</option>
{% else %}
<option value="{{ user.id }}">{{ user.name }}</option>
{% endif %}
{% endfor %}
</select>
{{ macros::input(label="Zeit [(hh:)mm:ss]/Distanz [m]", name="result", required=true, type="text", class="input") }}
<label for="file-thirty" class="text-sm text-gray-600">Ergebnis-Foto vom Ergo-Display</label>
<input type="file" id="file-thirty" name="proof" class="input" accept="image/*" capture="camera">
<input type="submit" value="Speichern" class="btn btn-primary w-full col-span-4 m-auto"/>
</form>
</div>
</p>
</details>
<details>
<summary>Dirty Dozen</summary>
<p>
<div class="border-r border-l">
<form action="/ergo/dozen" method="post" enctype="multipart/form-data">
<label for="user-dozen" class="text-sm text-gray-600">Ergo-Fahrer</label>
<select name="user" id="user-dozen" class="input">
<option disabled="disabled">User auswählen</option>
{% for user in users %}
{% if user.id == loggedin_user.id %}
<option value="{{ user.id }}" selected="selected">{{ user.name }}</option>
{% else %}
<option value="{{ user.id }}">{{ user.name }}</option>
{% endif %}
{% endfor %}
</select>
{{ macros::input(label="Zeit [(hh:)mm:ss]/Distanz [m]", name="result", required=true, type="text", class="input") }}
<label for="file-dozen" class="text-sm text-gray-600">Ergebnis-Foto vom Ergo-Display</label>
<input type="file" id="file-dozen" name="proof" class="input" accept="image/*" capture="camera">
<input type="submit" value="Speichern" class="btn btn-primary w-full col-span-4 m-auto"/>
</form>
</div>
</p>
</details>
<h1 class="h1">Aktuelle Woche</h1>
<details>
<summary>Dirty Thirty</summary>
<p>
<div class="border-r border-l">
<ol>
{% for stat in thirty %}
<li>{{ stat.name }}: {{ stat.result }}</li>
{% endfor %}
</ol>
</div>
</p>
</details>
<details>
<summary>Dirty Dozen</summary>
<p>
<div class="border-r border-l">
<ol>
{% for stat in dozen%}
<li>{{ stat.name }}: {{ stat.result }}</li>
{% endfor %}
</ol>
</div>
</p>
</details>
</div>
{% endblock content%}