hegresphere/templates/faq/show.html.twig

48 lines
2.2 KiB
Twig
Raw Normal View History

2024-11-21 17:04:56 +01:00
{% extends 'base.html.twig' %}
2024-12-05 17:55:02 +01:00
{% block title %}Détail de la FAQ{% endblock %}
2024-11-21 17:04:56 +01:00
{% block body %}
2024-12-05 17:55:02 +01:00
<div class="container mx-auto p-6">
<h1 class="text-3xl font-bold mb-4">Détail de la FAQ</h1>
2024-11-21 17:04:56 +01:00
2024-12-05 17:55:02 +01:00
<div class="bg-white shadow-md rounded-lg p-6">
<table class="min-w-full">
<tbody>
<tr class="border-b">
<th class="px-6 py-4 text-lg font-medium text-gray-700">ID</th>
<td class="px-6 py-4 text-lg text-gray-900">{{ faq.id }}</td>
</tr>
<tr class="border-b">
<th class="px-6 py-4 text-lg font-medium text-gray-700">Question</th>
<td class="px-6 py-4 text-lg text-gray-900">{{ faq.question }}</td>
</tr>
<tr class="border-b">
<th class="px-6 py-4 text-lg font-medium text-gray-700">Réponse</th>
<td class="px-6 py-4 text-lg text-gray-900">{{ faq.answer }}</td>
</tr>
</tbody>
</table>
</div>
<div class="mt-6 flex justify-between">
2024-12-09 15:56:55 +01:00
<!-- Bouton Retour à la liste -->
<a href="{{ path('app_faq_index') }}" class="text-teal-500 hover:text-teal-700 text-lg">
2024-12-05 17:55:02 +01:00
<i class="fas fa-arrow-left"></i> Retour à la liste des FAQs
</a>
2024-11-21 17:04:56 +01:00
2024-12-09 15:56:55 +01:00
<!-- Boutons Modifier et Supprimer -->
<div class="flex items-center space-x-4">
<a href="{{ path('app_faq_edit', {'id': faq.id}) }}" class="text-yellow-500 hover:text-yellow-700 text-lg">
<i class="fas fa-edit"></i> Modifier cette FAQ
</a>
<form method="post" action="{{ path('app_faq_delete', {'id': faq.id}) }}" style="display:inline;">
<input type="hidden" name="_method" value="DELETE">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ faq.id) }}">
<button type="submit" class="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg">
<i class="fas fa-trash-alt"></i> Supprimer
</button>
</form>
</div>
2024-12-05 17:55:02 +01:00
</div>
</div>
2024-12-09 15:56:55 +01:00
{% endblock %}