diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index f69b0a0..c204430 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -24,9 +24,9 @@
{% endmacro header %} -{% macro input(label, name, type, required=false, class='rounded-md') %} +{% macro input(label, name, type, required=false, class='rounded-md', value='') %} - + {% endmacro input %} {% macro checkbox(label, name, id='', checked=false) %} diff --git a/templates/index.html.tera b/templates/index.html.tera index a886e81..ff243e1 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -27,7 +27,7 @@ {% set amount_trips = day.planned_events | length + day.trips | length %}
-

{{ 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 %}
@@ -180,35 +180,26 @@
{% if trip.max_people > 0 %} -
{{ trip.max_people }} - {{ - trip.rower | length }} Ruderer können teilnehmen ({{ trip.max_people }})
-
- {% if trip.rower | length > 0 %} - {% for rower in trip.rower %} - {{ rower.name }}
- {% endfor %} - {% else %} - Keine Ruderer angemeldet - {% endif %} -
- {% if trip.cox_id == loggedin_user.id %} - {% if trip.rower | length == 0 %} - - {% endif %} -
-

Edit trip

-
- Ruderer:
- Notes:
- -
-
- {% endif %} + {% set amount_cur_rower = trip.rower | length %} + {{ macros::box(participants=trip.rower, empty_seats=trip.max_people - amount_cur_rower, bg='primary-100', color='black') }} + {% if trip.cox_id == loggedin_user.id %} +
+

Edit trip

+
+ {{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=trip.max_people) }} + {{ macros::input(label='Anmerkungen', name='notes', type='input', required=true, value=trip.notes) }} + +
+
+ {% if trip.rower | length == 0 %} + + {% endif %} + {% endif %} {% endif %}
@@ -276,12 +267,12 @@