2024-11-21 14:28:29 +01:00
{% extends 'base.html.twig' %}
{% block title %} Reservations index {% endblock %}
2024-12-05 15:12:46 +01:00
{% block stylesheets %}
<link rel="stylesheet" href=" {{ asset ( 'css/ControllerVues/list.css' ) }} "> <!-- Ajout du fichier CSS -->
2024-11-21 14:28:29 +01:00
2024-12-05 15:12:46 +01:00
{% endblock %}
2024-11-21 14:28:29 +01:00
{% block body %}
<h1>Reservations index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>DateHeure</th>
<th>Nb_de_prsn</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for reservation in reservations %}
<tr>
<td> {{ reservation .id }} </td>
<td> {{ reservation . D ateHeure ? reservation . D ateHeure | date ( 'Y-m-d H:i:s' ) : '' }} </td>
<td> {{ reservation . N bDePrsn }} </td>
<td>
2024-12-05 15:12:46 +01:00
<form method="post" action=" {{ path ( 'app_reservations_delete' , { 'id' : reservation .id } ) }} " onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?');">
2024-11-28 14:56:56 +01:00
<input type="hidden" name="_token" value=" {{ csrf_token ( 'delete' ~ reservation .id ) }} ">
2024-12-05 15:12:46 +01:00
{{ include ( 'reservations/_delete_form.html.twig' ) }}
2024-11-28 14:56:56 +01:00
</form>
2024-12-05 15:12:46 +01:00
<a href=" {{ path ( 'app_reservations_edit' , { 'id' : reservation .id } ) }} ">Modifier</a>
2024-11-21 14:28:29 +01:00
</td>
</tr>
{% else %}
<tr>
2024-12-05 15:12:46 +01:00
<td colspan="4">Aucun enregistrement trouvé</td>
2024-11-21 14:28:29 +01:00
</tr>
{% endfor %}
</tbody>
</table>
2024-12-05 15:12:46 +01:00
<a href=" {{ path ( 'app_reservations_new' ) }} ">Créer une réservation</a>
2024-11-21 14:28:29 +01:00
{% endblock %}