Modification style page pour voir un utilisateur

This commit is contained in:
Aymeric SERRA 2023-02-10 17:55:21 +01:00
parent 897b9130c1
commit 0a54d50934
Signed by: oupson
GPG Key ID: 3BD88615552EFCB7
2 changed files with 39 additions and 30 deletions

View File

@ -1,4 +1,4 @@
<form method="post" action="{{ path('app_user_delete', {'id': user.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<form style="display:inline-block;" method="post" action="{{ path('app_user_delete', {'id': user.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ user.id) }}">
<button class="btn">Delete</button>
<button class="btn btn-outline-danger">Delete</button>
</form>

View File

@ -3,36 +3,45 @@
{% block title %}User{% endblock %}
{% block body %}
<h1>User</h1>
<div class="card">
<div class="card-header">
<h1>Utilisateur</h1>
</div>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ user.id }}</td>
</tr>
<tr>
<th>Email</th>
<td>{{ user.email }}</td>
</tr>
<tr>
<th>Roles</th>
<td>{{ user.roles ? user.roles[0] : '' }}</td>
</tr>
<tr>
<th>Nom</th>
<td>{{ user.nom }}</td>
</tr>
<tr>
<th>Prenom</th>
<td>{{ user.prenom }}</td>
</tr>
</tbody>
</table>
<div class="card-body">
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ user.id }}</td>
</tr>
<tr>
<th>Email</th>
<td>{{ user.email }}</td>
</tr>
<tr>
<th>Roles</th>
<td>{{ user.roles ? user.roles[0] : '' }}</td>
</tr>
<tr>
<th>Nom</th>
<td>{{ user.nom }}</td>
</tr>
<tr>
<th>Prenom</th>
<td>{{ user.prenom }}</td>
</tr>
</tbody>
</table>
</div>
<a href="{{ path('app_user_index') }}">back to list</a>
<div class="card-footer">
<a class="btn btn-outline-primary" href="{{ path('app_user_edit', {'id': user.id}) }}">Modifier</a>
<a href="{{ path('app_user_edit', {'id': user.id}) }}">edit</a>
<a class="btn btn-outline-primary" href="{{ path('app_user_index') }}">Retour à la liste des
utilisateurs</a>
{{ include('user/_delete_form.html.twig') }}
{{ include('user/_delete_form.html.twig') }}
</div>
</div>
{% endblock %}