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.Description }}</td>
|
|
|
|
<td>{{ reduction.Prix }}</td>
|
|
|
|
<td>{{ reduction.Pourcentage }}</td>
|
|
|
|
<td>{{ reduction.MontantFixe }}</td>
|
|
|
|
<td>{{ reduction.DateDebut ? reduction.DateDebut|date('Y-m-d H:i:s') : '' }}</td>
|
|
|
|
<td>{{ reduction.DateFin ? reduction.DateFin|date('Y-m-d H:i:s') : '' }}</td>
|
|
|
|
<td>
|
2024-12-05 15:12:46 +01:00
|
|
|
<form method="post" action="{{ path('app_reductions_delete', {'id': reduction.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' ~ reduction.id) }}">
|
2024-12-05 15:12:46 +01:00
|
|
|
{{ include('reductions/_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_reductions_edit', {'id': reduction.id}) }}">Modifier</a>
|
2024-11-21 15:11:11 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% else %}
|
|
|
|
<tr>
|
2024-12-05 15:12:46 +01:00
|
|
|
<td colspan="8">Aucun enregistrement trouvé</td>
|
2024-11-21 15:11:11 +01:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<a href="{{ path('app_reductions_new') }}">Créer une réduction</a>
|
|
|
|
{% endblock %}
|