move block
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled

This commit is contained in:
Philipp Hofer 2025-05-03 12:57:49 +02:00
parent 4d95282e58
commit cfd3c6200f
2 changed files with 55 additions and 48 deletions

Binary file not shown.

View File

@ -31,54 +31,6 @@
</form>
<span>Notizen: to be replaced with activity :-)</span>
</div>
<div class="py-3">
Rollen:
<ul>
{% for role in user.proper_roles -%}
{% if not role.cluster and not role.hide_in_lists %}
<li class="flex my-2 w-full justify-between items-center hover:bg-gray-100">
<span>
<strong>
{% if role.formatted_name %}
{{ role.formatted_name }}
{% else %}
{{ role.name }}
{% endif %}
</strong><br/><small>{{ role.desc }}</small>
</span>
{% if allowed_to_edit %}
<a href="/admin/user/{{ user.id }}/remove-role/{{ role.id }}"
onclick="return confirm('Willst du die Rolle \'{{ role.name }}\' von {{ user.name }} wirklich entfernen?');">🗑️</a>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
{% if allowed_to_edit %}
<details>
<summary>+ Rolle</summary>
<form action="/admin/user/{{ user.id }}/add-role" method="post">
<fieldset>
<select name="role_id">
{% for role in roles %}
{% if not role.cluster and role not in user.proper_roles and not role.hide_in_lists %}
<option value="{{ role.id }}">
{% if role.formatted_name %}
{{ role.formatted_name }}
{% else %}
{{ role.name }}
{% endif %}
{% if role.desc %}({{ role.desc }}){% endif %}
</option>
{% endif %}
{% endfor %}
</select>
<input value="Rolle hinzufügen" type="submit" class="btn btn-primary ml-1" />
</fieldset>
</form>
</details>
{% endif %}
</div>
</div>
</div>
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
@ -196,6 +148,61 @@
{% endif %}
</div>
</div>
{% if is_clubmember %}
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert">
<h2 class="h2">Rollen</h2>
<div class="mx-2 divide-y divide-gray-200 dark:divide-primary-600">
<div class="py-3">
<ul>
{% for role in user.proper_roles -%}
{% if not role.cluster and not role.hide_in_lists %}
<li class="flex my-2 w-full justify-between items-center hover:bg-gray-100">
<span>
<strong>
{% if role.formatted_name %}
{{ role.formatted_name }}
{% else %}
{{ role.name }}
{% endif %}
</strong><br/><small>{{ role.desc }}</small>
</span>
{% if allowed_to_edit %}
<a href="/admin/user/{{ user.id }}/remove-role/{{ role.id }}"
onclick="return confirm('Willst du die Rolle \'{{ role.name }}\' von {{ user.name }} wirklich entfernen?');">🗑️</a>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
{% if allowed_to_edit %}
<details>
<summary>+ Rolle</summary>
<form action="/admin/user/{{ user.id }}/add-role" method="post">
<fieldset>
<select name="role_id">
{% for role in roles %}
{% if not role.cluster and role not in user.proper_roles and not role.hide_in_lists %}
<option value="{{ role.id }}">
{% if role.formatted_name %}
{{ role.formatted_name }}
{% else %}
{{ role.name }}
{% endif %}
{% if role.desc %}({{ role.desc }}){% endif %}
</option>
{% endif %}
{% endfor %}
</select>
<input value="Rolle hinzufügen" type="submit" class="btn btn-primary ml-1" />
</fieldset>
</form>
</details>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% if supposed_to_pay %}
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert">