Mode sombre, option désactivation mises à jour, user-picker avec recherche

- Dark mode complet : darkMode:'class' Tailwind, sélecteur clair/sombre/auto
  dans la navigation (mémorisé dans localStorage, sans flash au chargement) ;
  53 vues et 8 composants Breeze mis à jour avec classes dark:
- Composant user-picker : fenêtre modale avec recherche temps réel (nom/email)
  remplace les <select> d'ajout de membres dans sections et sources
- Paramètres : option "Désactiver la vérification automatique des mises à jour"
  (case à cochage auto-soumise, route POST parametres/updates)
- Panneau "Paramètres généraux" remonté en tête de la page de paramètres
- README recentré sur l'installation manuelle hébergement PHP+MySQL
- VERSION 1.0.1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 19:46:22 +02:00
parent 07ab2a7063
commit f530f55577
73 changed files with 1288 additions and 913 deletions
@@ -1,8 +1,8 @@
<div class="space-y-5">
<div>
<label for="nom" class="block text-sm font-medium text-gray-700">Nom <span class="text-red-500">*</span></label>
<label for="nom" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Nom <span class="text-red-500">*</span></label>
<input type="text" id="nom" name="nom" value="{{ old('nom', $section?->nom) }}" required
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 @error('nom') border-red-500 @enderror">
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 @error('nom') border-red-500 @enderror">
@error('nom') <p class="mt-1 text-sm text-red-600">{{ $message }}</p> @enderror
</div>
@@ -16,22 +16,22 @@
/>
<div>
<label for="adresse" class="block text-sm font-medium text-gray-700">Adresse</label>
<label for="adresse" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Adresse</label>
<input type="text" id="adresse" name="adresse" value="{{ old('adresse', $section?->adresse) }}"
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm focus:border-indigo-500 focus:ring-indigo-500">
</div>
<div>
<label for="email_contact" class="block text-sm font-medium text-gray-700">Email de contact</label>
<label for="email_contact" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Email de contact</label>
<input type="email" id="email_contact" name="email_contact" value="{{ old('email_contact', $section?->email_contact) }}"
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 @error('email_contact') border-red-500 @enderror">
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 @error('email_contact') border-red-500 @enderror">
@error('email_contact') <p class="mt-1 text-sm text-red-600">{{ $message }}</p> @enderror
</div>
<div>
<label for="url" class="block text-sm font-medium text-gray-700">Site internet</label>
<label for="url" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Site internet</label>
<input type="url" id="url" name="url" value="{{ old('url', $section?->url) }}"
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 @error('url') border-red-500 @enderror">
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 @error('url') border-red-500 @enderror">
@error('url') <p class="mt-1 text-sm text-red-600">{{ $message }}</p> @enderror
</div>
</div>
@@ -1,13 +1,13 @@
<x-app-layout>
<x-slot name="header"><h2 class="text-xl font-semibold text-gray-800">Nouvelle section</h2></x-slot>
<x-slot name="header"><h2 class="text-xl font-semibold text-gray-800 dark:text-gray-200">Nouvelle section</h2></x-slot>
<div class="py-8 max-w-2xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="bg-white shadow rounded-lg p-6">
<div class="bg-white dark:bg-gray-800 shadow rounded-lg p-6">
<form method="POST" action="{{ route('admin.sections.store') }}">
@csrf
@include('admin.sections._form', ['section' => null])
<div class="mt-6 flex gap-4">
<button type="submit" class="px-5 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700">Créer</button>
<a href="{{ route('admin.sections.index') }}" class="text-sm text-gray-500 hover:text-gray-700 self-center">Annuler</a>
<a href="{{ route('admin.sections.index') }}" class="text-sm text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 self-center">Annuler</a>
</div>
</form>
</div>
@@ -1,13 +1,13 @@
<x-app-layout>
<x-slot name="header"><h2 class="text-xl font-semibold text-gray-800">Modifier : {{ $section->nom }}</h2></x-slot>
<x-slot name="header"><h2 class="text-xl font-semibold text-gray-800 dark:text-gray-200">Modifier : {{ $section->nom }}</h2></x-slot>
<div class="py-8 max-w-2xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="bg-white shadow rounded-lg p-6">
<div class="bg-white dark:bg-gray-800 shadow rounded-lg p-6">
<form method="POST" action="{{ route('admin.sections.update', $section) }}">
@csrf @method('PUT')
@include('admin.sections._form', ['section' => $section])
<div class="mt-6 flex gap-4">
<button type="submit" class="px-5 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700">Enregistrer</button>
<a href="{{ route('admin.sections.show', $section) }}" class="text-sm text-gray-500 hover:text-gray-700 self-center">Annuler</a>
<a href="{{ route('admin.sections.show', $section) }}" class="text-sm text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 self-center">Annuler</a>
</div>
</form>
</div>
+14 -14
View File
@@ -1,7 +1,7 @@
<x-app-layout>
<x-slot name="header">
<div class="flex items-center justify-between">
<h2 class="text-xl font-semibold text-gray-800">Sections locales</h2>
<h2 class="text-xl font-semibold text-gray-800 dark:text-gray-200">Sections locales</h2>
<a href="{{ route('admin.sections.create') }}"
class="px-4 py-2 bg-indigo-600 text-white text-sm rounded-md hover:bg-indigo-700">+ Nouvelle section</a>
</div>
@@ -9,29 +9,29 @@
<div class="py-8 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
@if(session('success'))
<div class="mb-4 p-4 bg-green-50 border border-green-200 text-green-800 rounded-md">{{ session('success') }}</div>
<div class="mb-4 p-4 bg-green-50 dark:bg-green-900/30 border border-green-200 dark:border-green-700 text-green-800 dark:text-green-200 rounded-md">{{ session('success') }}</div>
@endif
<div class="bg-white shadow rounded-lg overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<div class="bg-white dark:bg-gray-800 shadow rounded-lg overflow-hidden">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Nom</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Lieu</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Contact</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Nom</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Lieu</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Contact</th>
<th class="px-6 py-3"></th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
@forelse($sections as $section)
<tr class="hover:bg-gray-50">
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700">
<td class="px-6 py-4 font-medium">
<a href="{{ route('admin.sections.show', $section) }}" class="text-indigo-600 hover:underline">{{ $section->nom }}</a>
</td>
<td class="px-6 py-4 text-sm text-gray-500">{{ $section->lieu?->nom ?? '—' }}</td>
<td class="px-6 py-4 text-sm text-gray-500">{{ $section->email_contact ?? '—' }}</td>
<td class="px-6 py-4 text-sm text-gray-500 dark:text-gray-400">{{ $section->lieu?->nom ?? '—' }}</td>
<td class="px-6 py-4 text-sm text-gray-500 dark:text-gray-400">{{ $section->email_contact ?? '—' }}</td>
<td class="px-6 py-4 text-right text-sm space-x-3">
<a href="{{ route('admin.sections.edit', $section) }}" class="text-gray-600 hover:text-indigo-600">Modifier</a>
<a href="{{ route('admin.sections.edit', $section) }}" class="text-gray-600 dark:text-gray-400 hover:text-indigo-600">Modifier</a>
<form method="POST" action="{{ route('admin.sections.destroy', $section) }}" class="inline"
x-data @submit.prevent="if(confirm('Supprimer cette section ?')) $el.submit()">
@csrf @method('DELETE')
@@ -40,7 +40,7 @@
</td>
</tr>
@empty
<tr><td colspan="4" class="px-6 py-10 text-center text-gray-400">Aucune section.</td></tr>
<tr><td colspan="4" class="px-6 py-10 text-center text-gray-400 dark:text-gray-500">Aucune section.</td></tr>
@endforelse
</tbody>
</table>
+31 -31
View File
@@ -1,7 +1,7 @@
<x-app-layout>
<x-slot name="header">
<div class="flex items-center justify-between">
<h2 class="text-xl font-semibold text-gray-800">{{ $section->nom }}</h2>
<h2 class="text-xl font-semibold text-gray-800 dark:text-gray-200">{{ $section->nom }}</h2>
<a href="{{ route('admin.sections.edit', $section) }}"
class="px-4 py-2 bg-indigo-600 text-white text-sm rounded-md hover:bg-indigo-700">Modifier</a>
</div>
@@ -10,42 +10,42 @@
<div class="py-8 max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 space-y-6">
@foreach(['success','error'] as $flash)
@if(session($flash))
<div class="p-4 rounded-md {{ $flash === 'success' ? 'bg-green-50 border border-green-200 text-green-800' : 'bg-red-50 border border-red-200 text-red-800' }}">
<div class="p-4 rounded-md {{ $flash === 'success' ? 'bg-green-50 dark:bg-green-900/30 border border-green-200 dark:border-green-700 text-green-800 dark:text-green-200' : 'bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-700 text-red-800 dark:text-red-200' }}">
{{ session($flash) }}
</div>
@endif
@endforeach
{{-- Fiche --}}
<div class="bg-white shadow rounded-lg divide-y divide-gray-100 text-sm">
<div class="bg-white dark:bg-gray-800 shadow rounded-lg divide-y divide-gray-100 dark:divide-gray-700 text-sm">
@foreach([['Lieu', $section->lieu?->nom_long ?? '—'], ['Adresse', $section->adresse ?? '—'], ['Email', $section->email_contact ?? '—'], ['Site', $section->url ?? '—']] as [$label, $val])
<div class="px-6 py-4 grid grid-cols-3 gap-4">
<dt class="font-medium text-gray-500">{{ $label }}</dt>
<dd class="col-span-2 text-gray-900">{{ $val }}</dd>
<dt class="font-medium text-gray-500 dark:text-gray-400">{{ $label }}</dt>
<dd class="col-span-2 text-gray-900 dark:text-white">{{ $val }}</dd>
</div>
@endforeach
</div>
{{-- Membres --}}
<div class="bg-white shadow rounded-lg overflow-hidden">
<div class="px-6 py-4 border-b border-gray-200 font-medium text-gray-900">
<div class="bg-white dark:bg-gray-800 shadow rounded-lg overflow-hidden">
<div class="px-6 py-4 border-b border-gray-200 dark:border-gray-700 font-medium text-gray-900 dark:text-white">
Membres ({{ $section->membres->count() }})
</div>
@if($section->membres->isNotEmpty())
<table class="min-w-full divide-y divide-gray-200 text-sm">
<thead class="bg-gray-50">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700 text-sm">
<thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Nom</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Email</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Rôle dans la section</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Nom</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Email</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase">Rôle dans la section</th>
<th class="px-6 py-3"></th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
@foreach($section->membres as $membre)
<tr>
<td class="px-6 py-3">{{ $membre->name }}</td>
<td class="px-6 py-3 text-gray-500">{{ $membre->email }}</td>
<td class="px-6 py-3 text-gray-500 dark:text-gray-400">{{ $membre->email }}</td>
<td class="px-6 py-3">
{{ $membre->pivot->role_in_section === 'section_manager' ? 'Responsable' : 'Membre' }}
</td>
@@ -63,25 +63,25 @@
@endif
{{-- Ajouter un membre --}}
<div class="px-6 py-4 bg-gray-50 border-t border-gray-200">
<form method="POST" action="{{ route('admin.sections.membres.add', $section) }}" class="flex gap-3 items-end">
<div class="px-6 py-4 bg-gray-50 dark:bg-gray-700 border-t border-gray-200 dark:border-gray-700">
<form method="POST" action="{{ route('admin.sections.membres.add', $section) }}"
x-data="{ canSubmit: false }"
@submit.prevent="if ($el.querySelector('[name=user_id]').value) $el.submit()">
@csrf
<div class="flex-1">
<label class="block text-xs font-medium text-gray-600 mb-1">Utilisateur</label>
<select name="user_id" class="block w-full rounded-md border-gray-300 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
@foreach($users as $user)
<option value="{{ $user->id }}">{{ $user->name }} ({{ $user->email }})</option>
@endforeach
</select>
<div class="flex flex-col sm:flex-row gap-3 items-stretch sm:items-end">
<div class="flex-1">
<label class="block text-xs font-medium text-gray-600 dark:text-gray-400 mb-1">Utilisateur</label>
<x-user-picker :users="$users" placeholder="Rechercher un utilisateur…" required />
</div>
<div>
<label class="block text-xs font-medium text-gray-600 dark:text-gray-400 mb-1">Rôle</label>
<select name="role_in_section" class="block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
<option value="member">Membre</option>
<option value="section_manager">Responsable</option>
</select>
</div>
<button type="submit" class="px-4 py-2 bg-indigo-600 text-white text-sm rounded-md hover:bg-indigo-700 shrink-0">Ajouter</button>
</div>
<div>
<label class="block text-xs font-medium text-gray-600 mb-1">Rôle</label>
<select name="role_in_section" class="block w-full rounded-md border-gray-300 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
<option value="member">Membre</option>
<option value="section_manager">Responsable</option>
</select>
</div>
<button type="submit" class="px-4 py-2 bg-indigo-600 text-white text-sm rounded-md hover:bg-indigo-700">Ajouter</button>
</form>
</div>
</div>