2024-11-21 15:11:11 +01:00
{% extends 'base.html.twig' %}
{% block title %} Reductions index {% endblock %}
{% block stylesheets %}
2024-11-21 17:03:32 +01:00
<link rel="stylesheet" href=" {{ asset ( 'css/ControllerVues/list.css' ) }} "> <!-- Ajout du fichier CSS -->
2024-11-21 15:11:11 +01:00
{% endblock %}
{% block body %}
<h1>Reductions index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Description</th>
<th>Prix</th>
<th>Pourcentage</th>
<th>MontantFixe</th>
<th>DateDebut</th>
<th>DateFin</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for reduction in reductions %}
<tr>
<td> {{ reduction .id }} </td>
<td> {{ reduction . D escription }} </td>
<td> {{ reduction . P rix }} </td>
<td> {{ reduction . P ourcentage }} </td>
<td> {{ reduction . M ontantFixe }} </td>
<td> {{ reduction . D ateDebut ? reduction . D ateDebut | date ( 'Y-m-d H:i:s' ) : '' }} </td>
<td> {{ reduction . D ateFin ? reduction . D ateFin | date ( 'Y-m-d H:i:s' ) : '' }} </td>
<td>
2024-11-28 14:56:56 +01:00
<form method="post" action=" {{ path ( 'app_reductions_delete' , { 'id' : reduction .id } ) }} " onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value=" {{ csrf_token ( 'delete' ~ reduction .id ) }} ">
<button class="btn">Delete</button>
</form>
2024-11-21 15:11:11 +01:00
<a href=" {{ path ( 'app_reductions_edit' , { 'id' : reduction .id } ) }} ">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="8">pas encore de réductions</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href=" {{ path ( 'app_reductions_new' ) }} ">Créer une réduction</a>
{% endblock %}