diff --git a/templates/admin/boat/index.html.tera b/templates/admin/boat/index.html.tera index 968bd25..750c523 100644 --- a/templates/admin/boat/index.html.tera +++ b/templates/admin/boat/index.html.tera @@ -5,15 +5,16 @@ {% block content %} -
-

Boats

- {{ boat::new() }} +
+

Boats

+ {{ boat::new() }} -
- {% for boat in boats %} - {{ boat::edit(boat=boat, uuid=loop.index) }} - {% endfor %} -
-
+
+ {% for boat in boats %} + {{ boat::edit(boat=boat, uuid=loop.index) }} + {% endfor %} +
+ +
{% endblock content %} diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index cfdd307..68cdc98 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -3,69 +3,71 @@ {% extends "base" %} {% block content %} -
- {% if flash %} - {{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }} - {% endif %} +
+ {% if flash %} + {{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }} + {% endif %} -

Users

+

Users

-
-
-

Neuen User hinzufügen

-
-
- - -
-
- -
-
-
-
- -
-
+
+
+

Neuen User hinzufügen

+
+
+ + +
+
+ +
+
+
+
+ +
+
- -
- - -
- + +
+ + +
+ -
-
- {% for user in users %} -
-
- -
{{ user.name }} - {% if user.last_access %} - (last access: {{ user.last_access | date }}) - {% endif %} -
-
- {{ macros::checkbox(label='Gast', name='is_guest', id=loop.index , checked=user.is_guest) }} - {{ macros::checkbox(label='Steuerberechtigter', name='is_cox', id=loop.index , checked=user.is_cox) }} - {{ macros::checkbox(label='Admin', name='is_admin', id=loop.index , checked=user.is_admin) }} -
- {% if user.pw %} - Passwort zurücksetzen - {% endif %} -
- -
-{% endfor %} -
+
+
+ {% for user in users %} +
+
+ +
{{ user.name }} + {% if user.last_access %} + (last access: + {{ user.last_access | date }}) + {% endif %} +
+
+ {{ macros::checkbox(label='Gast', name='is_guest', id=loop.index , checked=user.is_guest) }} + {{ macros::checkbox(label='Steuerberechtigter', name='is_cox', id=loop.index , checked=user.is_cox) }} + {{ macros::checkbox(label='Admin', name='is_admin', id=loop.index , checked=user.is_admin) }} +
+ {% if user.pw %} + Passwort zurücksetzen + {% endif %} +
+ +
+ {% endfor %} +
-
+
{% endblock content %} diff --git a/templates/auth/login.html.tera b/templates/auth/login.html.tera index 02fbdca..cdd5980 100644 --- a/templates/auth/login.html.tera +++ b/templates/auth/login.html.tera @@ -1,39 +1,39 @@ {% extends "base" %} {% block content %} -
-
- Logo Ruderassistent -

Ruderassistent

-
+
+
+ Logo Ruderassistent +

Ruderassistent

+
- {% if flash %} - {{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }} - {% endif %} -
- -
-
- {% if name %} - {{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true,value=name, autofocus=true) }} - {% else %} - {{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true, autofocus=true) }} + {% if flash %} + {{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }} + {% endif %} + + +
+
+ {% if name %} + {{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true,value=name, autofocus=true) }} + {% else %} + {{ macros::input(label='Name', name='name', type='input', required=true, class='rounded-t-md',hide_label=true, autofocus=true) }} - {% endif %} -
-
- {{ macros::input(label='Passwort', name='password', type='password', class='rounded-b-md',hide_label=true) }} -
-
+ {% endif %} +
+
+ {{ macros::input(label='Passwort', name='password', type='password', class='rounded-b-md',hide_label=true) }} +
+
-
- -
-
-
+
+ +
+ +
{% endblock content %} diff --git a/templates/auth/set-pw.html.tera b/templates/auth/set-pw.html.tera index 93d5582..59a8981 100644 --- a/templates/auth/set-pw.html.tera +++ b/templates/auth/set-pw.html.tera @@ -1,30 +1,30 @@ {% extends "base" %} {% block content %} -
-

Passwort setzen

+
+

Passwort setzen

-
- - -
-
- {{ macros::input(label='Passwort', name='password', type='password', required=true, class='rounded-t-md',hide_label=true) }} -
-
- {{ macros::input(label='Passwort bestätigen', name='password_confirm', type='password', required=true, class='rounded-b-md',hide_label=true) }} -
-
- -
- -
-
-
+
+ + +
+
+ {{ macros::input(label='Passwort', name='password', type='password', required=true, class='rounded-t-md',hide_label=true) }} +
+
+ {{ macros::input(label='Passwort bestätigen', name='password_confirm', type='password', required=true, class='rounded-b-md',hide_label=true) }} +
+
+ +
+ +
+
+
{% endblock content %} diff --git a/templates/base.html.tera b/templates/base.html.tera index 86965ec..ec2d4d2 100644 --- a/templates/base.html.tera +++ b/templates/base.html.tera @@ -2,29 +2,27 @@ - - - - - - Ruderassistent - ASKÖ Ruderverein Donau Linz - - - {%if loggedin_user %} - {{ macros::header(loggedin_user=loggedin_user) }} - {%endif%} - -
- {% block content %}{% endblock content %} -
- - {%if loggedin_user %} - {% include "includes/footer" %} - {%endif%} - - - - + + + + + + Ruderassistent - ASKÖ Ruderverein Donau Linz + + + {%if loggedin_user %} + {{ macros::header(loggedin_user=loggedin_user) }} + {%endif%} +
{% block content %}{% endblock content %} +
+ {%if loggedin_user %} + {% include "includes/footer" %} + {%endif%} + + + + + diff --git a/templates/dynamics/popup.html.tera b/templates/dynamics/popup.html.tera deleted file mode 100644 index e69de29..0000000 diff --git a/templates/dynamics/sidebar.html.tera b/templates/dynamics/sidebar.html.tera index 1720f1b..59c7041 100644 --- a/templates/dynamics/sidebar.html.tera +++ b/templates/dynamics/sidebar.html.tera @@ -1,17 +1,16 @@ - \ No newline at end of file + diff --git a/templates/faq.html.tera b/templates/faq.html.tera index 052033f..6b9229c 100644 --- a/templates/faq.html.tera +++ b/templates/faq.html.tera @@ -3,21 +3,21 @@ {% extends "base" %} {% block content %} -
-

Infrequently asked questions

+
+

Infrequently asked questions

-
- {% if loggedin_user.is_cox %} - {{ macros::faq( +
+ {% if loggedin_user.is_cox %} + {{ macros::faq( question='Was bedeutet "Immer anzeigen"?', answer='Nicht-Steuerleute sehen normale Ausfahrten 6 Tage im vorhinein. Wenn du "immer anzeigen" aktivierst, sehen Nicht-Steuerleute die Ausfahrt sofort. Die Funktion sollte nur sehr gezielt aktiviert werden (zB bei Fetzenfahrt-Anmeldung).') }} - {{ macros::faq( + {{ macros::faq( question='Wie kann ich eine erstellte Ausfahrt absagen?', answer='Du kannst bei deinen selbst angelegten Ausfahrten auf Details klicken und hier unter Ausfahrt bearbeiten die Anzahl der Ruderer auf 0 setzen. Danach wird die Ausfahrt als abgesagt markiert. Bedenke allerdings, dass dadurch nicht automatisch alle Mitruderer informiert werden. Bitte zusätzlich in die Signal Gruppe schreiben oder den Betroffenen persönlich Bescheid geben.') }} - {{ macros::faq( + {{ macros::faq( question='Wie kann eine Veranstaltung angelegt werden, bei der sich nicht nur Ruderer anmelden können, sondern auch Steuerleute?', answer='Im Moment können nur Admins eine geplante Veranstaltung anlegen. Bitte bei Marie oder Philipp mit folgenden Angaben melden, dann wird eine Veranstaltung erstellt.
    @@ -28,42 +28,42 @@
') }} - {{ macros::faq( + {{ macros::faq( question='Wie kann ich eine Ausfahrt anlegen, bei der nicht alle Ruderer teilnehmen sollen, z.B. Tagesausflug nach Aschach?', answer='Du kannst beim Anlegen definieren, welchen Typ deine Ausfahrt hat. Standardmäßig wird "Reguläre Ausfahrt" verwendet, es gibt aber auch z.B. "Lange Ausfahrt". Wenn du das für deine Ausfahrt auswählst, wird der User in einem Popup noch einmal extra gefragt, ob er wirklich daran teilnehmen möchte. Bitte führe zusätzlich die Kilometer oder die Anforderungen im Anmerkungen Feld der Ausfahrt an.') }} - {{ macros::faq( + {{ macros::faq( question='Wann sollte ich bei einer Ausfahrt "Gäste erlauben" einstellen?', answer='Wenn du Ruderer mitnehmen möchtest, die einen 5er-Block besitzen, kannst du die jeweilige Ausfahrt damit für diese Gruppe freischalten. Wenn sich ein Gast für die Ausfahrt anmeldet, dann wird er mit "Gast" neben dem jeweiligen Namen gekennzeichnet.') }} - {% endif %} + {% endif %} - {{ macros::faq( + {{ macros::faq( question='Wie erfolgt die Absage einer Ausfahrt aufgrund ungünstiger Wetterbedingungen?', answer='Im Falle einer kurzfristigen Absage einer Ausfahrt - sei es aufgrund von schlechten Wetterbedingungen oder unpassendem Wasserstand - informieren wir dich rechtzeitig. Eine entsprechende Benachrichtigung wird mindestens ein paar Stunden vorher in unserem Ruderassistenten veröffentlicht. Zusätzlich gibt es eine Nachricht in unserer Signal-Gruppe. Zur Info: Leichter Regen mit trotzdem passenden Temperaturen hindern uns in der Regel nicht an einer Ausfahrt ;-)') }} - {{ macros::faq( + {{ macros::faq( question='Wo finde ich mehr Infos über den Verein?', answer='Seit Sommer 2023 gibt es ein Handbuch mit vielen Infos über unseren Verein und Rudern im Allgemeinen. Du findest es unter https://rudernlinz.at/book') }} - {{ macros::faq( + {{ macros::faq( question='Wann kann ich mich zu Ausfahrten anmelden?', answer='Du kannst Ausfahrten bis zu 6 Tage im Voraus sehen. Vergiss nicht, dich mindestens 2 Stunden vor Beginn an- bzw. abzumelden. Gelegentlich, wie bei der Marktausfahrt am Freitag, werden Ausfahrten kurzfristiger angekündigt. Wenn du keine Ausfahrt verpassen willst, freut sich diese Seite über Aufrufe ;-)') }} - {{ macros::faq( + {{ macros::faq( question='Wann soll ich beim Bootshaus sein?', answer='Bitte schaue, dass du zur angegebenen Zeit abfahrbereit (d.h. bereits umgezogen) beim Bootshaus bist.') }} - {{ macros::faq( + {{ macros::faq( question='Es sind mehrere Fahrten zur selben Zeit ausgeschrieben. Wo soll ich mich anmelden?', answer='Um das Verhältnis von Steuerleuten zu Ruderern optimal zu gestalten, schreiben wir mehrere Fahrten aus. In der Regel nehmen alle Boote, die zur selben Zeit starten, den gleichen Kurs, es sei denn, es wird in den Anmerkungen ausdrücklich anders angegeben. Die konkrete Zuordnung zu den Booten wird direkt in unserem Ruderverein vorgenommen. Bei welcher spezifischen Ausfahrt du dich anmeldest, spielt dabei keine wesentliche Rolle.') }} -
-
+
+
{% endblock content%} diff --git a/templates/forms/event.html.tera b/templates/forms/event.html.tera index 37ec2cb..4f2e6c2 100644 --- a/templates/forms/event.html.tera +++ b/templates/forms/event.html.tera @@ -1,17 +1,17 @@ {% import "includes/macros" as macros %} diff --git a/templates/forms/trip.html.tera b/templates/forms/trip.html.tera index d1af987..d38d9ab 100644 --- a/templates/forms/trip.html.tera +++ b/templates/forms/trip.html.tera @@ -1,15 +1,15 @@ {% import "includes/macros" as macros %} diff --git a/templates/includes/buttons.html.tera b/templates/includes/buttons.html.tera index 09734f4..eb91a1f 100644 --- a/templates/includes/buttons.html.tera +++ b/templates/includes/buttons.html.tera @@ -1,16 +1,16 @@ {% if loggedin_user.is_cox %} -
- - - -
-{% endif %} \ No newline at end of file +
+ + + +
+{% endif %} diff --git a/templates/includes/cox-icon.html.tera b/templates/includes/cox-icon.html.tera index fb4685e..9cea574 100644 --- a/templates/includes/cox-icon.html.tera +++ b/templates/includes/cox-icon.html.tera @@ -1,4 +1,3 @@ - - - \ No newline at end of file + + + diff --git a/templates/includes/delete-icon.html.tera b/templates/includes/delete-icon.html.tera index 6ffc9e5..9f56e51 100644 --- a/templates/includes/delete-icon.html.tera +++ b/templates/includes/delete-icon.html.tera @@ -1,6 +1,4 @@ - - - - \ No newline at end of file + + + + diff --git a/templates/includes/footer.html.tera b/templates/includes/footer.html.tera index 6282281..bac774b 100644 --- a/templates/includes/footer.html.tera +++ b/templates/includes/footer.html.tera @@ -1,10 +1,12 @@ diff --git a/templates/includes/forms/boat.html.tera b/templates/includes/forms/boat.html.tera index 2a7f99b..a17718d 100644 --- a/templates/includes/forms/boat.html.tera +++ b/templates/includes/forms/boat.html.tera @@ -1,65 +1,49 @@ {% macro new() %} -
-
-

- Neues Boot hinzufügen -

- {{ macros::input(label="Name", name="name", type="text", required=true) }} - {{ macros::input(label="Anzahl Sitze", name="amount_seats", type="number", required=true, min=1) }} - {{ macros::input(label="Baujahr", name="year_built", type="number", min=1950, max=2050) }} - {{ macros::input(label="Bootsbauer", name="boatbuilder", type="text") }} - {{ macros::select(data=locations, label='location', select_name='location_id', selected_id=1) }} - {{ macros::select(data=users, label='users', select_name='owner', default="Vereinsboot") }} - {{ macros::checkbox(label="Steuerperson steuert nur", name="default_shipmaster_only_steering")}} - {{ macros::checkbox(label="Skull", name="skull", checked=true)}} - {{ macros::checkbox(label="Externes Boot (anderer Verein)", name="external")}} -
-
- -
-
+
+
+

+ Neues Boot hinzufügen +

+ {{ macros::input(label="Name", name="name", type="text", required=true) }} + {{ macros::input(label="Anzahl Sitze", name="amount_seats", type="number", required=true, min=1) }} + {{ macros::input(label="Baujahr", name="year_built", type="number", min=1950, max=2050) }} + {{ macros::input(label="Bootsbauer", name="boatbuilder", type="text") }} + {{ macros::select(data=locations, label='location', select_name='location_id', selected_id=1) }} + {{ macros::select(data=users, label='users', select_name='owner', default="Vereinsboot") }} + {{ macros::checkbox(label="Steuerperson steuert nur", name="default_shipmaster_only_steering")}} + {{ macros::checkbox(label="Skull", name="skull", checked=true)}} + {{ macros::checkbox(label="Externes Boot (anderer Verein)", name="external")}} +
+
+ +
+
{% endmacro new %} {% macro edit(boat, uuid) %} -
-
- -
{{ boat.name }}
-
- {{ macros::input(label='Name', name='name', type='text', value=boat.name) }} - {{ macros::input(label='Amount Seats', name='amount_seats', type='number', min=0, value=boat.amount_seats) }} - {{ macros::select(data=locations, label='location', select_name='location_id', selected_id=boat.location_id) }} - {{ macros::select(data=users, label='users', select_name='owner', selected_id=boat.owner, default="Vereinsboot") }} - {{ macros::input(label='Baujahr', name='year_built', type='number', min=1950, value=boat.year_built) }} - {{ macros::input(label='Bootsbauer', name='boatbuilder', type='text', value=boat.boatbuilder) }} - {{ macros::checkbox(label='default_shipmaster_only_steering', name='default_shipmaster_only_steering', id=uuid , checked=boat.default_shipmaster_only_steering) }} - {{ macros::checkbox(label='skull', name='skull', id=uuid , checked=boat.skull) }} - {{ macros::checkbox(label='external', name='external', id=uuid , checked=boat.external) }} -
-
-
- - {% include "includes/delete-icon" %} Löschen - - -
-
+
+
+ +
{{ boat.name }}
+
+ {{ macros::input(label='Name', name='name', type='text', value=boat.name) }} + {{ macros::input(label='Amount Seats', name='amount_seats', type='number', min=0, value=boat.amount_seats) }} + {{ macros::select(data=locations, label='location', select_name='location_id', selected_id=boat.location_id) }} + {{ macros::select(data=users, label='users', select_name='owner', selected_id=boat.owner, default="Vereinsboot") }} + {{ macros::input(label='Baujahr', name='year_built', type='number', min=1950, value=boat.year_built) }} + {{ macros::input(label='Bootsbauer', name='boatbuilder', type='text', value=boat.boatbuilder) }} + {{ macros::checkbox(label='default_shipmaster_only_steering', name='default_shipmaster_only_steering', id=uuid , checked=boat.default_shipmaster_only_steering) }} + {{ macros::checkbox(label='skull', name='skull', id=uuid , checked=boat.skull) }} + {{ macros::checkbox(label='external', name='external', id=uuid , checked=boat.external) }} +
+
+
+ + {% include "includes/delete-icon" %} + Löschen + + +
+
{% endmacro edit %} diff --git a/templates/includes/funnel-icon.html.tera b/templates/includes/funnel-icon.html.tera index 2bbab68..f83d29f 100644 --- a/templates/includes/funnel-icon.html.tera +++ b/templates/includes/funnel-icon.html.tera @@ -1,3 +1,3 @@ - - - \ No newline at end of file + + + diff --git a/templates/includes/lock-icon.html.tera b/templates/includes/lock-icon.html.tera index 6b52f1f..7d9a496 100644 --- a/templates/includes/lock-icon.html.tera +++ b/templates/includes/lock-icon.html.tera @@ -1,3 +1,3 @@ -
-
- - Hü {{ loggedin_user.name }} - -
+
+
-
+ + + + + Userverwaltung + + {% endif %} + + + + + + + Ausloggen + +
+ + +
{% endmacro header %} {% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='') %} -
- - -
+
+ + +
{% endmacro input %} {% macro checkbox(label, name, id='', checked=false, class='') %} - + {% endmacro checkbox %} {% macro select(data, select_name='trip_type', default='', selected_id='', display='', extras='', class='') %} - {% if display == '' %} - {% set display = ["name"] %} - {% endif %} - + {% if display == '' %} + {% set display = ["name"] %} + {% endif %} + {% endmacro select %} - {% macro alert(message, type, class='') %} -
- {{ message }} -
+
+ {{ message }} +
{% endmacro alert %} {% macro box(participants, empty_seats='', header='Freie Plätze:', text='Keine Ruderer angemeldet', bg='primary-600', color='white') %} -
{{ header }} {{ empty_seats }}
-
- {% if participants | length > 0 %} - {% for rower in participants %} - {{ rower.name }} {% if rower.is_guest %} (Gast) {% endif %}
- {% endfor %} - {% else %} - {{ text }} - {% endif %} -
+
{{ header }} + {{ empty_seats }}
+
+ {% if participants | length > 0 %} + {% for rower in participants %} + {{ rower.name }} + {% if rower.is_guest %} + (Gast) + {% endif %} +
+ {% endfor %} + {% else %} + {{ text }} + {% endif %} +
{% endmacro box %} {% macro faq(question, answer) %} -
-

- {{ question }} -

-

{{ answer | safe }}

-
+
+

+ {{ question }} +

+

{{ answer | safe }}

+
{% endmacro faq %} diff --git a/templates/includes/plus-icon.html.tera b/templates/includes/plus-icon.html.tera index d2cf210..1ce5dee 100644 --- a/templates/includes/plus-icon.html.tera +++ b/templates/includes/plus-icon.html.tera @@ -1,3 +1,3 @@ - - + + diff --git a/templates/includes/question-icon.html.tera b/templates/includes/question-icon.html.tera index 5d194e4..1726145 100644 --- a/templates/includes/question-icon.html.tera +++ b/templates/includes/question-icon.html.tera @@ -1 +1,3 @@ - + + + diff --git a/templates/index.html.tera b/templates/index.html.tera index 0f6eed6..833c883 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -3,284 +3,286 @@ {% extends "base" %} {% block content %} -
- {% if flash %} - {{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }} - {% endif %} +
+ {% if flash %} + {{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }} + {% endif %} -

Ausfahrten

+

Ausfahrten

- {% include "includes/buttons" %} + {% include "includes/buttons" %} - {% for day in days %} - {% set amount_trips = day.planned_events | length + day.trips | length %} - {% set_global day_cox_needed = false %} - {% if day.planned_events | length > 0 %} - {% for planned_event in day.planned_events %} - {% if planned_event.cox_needed %} - {% set_global day_cox_needed = true %} - {% endif %} - {% endfor %} - {% endif %} + {% for day in days %} + {% set amount_trips = day.planned_events | length + day.trips | length %} + {% set_global day_cox_needed = false %} + {% if day.planned_events | length > 0 %} + {% for planned_event in day.planned_events %} + {% if planned_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") }} -

+
+
+

{{ day.day| date(format="%d.%m.%Y") }} + {{ day.day | date(format="%A", locale="de_AT") }} +

- {% if day.planned_events | length > 0 or day.trips | length > 0 %} -
+ {% if day.planned_events | length > 0 or day.trips | length > 0 %} +
- {# --- START Events --- #} - {% if day.planned_events | length > 0 %} - {% for planned_event in day.planned_events | sort(attribute="planned_starting_time") %} - {% set amount_cur_cox = planned_event.cox | length %} - {% set amount_cox_missing = planned_event.planned_amount_cox - amount_cur_cox %} -
-
-
- - {{ planned_event.planned_starting_time }} Uhr - - ({{ planned_event.name }}{% if planned_event.trip_type %} - {{ planned_event.trip_type.icon | safe }}{{ planned_event.trip_type.name }}{% endif %})
+ {# --- START Events --- #} + {% if day.planned_events | length > 0 %} + {% for planned_event in day.planned_events | sort(attribute="planned_starting_time") %} + {% set amount_cur_cox = planned_event.cox | length %} + {% set amount_cox_missing = planned_event.planned_amount_cox - amount_cur_cox %} +
+
+
+ + {{ planned_event.planned_starting_time }} + Uhr + + ({{ planned_event.name }} + {% if planned_event.trip_type %} + - + {{ planned_event.trip_type.icon | safe }}{{ planned_event.trip_type.name }} + {% endif %})
- - Details - -
-
- {# --- START Row Buttons --- #} - {% set_global cur_user_participates = false %} - {% for rower in planned_event.rower%} - {% if rower.name == loggedin_user.name %} - {% set_global cur_user_participates = true %} - {% endif %} - {% endfor %} - {% if cur_user_participates %} - Abmelden - {% endif %} - {% if planned_event.max_people > planned_event.rower | length %} - {% if cur_user_participates == false %} - Mitrudern - {% endif %} - {% endif %} - {# --- END Row Buttons --- #} + + Details + +
+
+ {# --- START Row Buttons --- #} + {% set_global cur_user_participates = false %} + {% for rower in planned_event.rower%} + {% if rower.name == loggedin_user.name %} + {% set_global cur_user_participates = true %} + {% endif %} + {% endfor %} + {% if cur_user_participates %} + Abmelden + {% endif %} + {% if planned_event.max_people > planned_event.rower | length %} + {% if cur_user_participates == false %} + Mitrudern + {% endif %} + {% endif %} + {# --- END Row Buttons --- #} - {# --- START Cox Buttons --- #} - {% if loggedin_user.is_cox %} - {% set_global cur_user_participates = false %} - {% for cox in planned_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 - - {% else %} - - {% include "includes/cox-icon" %} - Steuern - - {% endif %} - {% endif %} - {# --- END Cox Buttons --- #} -
-
+ {# --- START Cox Buttons --- #} + {% if loggedin_user.is_cox %} + {% set_global cur_user_participates = false %} + {% for cox in planned_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 + + {% else %} + + {% include "includes/cox-icon" %} + Steuern + + {% endif %} + {% endif %} + {# --- END Cox Buttons --- #} +
+
- {# --- START Sidebar Content --- #} - + {% endfor %} + {% endif %} + {# --- END Events --- #} -
- {% 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 --- #} - + {# --- START Edit Form --- #} + {% if trip.cox_id == loggedin_user.id %} +
+

Ausfahrt bearbeiten

+
+ {{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=trip.max_people, min='0') }} + {{ macros::input(label='Anmerkungen', name='notes', type='input', value=trip.notes) }} + {{ macros::checkbox(label='Immer anzeigen', name='always_show', id=trip.id,checked=trip.always_show) }} + {{ macros::select(select_name='trip_type', data=trip_types, default='Reguläre Ausfahrt', selected_id=trip.trip_type_id) }} - {# --- START Add Buttons --- #} - {% if loggedin_user.is_admin or loggedin_user.is_cox %} -
- {% if loggedin_user.is_admin %} - - - {% include "includes/plus-icon" %} - - Event - - {% endif %} + + +
+ {% if trip.rower | length == 0 %} + + {% endif %} + {% endif %} + {# --- END Edit Form --- #} +
+
+ {# --- END Sidebar Content --- #} +
+ {% endfor %} + {% endif %} + {# --- END Trips --- #} +
+ {% endif %} +
- {% if loggedin_user.is_cox%} - - - {% include "includes/plus-icon" %} - - Ausfahrt - - {% endif %} -
- {% endif %} - {# --- END Add Buttons --- #} -
- {% endfor %} -
+ {# --- START Add Buttons --- #} + {% if loggedin_user.is_admin or loggedin_user.is_cox %} +
+ {% if loggedin_user.is_admin %} + + + {% include "includes/plus-icon" %} + + Event + + {% endif %} + + {% if loggedin_user.is_cox%} + + + {% include "includes/plus-icon" %} + + Ausfahrt + + {% endif %} +
+ {% endif %} + {# --- END Add Buttons --- #} +
+ {% endfor %} +
{% include "dynamics/sidebar" %} {% if loggedin_user.is_cox %} - {% include "forms/trip" %} + {% include "forms/trip" %} {% endif %} {% if loggedin_user.is_admin %} - {% include "forms/event" %} -{% endif %} - -{% endblock content %} + {% include "forms/event" %} +{% endif %}{% endblock content %} diff --git a/templates/log.completed.html.tera b/templates/log.completed.html.tera index b097213..01cf7e4 100644 --- a/templates/log.completed.html.tera +++ b/templates/log.completed.html.tera @@ -5,12 +5,12 @@ {% block content %} -
-

Logbuch

- {% for log in logs %} - {{ log::show(log=log, state="completed", only_ones=false) }} -
- {% endfor %} -
+
+

Logbuch

+ {% for log in logs %} + {{ log::show(log=log, state="completed", only_ones=false) }} +
+ {% endfor %} +
{% endblock content%} diff --git a/templates/log.html.tera b/templates/log.html.tera index 3df319b..b0b569c 100644 --- a/templates/log.html.tera +++ b/templates/log.html.tera @@ -4,24 +4,24 @@ {% extends "base" %} {% block content %} -{% if flash %} - {{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }} -{% endif %} + {% if flash %} + {{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }} + {% endif %} -
-

Logbuch

-

Neue Ausfahrt starten

- {{ log::new(only_ones=loggedin_user.is_cox==false, allow_any_shipmaster=loggedin_user.is_cox, shipmaster=loggedin_user.id) }} +
+

Logbuch

+

Neue Ausfahrt starten

+ {{ log::new(only_ones=loggedin_user.is_cox==false, allow_any_shipmaster=loggedin_user.is_cox, shipmaster=loggedin_user.id) }} -

Am Wasser

- {% for log in on_water %} - {% if log.shipmaster == loggedin_user.id %} - {{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=loggedin_user.is_cox==false) }} - {% else %} - {{ log::show(log=log, state="on_water", only_ones=true) }} - {% endif %} -
- {% endfor %} -
+

Am Wasser

+ {% for log in on_water %} + {% if log.shipmaster == loggedin_user.id %} + {{ log::show(log=log, state="on_water", allowed_to_close=true, only_ones=loggedin_user.is_cox==false) }} + {% else %} + {{ log::show(log=log, state="on_water", only_ones=true) }} + {% endif %} +
+ {% endfor %} +
{% endblock content%} diff --git a/templates/stat.html.tera b/templates/stat.html.tera index 19d00c9..be200f6 100644 --- a/templates/stat.html.tera +++ b/templates/stat.html.tera @@ -5,12 +5,13 @@ {% block content %} -
-

Statstik

-
    - {% for s in stat %} -
  1. {{s.name}}: {{s.rowed_km}}km
  2. - {% endfor %} -
-
+
+

Statstik

+
    + {% for s in stat %} +
  1. {{s.name}}: + {{s.rowed_km}}km
  2. + {% endfor %} +
+
{% endblock content%}