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:
@@ -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">Lieux</h2>
|
||||
<h2 class="text-xl font-semibold text-gray-800 dark:text-gray-200">Lieux</h2>
|
||||
@can('create', App\Models\Lieu::class)
|
||||
<a href="{{ route('lieux.create') }}"
|
||||
class="px-4 py-2 bg-indigo-600 text-white text-sm rounded-md hover:bg-indigo-700">
|
||||
@@ -14,29 +14,29 @@
|
||||
<div class="py-8 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 space-y-6">
|
||||
|
||||
@if(session('success'))
|
||||
<div class="p-4 bg-green-50 border border-green-200 text-green-800 rounded-md">{{ session('success') }}</div>
|
||||
<div class="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
|
||||
@if(session('error'))
|
||||
<div class="p-4 bg-red-50 border border-red-200 text-red-800 rounded-md">{{ session('error') }}</div>
|
||||
<div class="p-4 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-700 text-red-800 dark:text-red-200 rounded-md">{{ session('error') }}</div>
|
||||
@endif
|
||||
|
||||
{{-- Filtres --}}
|
||||
@php $hasFilters = request()->anyFilled(['lieu_type_id', 'q', 'lieu_id']); @endphp
|
||||
<div class="bg-white shadow rounded-lg p-5">
|
||||
<div class="bg-white dark:bg-gray-800 shadow rounded-lg p-5">
|
||||
<form method="GET" action="{{ route('lieux.index') }}">
|
||||
<div class="flex flex-wrap items-end gap-4">
|
||||
|
||||
<div class="flex-1 min-w-[200px]">
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">Recherche</label>
|
||||
<label class="block text-xs font-medium text-gray-600 dark:text-gray-400 mb-1">Recherche</label>
|
||||
<input type="text" name="q" value="{{ request('q') }}"
|
||||
placeholder="Nom, code INSEE…"
|
||||
class="block w-full rounded-md border-gray-300 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
|
||||
class="block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
|
||||
</div>
|
||||
|
||||
<div class="w-52">
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">Type de lieu</label>
|
||||
<label class="block text-xs font-medium text-gray-600 dark:text-gray-400 mb-1">Type de lieu</label>
|
||||
<select name="lieu_type_id"
|
||||
class="block w-full rounded-md border-gray-300 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
|
||||
class="block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm text-sm focus:border-indigo-500 focus:ring-indigo-500">
|
||||
<option value="">— Tous les types —</option>
|
||||
@foreach($lieuTypes as $lt)
|
||||
<option value="{{ $lt->id }}" {{ request('lieu_type_id') == $lt->id ? 'selected' : '' }}>
|
||||
@@ -53,10 +53,10 @@
|
||||
</button>
|
||||
@if($hasFilters)
|
||||
<a href="{{ route('lieux.index') }}"
|
||||
class="px-4 py-2 border border-gray-300 text-gray-600 text-sm rounded-md hover:bg-gray-50">
|
||||
class="px-4 py-2 border border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-400 text-sm rounded-md hover:bg-gray-50 dark:hover:bg-gray-700">
|
||||
Effacer
|
||||
</a>
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs bg-indigo-100 text-indigo-700">
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-xs bg-indigo-100 dark:bg-indigo-900/50 text-indigo-700">
|
||||
filtres actifs
|
||||
</span>
|
||||
@endif
|
||||
@@ -77,29 +77,29 @@
|
||||
</div>
|
||||
|
||||
{{-- Tableau --}}
|
||||
<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 tracking-wider">Lieu</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Code</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Parent</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Coordonnées</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Lieu</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Type</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Code</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Parent</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Coordonnées</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($lieux as $lieu)
|
||||
<tr class="hover:bg-gray-50">
|
||||
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700">
|
||||
<td class="px-6 py-4">
|
||||
<a href="{{ route('lieux.show', $lieu) }}" class="font-medium text-indigo-600 hover:underline">
|
||||
{{ $lieu->nom }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm text-gray-500">{{ $lieu->lieuType?->nom ?? '—' }}</td>
|
||||
<td class="px-6 py-4 text-sm text-gray-500">{{ $lieu->code ?? '—' }}</td>
|
||||
<td class="px-6 py-4 text-sm text-gray-500">
|
||||
<td class="px-6 py-4 text-sm text-gray-500 dark:text-gray-400">{{ $lieu->lieuType?->nom ?? '—' }}</td>
|
||||
<td class="px-6 py-4 text-sm text-gray-500 dark:text-gray-400">{{ $lieu->code ?? '—' }}</td>
|
||||
<td class="px-6 py-4 text-sm text-gray-500 dark:text-gray-400">
|
||||
@if($lieu->parent)
|
||||
<a href="{{ route('lieux.show', $lieu->parent) }}" class="text-indigo-600 hover:underline">
|
||||
{{ $lieu->parent->nom }}
|
||||
@@ -108,7 +108,7 @@
|
||||
—
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm text-gray-500">
|
||||
<td class="px-6 py-4 text-sm text-gray-500 dark:text-gray-400">
|
||||
@if($lieu->latitude && $lieu->longitude)
|
||||
{{ number_format($lieu->latitude, 4) }}, {{ number_format($lieu->longitude, 4) }}
|
||||
@else
|
||||
@@ -117,7 +117,7 @@
|
||||
</td>
|
||||
<td class="px-6 py-4 text-right text-sm space-x-3">
|
||||
@can('update', $lieu)
|
||||
<a href="{{ route('lieux.edit', $lieu) }}" class="text-gray-600 hover:text-indigo-600">Modifier</a>
|
||||
<a href="{{ route('lieux.edit', $lieu) }}" class="text-gray-600 dark:text-gray-400 hover:text-indigo-600">Modifier</a>
|
||||
@endcan
|
||||
@can('delete', $lieu)
|
||||
<form method="POST" action="{{ route('lieux.destroy', $lieu) }}" class="inline"
|
||||
@@ -131,7 +131,7 @@
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="px-6 py-10 text-center text-gray-400">
|
||||
<td colspan="6" class="px-6 py-10 text-center text-gray-400 dark:text-gray-500">
|
||||
@if($hasFilters) Aucun lieu ne correspond aux filtres.
|
||||
@else Aucun lieu enregistré. @endif
|
||||
</td>
|
||||
@@ -141,7 +141,7 @@
|
||||
</table>
|
||||
|
||||
@if($lieux->hasPages())
|
||||
<div class="px-6 py-4 border-t border-gray-200">
|
||||
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700">
|
||||
{{ $lieux->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user