connexion base et création premier crud

This commit is contained in:
Logshiro
2025-10-16 13:37:35 +02:00
parent 521d0a2d61
commit ea9a187326
38 changed files with 953 additions and 2 deletions

View File

@@ -0,0 +1,45 @@
{% extends 'base.html.twig' %}
{% block title %}Membre index{% endblock %}
{% block stylesheets %}
{{ parent() }}
{# Ajouter Bootstrap depuis le CDN #}
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
{% endblock %}
{% block body %}
<div class="container mt-4">
<h1 class="mb-4">Membre index</h1>
<table class="table table-striped table-bordered">
<thead class="table-dark">
<tr>
<th>Id</th>
<th>Nom</th>
<th>Password</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for membre in membres %}
<tr>
<td>{{ membre.id }}</td>
<td>{{ membre.nom }}</td>
<td>{{ membre.password }}</td>
<td>
<a href="{{ path('app_membre_show', {'id': membre.id}) }}" class="btn btn-sm btn-primary">Show</a>
<a href="{{ path('app_membre_edit', {'id': membre.id}) }}" class="btn btn-sm btn-warning">Edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="4" class="text-center">No records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_membre_new') }}" class="btn btn-success">Create new</a>
</div>
{% endblock %}