- Relations entre entités (User, Intervention, etc.)\n- Formulaires adaptés\n- Refacto visuel des vues\n- Nouvelle base.html.twig\n- Dashboards par rôle
40 lines
1.4 KiB
Twig
40 lines
1.4 KiB
Twig
{% extends 'base.html.twig' %}
|
||
|
||
{% block title %}Liste des véhicules{% endblock %}
|
||
|
||
{% block body %}
|
||
<h1 class="mb-4">🚗 Liste des véhicules</h1>
|
||
|
||
<table class="table table-striped table-bordered align-middle">
|
||
<thead class="table-dark">
|
||
<tr>
|
||
<th>ID</th>
|
||
<th>Immatriculation</th>
|
||
<th>Marque</th>
|
||
<th>Modèle</th>
|
||
<th class="text-center">Actions</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{% for vehicle in vehicles %}
|
||
<tr>
|
||
<td>{{ vehicle.id }}</td>
|
||
<td>{{ vehicle.LicensePlate }}</td>
|
||
<td>{{ vehicle.Brand }}</td>
|
||
<td>{{ vehicle.Model }}</td>
|
||
<td class="text-center">
|
||
<a href="{{ path('app_vehicle_show', {'id': vehicle.id}) }}" class="btn btn-info btn-sm">👁️ Voir</a>
|
||
<a href="{{ path('app_vehicle_edit', {'id': vehicle.id}) }}" class="btn btn-warning btn-sm">✏️ Modifier</a>
|
||
</td>
|
||
</tr>
|
||
{% else %}
|
||
<tr>
|
||
<td colspan="5" class="text-center text-muted">Aucun véhicule enregistré.</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
|
||
<a href="{{ path('app_vehicle_new') }}" class="btn btn-success mt-3">➕ Ajouter un véhicule</a>
|
||
{% endblock %}
|