- Relations entre entités (User, Intervention, etc.)\n- Formulaires adaptés\n- Refacto visuel des vues\n- Nouvelle base.html.twig\n- Dashboards par rôle
66 lines
2.1 KiB
Twig
66 lines
2.1 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Liste des utilisateurs{% endblock %}
|
|
|
|
{% block body %}
|
|
<h1>Liste des utilisateurs</h1>
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Id</th>
|
|
<th>Email</th>
|
|
<th>Prénom</th>
|
|
<th>Nom</th>
|
|
<th>Date de naissance</th>
|
|
<th>Téléphone</th>
|
|
<th>Rôles</th>
|
|
<th>Compétences</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for user in users %}
|
|
<tr>
|
|
<td>{{ user.id }}</td>
|
|
<td>{{ user.email }}</td>
|
|
<td>{{ user.FirstName }}</td>
|
|
<td>{{ user.LastName }}</td>
|
|
<td>{{ user.BirthDate ? user.BirthDate|date('Y-m-d') : '' }}</td>
|
|
<td>{{ user.Phone }}</td>
|
|
<td>
|
|
{% if user.roles %}
|
|
<ul>
|
|
{% for role in user.roles %}
|
|
<li>{{ role }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if user.skills|length > 0 %}
|
|
<ul>
|
|
{% for skill in user.skills %}
|
|
<li>{{ skill.Wording }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
Aucune compétence
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_user_show', {'id': user.id}) }}" class="btn btn-info btn-sm">Voir</a>
|
|
<a href="{{ path('app_user_edit', {'id': user.id}) }}" class="btn btn-secondary btn-sm">Modifier</a>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="9">Aucun utilisateur trouvé</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<a href="{{ path('app_user_new') }}" class="btn btn-success">Créer un nouvel utilisateur</a>
|
|
{% endblock %}
|