From d1067988c6cbe03b9d4765f6e393c44a98072ccd Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 21 Mar 2024 19:38:47 +0100 Subject: [PATCH 1/6] update wording --- src/model/logbook.rs | 2 +- src/model/usertrip.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/logbook.rs b/src/model/logbook.rs index b2b6939..9dbbf64 100644 --- a/src/model/logbook.rs +++ b/src/model/logbook.rs @@ -531,7 +531,7 @@ ORDER BY departure DESC db, &user, &format!( - "Neuer Logbucheintrag: Ausfahrt am {}.{}.{} nach {} ({} km)", + "Ausfahrt am {}.{}.{} nach {} ({} km)", dep.day(), dep.month(), dep.year(), diff --git a/src/model/usertrip.rs b/src/model/usertrip.rs index 01cfac4..47603dc 100644 --- a/src/model/usertrip.rs +++ b/src/model/usertrip.rs @@ -75,7 +75,7 @@ impl UserTrip { "{} hat sich für deine Ausfahrt am {} registriert", name_newly_registered_person, trip.day ), - "Registrierung bei Ausfahrt", + "Registrierung bei deiner Ausfahrt", None, ) .await; -- 2.45.2 From 7050d68293f7f350655c267108f935b8a5008d9a Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Thu, 21 Mar 2024 20:42:49 +0100 Subject: [PATCH 2/6] [TASK] style notifications, add rowing icon and refactor menu --- templates/includes/macros.html.tera | 38 +--- templates/includes/rowing-icon.html.tera | 18 ++ templates/index.html.tera | 271 +++++++++++------------ 3 files changed, 154 insertions(+), 173 deletions(-) create mode 100644 templates/includes/rowing-icon.html.tera diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index 497b872..f2f9e5d 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -16,22 +16,12 @@
- - {% include "includes/question-icon" %} - FAQs - {% if "scheckbuch" in loggedin_user.roles and loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} Ausfahrt eintragen Logbuch + {% if "admin" in loggedin_user.roles or "Vorstand" in loggedin_user.roles %} + + Userverwaltung + + {% endif %} {% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} Ergo {% endif %} @@ -78,20 +74,6 @@
{% endif %} - {% if "admin" in loggedin_user.roles or "Vorstand" in loggedin_user.roles %} - - - - - Userverwaltung - - {% endif %} + + + + + + + + + + + + + + + + + diff --git a/templates/index.html.tera b/templates/index.html.tera index 4e86fe4..22dba1a 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -3,197 +3,178 @@ {% block content %}

Ruderassistent

-
-
+ + -
- -
{% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} -
{% endif %} {% if "Donau Linz" in loggedin_user.roles and "Unterstützend" not in loggedin_user.roles and "Förderndes Mitglied" not in loggedin_user.roles %} -
-
{% endif %} {% if "scheckbuch" in loggedin_user.roles %} -
-
{% endif %} {% if "schnupper-betreuer" in loggedin_user.roles %} -
-
{% endif %} {% if "Vorstand" in loggedin_user.roles %} -
-
{% endif %} {% if "admin" in loggedin_user.roles %} - {% endif %} +
{% endblock content %} -- 2.45.2 From 04b09983bcf1ab48eea93e6008bd238ad4b8b530 Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 21 Mar 2024 20:47:48 +0100 Subject: [PATCH 3/6] format with djlint --- templates/includes/macros.html.tera | 338 +++++++++++------------ templates/includes/rowing-icon.html.tera | 38 ++- templates/index.html.tera | 127 +++++---- 3 files changed, 256 insertions(+), 247 deletions(-) diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index f2f9e5d..1c49080 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -16,178 +16,176 @@
-
- {% if "scheckbuch" in loggedin_user.roles and loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} - - {% include "includes/book" %} - Ergo - - - {% endif %} - {% if "scheckbuch" not in loggedin_user.roles %} - - {% include "includes/book" %} - Logbuch - - - {% endif %} - - - - - - - Ausloggen - -
+ + Hü + {{ loggedin_user.name }} + +
+
+ {% if "scheckbuch" in loggedin_user.roles and loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} + + {% include "includes/book" %} + Ergo + + + {% endif %} + {% if "scheckbuch" not in loggedin_user.roles %} + + {% include "includes/book" %} + Logbuch + + + {% endif %} + + + + + + + Ausloggen +
-
-
- {% endmacro header %} - {% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='', pattern='', readonly=false, accept='') %} -
- -
- {% endmacro input %} - {% macro checkbox(label, name, id='', checked=false, class='', disabled=false) %} -
+
+{% endmacro header %} +{% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='', pattern='', readonly=false, accept='') %} +
+ - {% endmacro checkbox %} - {% macro select(label, data, name='trip_type', default='', id='', selected_id='', display='', extras='', class='', wrapper_class='', required=false, show_seats=false, new_last_entry='') %} -
- - {% if display == '' %} - {% set display = ["name"] %} - {% endif %} - -
- {% endmacro select %} - {% macro alert(message, type, class='') %} -
{{ message }}
- {% endmacro alert %} - {% macro box(participants, empty_seats='', header='Freie Plätze:', text='Keine Ruderer angemeldet', bg='primary-600', color='white', trip_details_id='', allow_removing=false) %} -
- {{ header }} - {{ empty_seats }} -
-
- {% if participants | length > 0 %} - {% for rower in participants %} - {{ rower.name }} - {% if rower.is_guest %}(Scheckbuch){% endif %} - {% if rower.is_real_guest %} - (Gast) - {% if allow_removing %} - Abmelden - {% endif %} + +
+{% endmacro input %} +{% macro checkbox(label, name, id='', checked=false, class='', disabled=false) %} + +{% endmacro checkbox %} +{% macro select(label, data, name='trip_type', default='', id='', selected_id='', display='', extras='', class='', wrapper_class='', required=false, show_seats=false, new_last_entry='') %} +
+ + {% if display == '' %} + {% set display = ["name"] %} + {% endif %} + +
+{% endmacro select %} +{% macro alert(message, type, class='') %} +
{{ message }}
+{% endmacro alert %} +{% macro box(participants, empty_seats='', header='Freie Plätze:', text='Keine Ruderer angemeldet', bg='primary-600', color='white', trip_details_id='', allow_removing=false) %} +
+ {{ header }} + {{ empty_seats }} +
+
+ {% if participants | length > 0 %} + {% for rower in participants %} + {{ rower.name }} + {% if rower.is_guest %}(Scheckbuch){% endif %} + {% if rower.is_real_guest %} + (Gast) + {% if allow_removing %} + Abmelden {% endif %} - -
- {% endfor %} - {% else %} - {{ text }} - {% endif %} -
- {% endmacro box %} - {% macro faq(question, answer) %} -
-

{{ question }}

-

{{ answer | safe }}

-
- {% endmacro faq %} + {% endif %} + +
+ {% endfor %} + {% else %} + {{ text }} + {% endif %} +
+{% endmacro box %} +{% macro faq(question, answer) %} +
+

{{ question }}

+

{{ answer | safe }}

+
+{% endmacro faq %} diff --git a/templates/includes/rowing-icon.html.tera b/templates/includes/rowing-icon.html.tera index 504e60b..61201c3 100644 --- a/templates/includes/rowing-icon.html.tera +++ b/templates/includes/rowing-icon.html.tera @@ -1,18 +1,30 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/templates/index.html.tera b/templates/index.html.tera index 22dba1a..7215fc4 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -4,62 +4,57 @@

Ruderassistent

- - + - {% endif %} - {% if "Donau Linz" in loggedin_user.roles and "Unterstützend" not in loggedin_user.roles and "Förderndes Mitglied" not in loggedin_user.roles %} + {% endif %} + {% if "Donau Linz" in loggedin_user.roles and "Unterstützend" not in loggedin_user.roles and "Förderndes Mitglied" not in loggedin_user.roles %} - {% endif %} - {% if "scheckbuch" in loggedin_user.roles %} + {% endif %} + {% if "scheckbuch" in loggedin_user.roles %} - {% endif %} - {% if "schnupper-betreuer" in loggedin_user.roles %} + {% endif %} + {% if "schnupper-betreuer" in loggedin_user.roles %} - {% endif %} - {% if "Vorstand" in loggedin_user.roles %} + {% endif %} + {% if "Vorstand" in loggedin_user.roles %} - {% endif %} - {% if "admin" in loggedin_user.roles %} + {% endif %} + {% if "admin" in loggedin_user.roles %} - {% endif %} + {% endif %} +
- -{% endblock content %} + {% endblock content %} -- 2.45.2 From 3416373b8f99d8e4e679b321eb60d1c7f4ad42f2 Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 21 Mar 2024 19:38:47 +0100 Subject: [PATCH 4/6] update wording --- src/model/logbook.rs | 2 +- src/model/usertrip.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/logbook.rs b/src/model/logbook.rs index b2b6939..9dbbf64 100644 --- a/src/model/logbook.rs +++ b/src/model/logbook.rs @@ -531,7 +531,7 @@ ORDER BY departure DESC db, &user, &format!( - "Neuer Logbucheintrag: Ausfahrt am {}.{}.{} nach {} ({} km)", + "Ausfahrt am {}.{}.{} nach {} ({} km)", dep.day(), dep.month(), dep.year(), diff --git a/src/model/usertrip.rs b/src/model/usertrip.rs index 01cfac4..47603dc 100644 --- a/src/model/usertrip.rs +++ b/src/model/usertrip.rs @@ -75,7 +75,7 @@ impl UserTrip { "{} hat sich für deine Ausfahrt am {} registriert", name_newly_registered_person, trip.day ), - "Registrierung bei Ausfahrt", + "Registrierung bei deiner Ausfahrt", None, ) .await; -- 2.45.2 From 961cdbad095fd4b77b898e26c962192262956529 Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Thu, 21 Mar 2024 20:42:49 +0100 Subject: [PATCH 5/6] [TASK] style notifications, add rowing icon and refactor menu --- templates/includes/macros.html.tera | 38 +--- templates/includes/rowing-icon.html.tera | 18 ++ templates/index.html.tera | 271 +++++++++++------------ 3 files changed, 154 insertions(+), 173 deletions(-) create mode 100644 templates/includes/rowing-icon.html.tera diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index 497b872..f2f9e5d 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -16,22 +16,12 @@
- - {% include "includes/question-icon" %} - FAQs - {% if "scheckbuch" in loggedin_user.roles and loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} Ausfahrt eintragen Logbuch + {% if "admin" in loggedin_user.roles or "Vorstand" in loggedin_user.roles %} + + Userverwaltung + + {% endif %} {% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} Ergo {% endif %} @@ -78,20 +74,6 @@
{% endif %} - {% if "admin" in loggedin_user.roles or "Vorstand" in loggedin_user.roles %} - - - - - Userverwaltung - - {% endif %} + + + + + + + + + + + + + + + + + diff --git a/templates/index.html.tera b/templates/index.html.tera index 4e86fe4..22dba1a 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -3,197 +3,178 @@ {% block content %}

Ruderassistent

-
-
+ + -
- -
{% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} -
{% endif %} {% if "Donau Linz" in loggedin_user.roles and "Unterstützend" not in loggedin_user.roles and "Förderndes Mitglied" not in loggedin_user.roles %} -
-
{% endif %} {% if "scheckbuch" in loggedin_user.roles %} -
-
{% endif %} {% if "schnupper-betreuer" in loggedin_user.roles %} -
-
{% endif %} {% if "Vorstand" in loggedin_user.roles %} -
-
{% endif %} {% if "admin" in loggedin_user.roles %} - {% endif %} +
{% endblock content %} -- 2.45.2 From de1b6b76c999b59bb46d58b384e130455fb0bdf1 Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 21 Mar 2024 20:47:48 +0100 Subject: [PATCH 6/6] format with djlint --- templates/includes/macros.html.tera | 338 +++++++++++------------ templates/includes/rowing-icon.html.tera | 38 ++- templates/index.html.tera | 127 +++++---- 3 files changed, 256 insertions(+), 247 deletions(-) diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index f2f9e5d..1c49080 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -16,178 +16,176 @@
-
- {% if "scheckbuch" in loggedin_user.roles and loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} - - {% include "includes/book" %} - Ergo - - - {% endif %} - {% if "scheckbuch" not in loggedin_user.roles %} - - {% include "includes/book" %} - Logbuch - - - {% endif %} - - - - - - - Ausloggen - -
+ + Hü + {{ loggedin_user.name }} + +
+
+ {% if "scheckbuch" in loggedin_user.roles and loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} + + {% include "includes/book" %} + Ergo + + + {% endif %} + {% if "scheckbuch" not in loggedin_user.roles %} + + {% include "includes/book" %} + Logbuch + + + {% endif %} + + + + + + + Ausloggen +
-
-
- {% endmacro header %} - {% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='', pattern='', readonly=false, accept='') %} -
- -
- {% endmacro input %} - {% macro checkbox(label, name, id='', checked=false, class='', disabled=false) %} -
+
+{% endmacro header %} +{% macro input(label, name, type, required=false, class='rounded-md', value='', min='', hide_label=false, id='', autofocus=false, wrapper_class='', pattern='', readonly=false, accept='') %} +
+ - {% endmacro checkbox %} - {% macro select(label, data, name='trip_type', default='', id='', selected_id='', display='', extras='', class='', wrapper_class='', required=false, show_seats=false, new_last_entry='') %} -
- - {% if display == '' %} - {% set display = ["name"] %} - {% endif %} - -
- {% endmacro select %} - {% macro alert(message, type, class='') %} -
{{ message }}
- {% endmacro alert %} - {% macro box(participants, empty_seats='', header='Freie Plätze:', text='Keine Ruderer angemeldet', bg='primary-600', color='white', trip_details_id='', allow_removing=false) %} -
- {{ header }} - {{ empty_seats }} -
-
- {% if participants | length > 0 %} - {% for rower in participants %} - {{ rower.name }} - {% if rower.is_guest %}(Scheckbuch){% endif %} - {% if rower.is_real_guest %} - (Gast) - {% if allow_removing %} - Abmelden - {% endif %} + +
+{% endmacro input %} +{% macro checkbox(label, name, id='', checked=false, class='', disabled=false) %} + +{% endmacro checkbox %} +{% macro select(label, data, name='trip_type', default='', id='', selected_id='', display='', extras='', class='', wrapper_class='', required=false, show_seats=false, new_last_entry='') %} +
+ + {% if display == '' %} + {% set display = ["name"] %} + {% endif %} + +
+{% endmacro select %} +{% macro alert(message, type, class='') %} +
{{ message }}
+{% endmacro alert %} +{% macro box(participants, empty_seats='', header='Freie Plätze:', text='Keine Ruderer angemeldet', bg='primary-600', color='white', trip_details_id='', allow_removing=false) %} +
+ {{ header }} + {{ empty_seats }} +
+
+ {% if participants | length > 0 %} + {% for rower in participants %} + {{ rower.name }} + {% if rower.is_guest %}(Scheckbuch){% endif %} + {% if rower.is_real_guest %} + (Gast) + {% if allow_removing %} + Abmelden {% endif %} - -
- {% endfor %} - {% else %} - {{ text }} - {% endif %} -
- {% endmacro box %} - {% macro faq(question, answer) %} -
-

{{ question }}

-

{{ answer | safe }}

-
- {% endmacro faq %} + {% endif %} + +
+ {% endfor %} + {% else %} + {{ text }} + {% endif %} +
+{% endmacro box %} +{% macro faq(question, answer) %} +
+

{{ question }}

+

{{ answer | safe }}

+
+{% endmacro faq %} diff --git a/templates/includes/rowing-icon.html.tera b/templates/includes/rowing-icon.html.tera index 504e60b..61201c3 100644 --- a/templates/includes/rowing-icon.html.tera +++ b/templates/includes/rowing-icon.html.tera @@ -1,18 +1,30 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/templates/index.html.tera b/templates/index.html.tera index 22dba1a..7215fc4 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -4,62 +4,57 @@

Ruderassistent

- - + - {% endif %} - {% if "Donau Linz" in loggedin_user.roles and "Unterstützend" not in loggedin_user.roles and "Förderndes Mitglied" not in loggedin_user.roles %} + {% endif %} + {% if "Donau Linz" in loggedin_user.roles and "Unterstützend" not in loggedin_user.roles and "Förderndes Mitglied" not in loggedin_user.roles %} - {% endif %} - {% if "scheckbuch" in loggedin_user.roles %} + {% endif %} + {% if "scheckbuch" in loggedin_user.roles %} - {% endif %} - {% if "schnupper-betreuer" in loggedin_user.roles %} + {% endif %} + {% if "schnupper-betreuer" in loggedin_user.roles %} - {% endif %} - {% if "Vorstand" in loggedin_user.roles %} + {% endif %} + {% if "Vorstand" in loggedin_user.roles %} - {% endif %} - {% if "admin" in loggedin_user.roles %} + {% endif %} + {% if "admin" in loggedin_user.roles %} - {% endif %} + {% endif %} +
- -{% endblock content %} + {% endblock content %} -- 2.45.2