diff --git a/frontend/scss/components/_links.scss b/frontend/scss/components/_links.scss index 21d9ab7..ccf00a0 100644 --- a/frontend/scss/components/_links.scss +++ b/frontend/scss/components/_links.scss @@ -10,4 +10,8 @@ &-white { @apply text-white hover:text-primary-100 underline; } + + &-no-underline { + @apply no-underline; + } } diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index 3cf66aa..d9ab018 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -67,115 +67,21 @@ {% for user in users %}
-
- - - - {{ user.name }} - {% if not user.last_access and allowed_to_edit and user.mail %} -
- • Willkommensmail verschicken -
- {% endif %} - {% if user.last_access %}• ⏳ {{ user.last_access | date }}{% endif %} -
- - {% for role in user.roles -%} - {{ role }} - {%- if not loop.last %}, - {% endif -%} - {% endfor %} - -
-
- ✏️ -
- {% if user.pw %} - Passwort zurücksetzen - {% endif %} -
- -
- {% for cluster, cluster_roles in roles | group_by(attribute="cluster") %} - - {# Determine the initially selected role within the cluster #} - {% set_global selected_role_id = "none" %} - {% for role in cluster_roles %} - {% if selected_role_id == "none" and role.name in user.roles %} - {% set_global selected_role_id = role.id %} - {% endif %} - {% endfor %} - {# Set default name to the selected role ID or first role if none selected #} - - {% endfor %} - {% for role in roles %} - {% if not role.cluster %} - {{ macros::checkbox(label=role.name, name="roles[" ~ role.id ~ "]", id=loop.index , checked=role.name in user.roles, disabled=allowed_to_edit == false) }} - {% endif %} - {% 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 %} -
-
+ class="border-t bg-white dark:bg-primary-900 py-3 px-4 relative flex justify-between items-center"> + + + {{ user.name }} + {% if user.last_access %}• ⏳ {{ user.last_access | date }}{% endif %} + + + {% for role in user.roles -%} + {{ role }} + {%- if not loop.last %}, + {% endif -%} + {% endfor %} + + + {% include "includes/pencil" %}
{% endfor %} diff --git a/templates/admin/user/view.html.tera b/templates/admin/user/view.html.tera index da9b22d..673cdf4 100644 --- a/templates/admin/user/view.html.tera +++ b/templates/admin/user/view.html.tera @@ -3,6 +3,10 @@ {% extends "base" %} {% block content %}
+ {% if "admin" in loggedin_user.roles or "Vorstand" in loggedin_user.roles %} + ← Userverwaltung + {% endif %}

{{ user.name }}

@@ -30,7 +34,7 @@ Notizen: to be replaced with activity :-) {% if user.pw and allowed_to_edit %} -
+
Passwort zurücksetzen @@ -60,7 +64,7 @@ {% endif %} -
+
{% if is_clubmember %}
@@ -78,7 +82,7 @@
{% if user.membership_pdf %} - Beitrittserklärung herunterladen + Beitrittserklärung herunterladen ↓ {% else %} ⚠️ Aktuell gibt's keine Beitrittserklärung 😢 {% if allowed_to_edit %} @@ -98,6 +102,9 @@ {% if allowed_to_edit %}
+ @@ -106,6 +113,42 @@
+ +
+ +
+ +
+ + +
+ + +
+
+
{% endif %} {% elif "Scheckbuch" in member %}
diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index 5b8ca6b..d080232 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -198,7 +198,10 @@ function setChoiceByLabel(choicesInstance, label) { {% if pattern %}pattern="{{ pattern }}"{% endif %} readonly /> {% if allowed_to_edit %} - + @@ -244,7 +247,10 @@ function setChoiceByLabel(choicesInstance, label) { {% if new_last_entry %}{% endif %} {% if allowed_to_edit %} - +