diff --git a/frontend/main.ts b/frontend/main.ts index e434a6e..dfe8134 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -297,7 +297,7 @@ function initSearch() { } function filterElements(input: string) { - const elements = document.querySelectorAll('form[data-filterable="true"]'); + const elements = document.querySelectorAll('div[data-filterable="true"]'); let resultWrapper = document.querySelector('#filter-result-js'), amountShownElements = 0; diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index f82955c..91b4543 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -39,33 +39,35 @@
{% for user in users %} -
-
- -
{{ user.name }} - {% if user.last_access %} - (last access: - {{ user.last_access | date }}) - {% endif %} -
-
- {{ macros::checkbox(label='Scheckbuch', 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='Technical', name='is_tech', id=loop.index , checked=user.is_tech) }} - {{ macros::checkbox(label='Admin', name='is_admin', id=loop.index , checked=user.is_admin) }} -
- {% if user.pw %} - Passwort zurücksetzen - {% endif %} -
- -
+
+
+
+ +
{{ user.name }} + {% if user.last_access %} + (last access: + {{ user.last_access | date }}) + {% endif %} +
+
+ {{ macros::checkbox(label='Scheckbuch', 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='Technical', name='is_tech', id=loop.index , checked=user.is_tech) }} + {{ macros::checkbox(label='Admin', name='is_admin', id=loop.index , checked=user.is_admin) }} +
+ {% if user.pw %} + Passwort zurücksetzen + {% endif %} +
+ +
+
{% endfor %}
diff --git a/templates/includes/forms/log.html.tera b/templates/includes/forms/log.html.tera index e4f643a..c16b946 100644 --- a/templates/includes/forms/log.html.tera +++ b/templates/includes/forms/log.html.tera @@ -188,50 +188,43 @@ {% endmacro show %} -{% macro show_old(log, state, allowed_to_close=false, only_ones) %} - Bootsname: - {{ log.boat.name }}
- Schiffsführer: - {{ log.shipmaster_user.name }}
- {% if log.shipmaster_only_steering %} - Schiffsführer steuert nur - {% endif %} - Weggefahren: - {{ log.departure }}
- {% if state == "completed" %} - Angekommen: - {{ log.arrival}}
- {% endif %} - {% set amount_rowers = log.rowers | length %} - {% set amount_guests = log.boat.amount_seats - amount_rowers -1 %} - {% if allowed_to_close and state == "on_water" %} - {{ log::home(log=log, only_ones=only_ones) }} - {% else %} - Ziel: - {{ log.destination }}
- {% if state == "completed" %} - Km: - {{ log.distance_in_km }}
- {% endif %} - {% if log.comments %} - Kommentare: - {{ log.comments }}
- {% endif %} - {% if log.logtype %} - Logtype: - {{ log.logtype }}
- {% endif %} - {% if amount_guests > 0 or log.rowers | length > 0 %} - Ruderer: - {% endif %} - {% if amount_guests > 0 %} - {{ amount_guests }} - Gäste (ohne Account) - {% endif %} - {% for rower in log.rowers %} - {{ rower.name }} - {% endfor %} - {% endif %} +{% macro show_old(log, state, allowed_to_close=false, only_ones, index) %} +
+
+ {{ log.boat.name }} ({{ log.shipmaster_user.name }}{% if log.shipmaster_only_steering %} - handgesteuer {% endif %}) + {{ log.departure | date(format='%d.%m.%Y - %H:%M') }} {% if state == "completed" %}- {{ log.arrival | date(format='%d.%m.%Y - %H:%M') }}{% endif %} + {% set amount_rowers = log.rowers | length %} + {% set amount_guests = log.boat.amount_seats - amount_rowers -1 %} + {% if allowed_to_close and state == "on_water" %} + {{ log::home(log=log, only_ones=only_ones) }} + {% else %} +
+ {{ log.destination }} + {% if state == "completed" %} + ({{ log.distance_in_km }} km) + {% endif %} +
+ {% if amount_guests > 0 or log.rowers | length > 0 %} + Ruderer: + {% endif %} + {% if amount_guests > 0 %} + {{ amount_guests }} + Gäste (ohne Account) + {% endif %} + {% for rower in log.rowers %} + {{ rower.name }} + {% endfor %} + {% if log.comments %} + Kommentare: + {{ log.comments }}
+ {% endif %} + {% if log.logtype %} + Logtype: + {{ log.logtype }}
+ {% endif %} + {% endif %} +
+
{% endmacro show_old %} {% macro home(log, only_ones) %} diff --git a/templates/log.completed.html.tera b/templates/log.completed.html.tera index 5246fcb..cc9aaf0 100644 --- a/templates/log.completed.html.tera +++ b/templates/log.completed.html.tera @@ -7,10 +7,18 @@

Logbuch

- {% for log in logs %} - {{ log::show_old(log=log, state="completed", only_ones=false) }} -
- {% endfor %} + +
+
+ + +
+ +
+ {% for log in logs %} + {{ log::show_old(log=log, state="completed", only_ones=false, index=loop.index) }} + {% endfor %} +
{% endblock content%} diff --git a/templates/stat.html.tera b/templates/stat.html.tera index be200f6..6152ae6 100644 --- a/templates/stat.html.tera +++ b/templates/stat.html.tera @@ -6,11 +6,13 @@
-

Statstik

-
    +

    Statistik

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