101 lines
3.9 KiB
Twig
101 lines
3.9 KiB
Twig
{% extends 'admin/layout.html.twig' %}
|
|
|
|
{% block title %}Administrative Benutzer:innen{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1 class="text-2xl font-bold pb-8">
|
|
Administrative Benutzer:innen
|
|
</h1>
|
|
<div class="data-table-wrapper">
|
|
<div class="data-table-wrapper__inner">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
Name
|
|
</th>
|
|
<th>
|
|
Vorname
|
|
</th>
|
|
<th>
|
|
E-Mail
|
|
</th>
|
|
<th>
|
|
Rolle(n)
|
|
</th>
|
|
<th>
|
|
Superadmin
|
|
</th>
|
|
<th>
|
|
Status
|
|
</th>
|
|
<th>
|
|
Letzter Login
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for user in users %}
|
|
<tr>
|
|
<td>
|
|
{{ user.lastName }}
|
|
</td>
|
|
<td>
|
|
{{ user.firstName }}
|
|
</td>
|
|
<td>
|
|
{{ user.email }}
|
|
</td>
|
|
<td>
|
|
{% set grantedRoles = user.assignedRoles|map(role => constant('App\\Entity\\User::ROLES')[role]) %}
|
|
{{ grantedRoles is empty ? '-' : grantedRoles|join(', ') }}
|
|
{% for label in user.nominatedRoles %}
|
|
<span class="inline-block mt-1 py-1 px-2 text-xs bg-amber-500 text-gray-700 rounded-md">
|
|
{{ label }} angefordert
|
|
</span>
|
|
{% endfor %}
|
|
</td>
|
|
<td class="text-center">
|
|
{% if user.superAdmin %}
|
|
{{ icon('check', 'w-4 h-4 inline-block') }}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if user.disabled %}
|
|
<span class="inline-block py-1 px-2 text-xs bg-red-500 text-white">
|
|
gesp. am {{ user.disabledAt|date('d.m.Y') }}
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{{ user.lastLoginAt ? user.lastLoginAt|date('d.m.Y, H:i') : '-' }}
|
|
</td>
|
|
<td>
|
|
<div class="flex items-center space-x-2">
|
|
{% if is_granted('CAN_IMPERSONATE', user) %}
|
|
<a href="{{ path('app_index', { '_switch_user': user.email }) }}">
|
|
{{ icon('mask', 'w-4 h-4') }}
|
|
</a>
|
|
{% endif %}
|
|
{% if is_granted('CAN_EDIT_USER', user) %}
|
|
<a href="{{ path('app_admin_system_user_edit', { 'id': user.id }) }}">
|
|
{{ icon('edit') }}
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="8">
|
|
Keine Daten...
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|