Compare commits

..

No commits in common. "705f2ddc52e95cfd40cdbcc2be49cf551b8836b4" and "45004567ed83f0796a6beecb525e70b8de336f01" have entirely different histories.

View File

@ -36,82 +36,72 @@
placeholder="Suchen nach (Name, [yes|no]-role:<name>, has-[no-]membership-pdf)" /> placeholder="Suchen nach (Name, [yes|no]-role:<name>, has-[no-]membership-pdf)" />
</div> </div>
<!-- END filterBar --> <!-- END filterBar -->
<div id="filter-result-js" <div class="bg-primary-100 dark:bg-primary-950 p-3 rounded-b-md grid gap-4">
class="search-result"></div> <div id="filter-result-js"
class="text-primary-950 dark:text-white text-right"></div>
{% for user in users %} {% for user in users %}
<div data-filterable="true" <div data-filterable="true"
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"> 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 %} ">
<details class="block"> <form action="/admin/user"
<summary> method="post"
<span class="text-black dark:text-white cursor-pointer"> enctype="multipart/form-data"
<span class="font-bold"> class="bg-white dark:bg-primary-900 p-3 rounded-md w-full">
<div class="w-full grid gap-3">
<input type="hidden" name="id" value="{{ user.id }}" />
<div class="font-bold mb-1 text-black dark:text-white">
{{ user.name }} {{ user.name }}
{% if user.last_access %} {% if user.last_access %}
(last access: (last access:
{{ user.last_access | date }}) {{ user.last_access | date }})
{% endif %} {% endif %}
</span> {% if user.pw %}
<a class="block mt-1 font-normal text-primary-600 dark:text-primary-200 hover:text-primary-900 dark:hover:text-primary-300 underline"
<small class="block text-gray-600 dark:text-gray-100"> href="/admin/user/{{ user.id }}/reset-pw">Passwort zurücksetzen</a>
{{ user.roles }} {% endif %}
</small> {% if not user.last_access and "admin" in loggedin_user.roles %}
</span> <a class="block mt-1 font-normal text-primary-600 dark:text-primary-200 hover:text-primary-900 dark:hover:text-primary-300 underline"
</summary> href="/admin/user/{{ user.id }}/send-welcome-mail">Willkommensmail verschicken</a>
{% endif %}
<form action="/admin/user" </div>
method="post" <div class="grid sm:grid-cols-2 lg:grid-cols-4 gap-3">
enctype="multipart/form-data" {% for role in roles %}
class="w-full mt-2"> {{ macros::checkbox(label=role.name, name="roles[" ~ role.id ~ "]", id=loop.index , checked=role.name in user.roles, disabled=allowed_to_edit == false) }}
{% if user.pw %} {% endfor %}
<a class="block my-1 font-normal text-primary-600 dark:text-primary-200 hover:text-primary-900 dark:hover:text-primary-300 underline" {% if user.membership_pdf %}
href="/admin/user/{{ user.id }}/reset-pw">Passwort zurücksetzen</a> <a href="/admin/user/{{ user.id }}/membership"
{% endif %} class="text-black dark:text-white">Beitrittserklärung herunterladen</a>
{% if not user.last_access and "admin" in loggedin_user.roles %} {% else %}
<a class="block my-1 font-normal text-primary-600 dark:text-primary-200 hover:text-primary-900 dark:hover:text-primary-300 underline" {{ macros::input(label='Beitrittserklärung', name='membership_pdf', id=loop.index, type="file", readonly=allowed_to_edit == false, accept='application/pdf') }}
href="/admin/user/{{ user.id }}/send-welcome-mail">Willkommensmail verschicken</a> {% endif %}
{% endif %} {{ macros::input(label='DOB', name='dob', id=loop.index, type="text", value=user.dob, readonly=allowed_to_edit == false) }}
<div class="w-full grid gap-3 mt-3"> {{ macros::input(label='Weight (kg)', name='weight', id=loop.index, type="text", value=user.weight, readonly=allowed_to_edit == false) }}
<input type="hidden" name="id" value="{{ user.id }}" /> {{ macros::input(label='Sex', name='sex', id=loop.index, type="text", value=user.sex, readonly=allowed_to_edit == false) }}
<div class="grid sm:grid-cols-2 lg:grid-cols-4 gap-3"> {{ macros::input(label='Mitglied seit', name='member_since_date', id=loop.index, type="text", value=user.member_since_date, readonly=allowed_to_edit == false) }}
{% for role in roles %} {{ macros::input(label='Geburtsdatum', name='birthdate', id=loop.index, type="text", value=user.birthdate, readonly=allowed_to_edit == false) }}
{{ macros::checkbox(label=role.name, name="roles[" ~ role.id ~ "]", id=loop.index , checked=role.name in user.roles, disabled=allowed_to_edit == false) }} {{ macros::input(label='Mail', name='mail', id=loop.index, type="text", value=user.mail, readonly=allowed_to_edit == false) }}
{% endfor %} {{ macros::input(label='Nickname', name='nickname', id=loop.index, type="text", value=user.nickname, readonly=allowed_to_edit == false) }}
<hr class="sm:col-span-2 lg:col-span-4 my-3"/> {{ macros::input(label='Notizen', name='notes', id=loop.index, type="text", value=user.notes, readonly=allowed_to_edit == false) }}
{% if user.membership_pdf %} {{ macros::input(label='Telefon', name='phone', id=loop.index, type="text", value=user.phone, readonly=allowed_to_edit == false) }}
<a href="/admin/user/{{ user.id }}/membership" {{ macros::input(label='Adresse', name='address', id=loop.index, type="text", value=user.address, readonly=allowed_to_edit == false) }}
class="text-black dark:text-white">Beitrittserklärung herunterladen</a> {% if allowed_to_edit %}
{% else %} {{ 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') }}
{{ macros::input(label='Beitrittserklärung', name='membership_pdf', id=loop.index, type="file", readonly=allowed_to_edit == false, accept='application/pdf') }} {% endif %}
{% endif %} </div>
{{ macros::input(label='DOB', name='dob', id=loop.index, type="text", value=user.dob, readonly=allowed_to_edit == false) }} </div>
{{ macros::input(label='Weight (kg)', name='weight', id=loop.index, type="text", value=user.weight, readonly=allowed_to_edit == false) }} {% if allowed_to_edit %}
{{ macros::input(label='Sex', name='sex', id=loop.index, type="text", value=user.sex, readonly=allowed_to_edit == false) }} <div class="mt-3 text-right">
{{ macros::input(label='Mitglied seit', name='member_since_date', id=loop.index, type="text", value=user.member_since_date, readonly=allowed_to_edit == false) }} <a href="/admin/user/{{ user.id }}/delete"
{{ macros::input(label='Geburtsdatum', name='birthdate', id=loop.index, type="text", value=user.birthdate, readonly=allowed_to_edit == false) }} class="w-28 btn btn-alert"
{{ macros::input(label='Mail', name='mail', id=loop.index, type="text", value=user.mail, readonly=allowed_to_edit == false) }} onclick="return confirm('Wirklich löschen?');">
{{ macros::input(label='Nickname', name='nickname', id=loop.index, type="text", value=user.nickname, readonly=allowed_to_edit == false) }} {% include "includes/delete-icon" %}
{{ macros::input(label='Notizen', name='notes', id=loop.index, type="text", value=user.notes, readonly=allowed_to_edit == false) }} Löschen
{{ macros::input(label='Telefon', name='phone', id=loop.index, type="text", value=user.phone, readonly=allowed_to_edit == false) }} </a>
{{ macros::input(label='Adresse', name='address', id=loop.index, type="text", value=user.address, readonly=allowed_to_edit == false) }} <input value="Ändern" type="submit" class="w-28 btn btn-primary ml-1" />
{% if allowed_to_edit %} </div>
{{ 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 %}
{% endif %} </form>
</div>
</div>
{% if allowed_to_edit %}
<div class="mt-3 text-right">
<a href="/admin/user/{{ user.id }}/delete"
class="w-28 btn btn-alert"
onclick="return confirm('Wirklich löschen?');">
{% include "includes/delete-icon" %}
Löschen
</a>
<input value="Ändern" type="submit" class="w-28 btn btn-primary ml-1" />
</div>
{% endif %}
</form>
</details>
</div> </div>
{% endfor %} {% endfor %}
</div>
</div> </div>
{% endblock content %} {% endblock content %}