Easy_solution/templates/user/index.html.twig

48 lines
1.5 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}User Profile{% endblock %}
{% block body %}
<div class="w-100 h-100 p-5 m-auto " data-controller="user">
<div class="d-flex justify-content-between align-items-center mb-4">
<h1>Gestion Utilisateurs</h1>
<a href="{{ path('user_new') }}" class="btn btn-primary">Ajouter un utilisateur</a>
</div>
<table class="table align-middle shadow">
<thead class="table-light shadow-sm">
<tr>
<th>Picture</th>
<th>Surname</th>
<th>Name</th>
<th>Email</th>
<th>Visualiser</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td></td>
<td>{{ user.surname }}</td>
<td>{{ user.name }}</td>
<td>{{ user.email }}</td>
<td>
<a href="{{ path('user_show', {'id': user.id}) }}" class="p-3 align-middle">
<i class="icon-grid menu-icon color-primary">
{{ ux_icon('fa6-regular:eye', {height: '30px', width: '30px'}) }}
</a>
</td>
</tr>
{% endfor %}
{% if users|length == 0 %}
<tr>
<td colspan="5" class="text-center">Aucun utilisateur trouvé.</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
{% endblock %}