{% extends 'base_baux.html.twig' %}
{% block title %}User index{% endblock %}
{% block body %}
<h1>Liste des utilisateurs</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Nom et prénom</th>
<th>Email</th>
<th>Roles</th>
{# <th>Password</th> #}
<th>actions</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>{{ user.id }}</td>
<td>{{ user.prenom }} {{ user.nom }} </td>
<td>{{ user.fonction }}
<td>{{ user.email }}</td>
<td>{{ user.roles ? user.roles|json_encode : '' }}</td>
{# <td>{{ user.password }}</td> #}
<td>
<a href="{{ path('app_user_show', {'id': user.id}) }}">show</a>
<a href="{{ path('app_user_edit', {'id': user.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_user_new') }}">Create new</a>
{% endblock %}