From dba1e08c5d1b7a1619f5a4c4af760a74ba1950e7 Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Mon, 24 Jun 2024 16:58:19 +0200 Subject: [PATCH 1/5] [TASK] quick restructure of user screen --- templates/admin/user/index.html.tera | 126 +++++++++++++++------------ 1 file changed, 68 insertions(+), 58 deletions(-) diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index 409de92..09b9b5b 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -36,72 +36,82 @@ placeholder="Suchen nach (Name, [yes|no]-role:, has-[no-]membership-pdf)" /> -
-
+
{% for user in users %}
-
-
- -
+ data-filter="{{ user.name }} {% for role in roles %} {% if role.name in user.roles %} yes-role:{{ role.name }} {% else %} no-role:{{ role.name }} {% endif %} role-{{ role }} {% endfor %} {% if user.membership_pdf %}has-membership-pdf{% else %}has-no-membership-pdf{% endif %}" class="border-t bg-white dark:bg-primary-900 py-3 px-4 relative"> +
+ + + {{ user.name }} {% if user.last_access %} (last access: {{ user.last_access | date }}) {% endif %} - {% if user.pw %} - Passwort zurücksetzen - {% endif %} - {% if not user.last_access and "admin" in loggedin_user.roles %} - Willkommensmail verschicken - {% endif %} -
-
- {% for role in roles %} - {{ macros::checkbox(label=role.name, name="roles[" ~ role.id ~ "]", id=loop.index , checked=role.name in user.roles, disabled=allowed_to_edit == false) }} - {% endfor %} - {% if user.membership_pdf %} - Beitrittserklärung herunterladen - {% else %} - {{ macros::input(label='Beitrittserklärung', name='membership_pdf', id=loop.index, type="file", readonly=allowed_to_edit == false, accept='application/pdf') }} - {% endif %} - {{ macros::input(label='DOB', name='dob', id=loop.index, type="text", value=user.dob, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Weight (kg)', name='weight', id=loop.index, type="text", value=user.weight, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Sex', name='sex', id=loop.index, type="text", value=user.sex, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Mitglied seit', name='member_since_date', id=loop.index, type="text", value=user.member_since_date, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Geburtsdatum', name='birthdate', id=loop.index, type="text", value=user.birthdate, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Mail', name='mail', id=loop.index, type="text", value=user.mail, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Nickname', name='nickname', id=loop.index, type="text", value=user.nickname, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Notizen', name='notes', id=loop.index, type="text", value=user.notes, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Telefon', name='phone', id=loop.index, type="text", value=user.phone, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Adresse', name='address', id=loop.index, type="text", value=user.address, readonly=allowed_to_edit == false) }} - {% if allowed_to_edit %} - {{ macros::select(label="Familie", data=families, name='family_id', selected_id=user.family_id, display=['names'], default="Keine Familie", new_last_entry='Neue Familie anlegen') }} - {% endif %} -
-
- {% if allowed_to_edit %} - - {% endif %} -
+ + + + {{ user.roles }} + + + + +
+ {% if user.pw %} + Passwort zurücksetzen + {% endif %} + {% if not user.last_access and "admin" in loggedin_user.roles %} + Willkommensmail verschicken + {% endif %} +
+ +
+ {% for role in roles %} + {{ macros::checkbox(label=role.name, name="roles[" ~ role.id ~ "]", id=loop.index , checked=role.name in user.roles, disabled=allowed_to_edit == false) }} + {% endfor %} +
+ {% if user.membership_pdf %} + Beitrittserklärung herunterladen + {% else %} + {{ macros::input(label='Beitrittserklärung', name='membership_pdf', id=loop.index, type="file", readonly=allowed_to_edit == false, accept='application/pdf') }} + {% endif %} + {{ macros::input(label='DOB', name='dob', id=loop.index, type="text", value=user.dob, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Weight (kg)', name='weight', id=loop.index, type="text", value=user.weight, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Sex', name='sex', id=loop.index, type="text", value=user.sex, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Mitglied seit', name='member_since_date', id=loop.index, type="text", value=user.member_since_date, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Geburtsdatum', name='birthdate', id=loop.index, type="text", value=user.birthdate, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Mail', name='mail', id=loop.index, type="text", value=user.mail, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Nickname', name='nickname', id=loop.index, type="text", value=user.nickname, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Notizen', name='notes', id=loop.index, type="text", value=user.notes, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Telefon', name='phone', id=loop.index, type="text", value=user.phone, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Adresse', name='address', id=loop.index, type="text", value=user.address, readonly=allowed_to_edit == false) }} + {% if allowed_to_edit %} + {{ macros::select(label="Familie", data=families, name='family_id', selected_id=user.family_id, display=['names'], default="Keine Familie", new_last_entry='Neue Familie anlegen') }} + {% endif %} +
+
+ {% if allowed_to_edit %} + + {% endif %} +
+
{% endfor %} -
{% endblock content %} -- 2.45.2 From 1ad65095689ded0e457b61a3aee8d5e526b1e957 Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 24 Jun 2024 19:56:35 +0200 Subject: [PATCH 2/5] minor visual improvements --- templates/admin/user/index.html.tera | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index 09b9b5b..faca738 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -41,19 +41,20 @@ {% for user in users %}
-
+
{{ user.name }} {% if user.last_access %} - (last access: - {{ user.last_access | date }}) + • ⏳ {{ user.last_access | date }} {% endif %} - {{ user.roles }} + {% for role in user.roles %} + {{ role }}{% if not loop.last %}, {% endif %} + {% endfor %} -- 2.45.2 From bd6fbe772e23f2653074e210886e35c1ba591cb4 Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Tue, 16 Jul 2024 14:32:40 +0200 Subject: [PATCH 3/5] [BUGFIX] vorstand-no-admin.png --- templates/admin/user/index.html.tera | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index faca738..16371e8 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -41,20 +41,30 @@ {% for user in users %}
-
+
{{ user.name }} + {% if not user.last_access and "admin" in loggedin_user.roles and user.mail %} +
+ • Willkommensmail verschicken +
+ {% endif %} + {% if user.last_access %} - • ⏳ {{ user.last_access | date }} + • ⏳ {{ user.last_access | date }} {% endif %}
- {% for role in user.roles %} - {{ role }}{% if not loop.last %}, {% endif %} - {% endfor %} + {% for role in user.roles %} + {{ role }}{% if not loop.last %}, {% endif %} + {% endfor %}
@@ -64,12 +74,8 @@ enctype="multipart/form-data" class="w-full mt-2"> {% if user.pw %} - Passwort zurücksetzen - {% endif %} - {% if not user.last_access and "admin" in loggedin_user.roles %} - Willkommensmail verschicken + Passwort zurücksetzen {% endif %}
-- 2.45.2 From 16fbeea81b005f53d18f326a285093562d52b2e0 Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Tue, 16 Jul 2024 14:38:27 +0200 Subject: [PATCH 4/5] [BUGFIX] only-event.png --- templates/planned.html.tera | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/templates/planned.html.tera b/templates/planned.html.tera index 84ae217..33c4394 100644 --- a/templates/planned.html.tera +++ b/templates/planned.html.tera @@ -391,7 +391,7 @@
{# --- START Add Buttons --- #} {% if "manage_events" in loggedin_user.roles or "cox" in loggedin_user.roles %} -
+
{% if "manage_events" in loggedin_user.roles %} + class="relative inline-block w-full bg-primary-900 hover:bg-primary-950 focus:bg-primary-950 dark:bg-primary-950 text-white py-2 text-sm font-semibold + {% if "cox" in loggedin_user.roles %} + rounded-bl-md + {% else %} + rounded-b-md + {% endif %} + "> {% include "includes/plus-icon" %} Event -- 2.45.2 From 0e5fd25e61cf711fac42eefc497ecc1a7f2bbabe Mon Sep 17 00:00:00 2001 From: philipp Date: Tue, 16 Jul 2024 16:38:12 +0100 Subject: [PATCH 5/5] format tera files --- templates/admin/user/index.html.tera | 134 +++++++++++++-------------- templates/planned.html.tera | 12 +-- 2 files changed, 69 insertions(+), 77 deletions(-) diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index 16371e8..b2a8f9b 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -36,89 +36,87 @@ placeholder="Suchen nach (Name, [yes|no]-role:, has-[no-]membership-pdf)" />
-
- {% for user in users %} -
-
- +
+ {% for user in users %} +
+
+ {{ user.name }} - {% if not user.last_access and "admin" in loggedin_user.roles and user.mail %} -
- • Willkommensmail verschicken -
- {% endif %} - - {% if user.last_access %} - • ⏳ {{ user.last_access | date }} + • Willkommensmail verschicken + {% endif %} + {% if user.last_access %}• ⏳ {{ user.last_access | date }}{% endif %}
- - {% for role in user.roles %} - {{ role }}{% if not loop.last %}, {% endif %} - {% endfor %} + {% for role in user.roles %} + {{ role }} + {% if not loop.last %},{% endif %} + {% endfor %}
-
- {% if user.pw %} - Passwort zurücksetzen - {% endif %} -
- -
- {% for role in roles %} - {{ macros::checkbox(label=role.name, name="roles[" ~ role.id ~ "]", id=loop.index , checked=role.name in user.roles, disabled=allowed_to_edit == false) }} - {% endfor %} -
- {% if user.membership_pdf %} - Beitrittserklärung herunterladen - {% else %} - {{ macros::input(label='Beitrittserklärung', name='membership_pdf', id=loop.index, type="file", readonly=allowed_to_edit == false, accept='application/pdf') }} - {% endif %} - {{ macros::input(label='DOB', name='dob', id=loop.index, type="text", value=user.dob, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Weight (kg)', name='weight', id=loop.index, type="text", value=user.weight, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Sex', name='sex', id=loop.index, type="text", value=user.sex, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Mitglied seit', name='member_since_date', id=loop.index, type="text", value=user.member_since_date, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Geburtsdatum', name='birthdate', id=loop.index, type="text", value=user.birthdate, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Mail', name='mail', id=loop.index, type="text", value=user.mail, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Nickname', name='nickname', id=loop.index, type="text", value=user.nickname, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Notizen', name='notes', id=loop.index, type="text", value=user.notes, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Telefon', name='phone', id=loop.index, type="text", value=user.phone, readonly=allowed_to_edit == false) }} - {{ macros::input(label='Adresse', name='address', id=loop.index, type="text", value=user.address, readonly=allowed_to_edit == false) }} - {% if allowed_to_edit %} - {{ macros::select(label="Familie", data=families, name='family_id', selected_id=user.family_id, display=['names'], default="Keine Familie", new_last_entry='Neue Familie anlegen') }} - {% endif %} -
-
- {% if allowed_to_edit %} - - {% endif %} -
-
-
- {% endfor %} + {% if user.pw %} + Passwort zurücksetzen + {% endif %} +
+ +
+ {% for role in roles %} + {{ macros::checkbox(label=role.name, name="roles[" ~ role.id ~ "]", id=loop.index , checked=role.name in user.roles, disabled=allowed_to_edit == false) }} + {% endfor %} +
+ {% if user.membership_pdf %} + Beitrittserklärung herunterladen + {% else %} + {{ macros::input(label='Beitrittserklärung', name='membership_pdf', id=loop.index, type="file", readonly=allowed_to_edit == false, accept='application/pdf') }} + {% endif %} + {{ macros::input(label='DOB', name='dob', id=loop.index, type="text", value=user.dob, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Weight (kg)', name='weight', id=loop.index, type="text", value=user.weight, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Sex', name='sex', id=loop.index, type="text", value=user.sex, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Mitglied seit', name='member_since_date', id=loop.index, type="text", value=user.member_since_date, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Geburtsdatum', name='birthdate', id=loop.index, type="text", value=user.birthdate, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Mail', name='mail', id=loop.index, type="text", value=user.mail, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Nickname', name='nickname', id=loop.index, type="text", value=user.nickname, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Notizen', name='notes', id=loop.index, type="text", value=user.notes, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Telefon', name='phone', id=loop.index, type="text", value=user.phone, readonly=allowed_to_edit == false) }} + {{ macros::input(label='Adresse', name='address', id=loop.index, type="text", value=user.address, readonly=allowed_to_edit == false) }} + {% if allowed_to_edit %} + {{ macros::select(label="Familie", data=families, name='family_id', selected_id=user.family_id, display=['names'], default="Keine Familie", new_last_entry='Neue Familie anlegen') }} + {% endif %} +
+
+ {% if allowed_to_edit %} + + {% endif %} + +
+
+ {% endfor %}
{% endblock content %} diff --git a/templates/planned.html.tera b/templates/planned.html.tera index 33c4394..84ceb49 100644 --- a/templates/planned.html.tera +++ b/templates/planned.html.tera @@ -391,16 +391,10 @@
{# --- START Add Buttons --- #} {% if "manage_events" in loggedin_user.roles or "cox" in loggedin_user.roles %} -
+
{% if "manage_events" in loggedin_user.roles %} -