HegreEtConfort/templates/user/index.html.twig

48 lines
1.4 KiB
Twig
Raw Normal View History

2024-12-20 10:07:22 +01:00
{% extends 'base.html.twig' %}
{% block title %}User index{% endblock %}
{% block body %}
<h1>User index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Email</th>
<th>FirstName</th>
<th>LastName</th>
<th>BirthDate</th>
<th>Phone</th>
<th>Roles</th>
<th>Password</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>{{ 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="9">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_user_new') }}">Create new</a>
{% endblock %}