2024-11-21 14:28:29 +01:00
{% extends 'base.html.twig' %}
{% block title %} Reservations index {% endblock %}
{% 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-11-28 14:56:56 +01:00
<form method="post" action=" {{ path ( 'app_reservations_delete' , { 'id' : reservation .id } ) }} " onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value=" {{ csrf_token ( 'delete' ~ reservation .id ) }} ">
<button class="btn">Delete</button>
</form>
2024-11-21 14:28:29 +01:00
<a href=" {{ path ( 'app_reservations_edit' , { 'id' : reservation .id } ) }} ">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="4">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href=" {{ path ( 'app_reservations_new' ) }} ">Create new</a>
{% endblock %}