Files
ENI-sortir/templates/admin/sortie.html.twig
2024-11-25 13:39:48 +01:00

66 lines
4.7 KiB
Twig

{% extends 'main/base.html.twig' %}
{% block title %}📣 Sortie.com Admin User 🔊{% endblock %}
{% block content %}
<div class="flex">
{% include 'admin/sidebar.html.twig' %}
<!-- Main Content -->
<div class="ml-64 p-8 w-full">
<h1 class="text-2xl font-semibold mb-4">Gestion des sorties</h1>
<!-- Participants Table -->
<form method="POST" action="{{ path('participant_export') }}">
<div class="overflow-x-auto bg-white rounded shadow">
<table class="min-w-full bg-white divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nom</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date début</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">durée</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date fin d'inscription</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nombre limite d'inscription</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Organisateur</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Site</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Lieu</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Etat</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
{% for sortie in sorties %}
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.nom }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.dateHeureDebut|date('d/m/Y H:i') }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.duree }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.dateLimiteInscription|date('d/m/Y H:i') }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.nbInscriptionsMax }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.organisateur.pseudo }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.site.nom }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.lieu.nom }}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{{ sortie.etat.libelle }}</td>
<td class="flex flex-row px-6 py-4 whitespace-nowrap items-center font-medium">
{# {% if not sortie.etat %}
{% endif %}
<a href="{{ path('app_adminUserDisable', {'id': participant.idParticipant}) }}" class="items-centerp pr-4">
<img src="{{ participant.actif ? asset('img/user-able.svg') : asset('img/user-disable.svg') }}" alt="Logo" height="32px" width="32px">
</a>
<a href="{{ path('app_adminUserDelete', {'id': participant.idParticipant}) }}" class="items-center">
<img src="{{ asset('img/user-delete.svg') }}" alt="Logo" height="32px" width="32px">
</a> #}
</td>
</tr>
{% else %}
<tr>
<td colspan="8" class="px-6 py-4 text-center text-gray-500">Aucune sortie trouvé</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</form>
</div>
</div>
{% endblock %}