2026-01-15 18:04:01 +01:00
|
|
|
{% extends 'dashboard/base.twig' %}
|
2026-01-15 18:51:17 +01:00
|
|
|
|
|
|
|
|
{% block title %}Administrateurs{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block actions %}
|
|
|
|
|
{# Bouton Ajouter un administrateur #}
|
|
|
|
|
<a href="{{ path('app_crm_administrateur_add') }}"
|
|
|
|
|
class="inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-lg hover:bg-blue-700 focus:ring-4 focus:ring-blue-300 transition-all dark:bg-blue-600 dark:hover:bg-blue-700">
|
|
|
|
|
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
|
|
|
|
|
</svg>
|
|
|
|
|
Ajouter un administrateur
|
|
|
|
|
</a>
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
2026-01-15 18:04:01 +01:00
|
|
|
{% block body %}
|
2026-01-15 18:51:17 +01:00
|
|
|
<div class="p-4 md:p-6 bg-gray-50 dark:bg-gray-900 min-h-screen w-full">
|
|
|
|
|
<div class="w-full">
|
|
|
|
|
<div class="flex justify-between items-center mb-6">
|
|
|
|
|
<h1 class="text-2xl font-bold text-gray-800 dark:text-white">Liste des Administrateurs</h1>
|
|
|
|
|
<span class="px-3 py-1 text-sm font-medium text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-200">
|
|
|
|
|
{{ admins|length }} membres
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="bg-white dark:bg-gray-800 shadow-md sm:rounded-lg border border-gray-200 dark:border-gray-700 overflow-x-auto">
|
|
|
|
|
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400">
|
|
|
|
|
<thead class="text-xs text-gray-700 uppercase bg-gray-100 dark:bg-gray-700 dark:text-gray-300">
|
|
|
|
|
<tr>
|
|
|
|
|
<th scope="col" class="px-6 py-4 font-bold">Utilisateur</th>
|
|
|
|
|
<th scope="col" class="px-6 py-4 font-bold">Email</th>
|
|
|
|
|
<th scope="col" class="px-6 py-4 font-bold">Statut</th>
|
|
|
|
|
<th scope="col" class="px-6 py-4 font-bold text-right">Actions</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
|
|
|
{% for admin in admins %}
|
|
|
|
|
<tr class="bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors">
|
|
|
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
|
|
|
<div class="flex flex-col">
|
|
|
|
|
<span class="font-semibold text-gray-900 dark:text-white">{{ admin.firstName }} {{ admin.name }}</span>
|
|
|
|
|
<span class="text-xs text-gray-500 dark:text-gray-400 italic">@{{ admin.username }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="px-6 py-4 whitespace-nowrap italic text-gray-400">
|
|
|
|
|
{{ admin.email }}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
|
|
|
{% if admin.actif %}
|
|
|
|
|
<span class="inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800 dark:bg-green-900/40 dark:text-green-400">
|
|
|
|
|
<span class="w-2 h-2 mr-2 bg-green-500 rounded-full animate-pulse"></span>
|
|
|
|
|
Actif
|
|
|
|
|
</span>
|
|
|
|
|
{% else %}
|
|
|
|
|
<span class="inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium bg-red-100 text-red-800 dark:bg-red-900/40 dark:text-red-400">
|
|
|
|
|
<span class="w-2 h-2 mr-2 bg-red-500 rounded-full"></span>
|
|
|
|
|
Suspendu
|
|
|
|
|
</span>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="px-6 py-4 text-right whitespace-nowrap space-x-2">
|
|
|
|
|
{# Bouton Voir #}
|
|
|
|
|
<a href="{{ path('app_crm_administrateur_view', {id: admin.id}) }}"
|
|
|
|
|
class="inline-flex items-center px-3 py-2 text-xs font-medium text-white bg-blue-600 rounded-lg hover:bg-blue-700 transition-all">
|
|
|
|
|
<svg class="w-3.5 h-3.5 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path></svg>
|
|
|
|
|
Gérer
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
{# Bouton Supprimer #}
|
|
|
|
|
<a href="{{ path('app_crm_administrateur_delete_view', {id: admin.id}) }}"
|
|
|
|
|
data-turbo-method="post"
|
|
|
|
|
data-turbo-confirm="Êtes-vous sûr de vouloir supprimer cet administrateur ?"
|
|
|
|
|
class="inline-flex items-center px-4 py-2 text-sm font-medium text-red-600 bg-red-100/10 border border-red-600/20 rounded-lg hover:bg-red-600 hover:text-white transition-all duration-200 dark:text-red-500 dark:bg-red-900/20 dark:border-red-800/50 dark:hover:bg-red-600 dark:hover:text-white">
|
|
|
|
|
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path>
|
|
|
|
|
</svg>
|
|
|
|
|
Supprimer
|
|
|
|
|
</a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% else %}
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="4" class="px-6 py-12 text-center text-gray-500 dark:text-gray-400 italic bg-gray-50/50 dark:bg-gray-800/50">
|
|
|
|
|
Aucun administrateur trouvé.
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-15 18:04:01 +01:00
|
|
|
{% endblock %}
|