40 lines
1.3 KiB
Twig
40 lines
1.3 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Tables index{% endblock %}
|
|
{% block stylesheets %}
|
|
<link rel="stylesheet" href="{{ asset('css/ControllerVues/list.css') }}"> <!-- Ajout du fichier CSS -->
|
|
|
|
{% endblock %}
|
|
{% block body %}
|
|
<h1>Tables index</h1>
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Id</th>
|
|
<th>actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for table in tables %}
|
|
<tr>
|
|
<td>{{ table.id }}</td>
|
|
<td>
|
|
<form method="post" action="{{ path('app_tables_delete', {'id': table.id}) }}" onsubmit="return confirm('Es-tu sur de vouloir le supprimer ?');">
|
|
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ table.id) }}">
|
|
{{ include('tables/_delete_form.html.twig') }}
|
|
</form>
|
|
<a href="{{ path('app_tables_edit', {'id': table.id}) }}">Modifier</a>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="2">Aucun enregistrement trouvé</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<a href="{{ path('app_tables_new') }}">Créer une nouvelle table</a>
|
|
{% endblock %}
|