fix: dropdown Administration et raccourcis tableau de bord admin
- Ajout de `relative` sur le conteneur du menu Administration + `top-full left-0` sur le dropdown (position correcte sous le bouton) - Grille de raccourcis dans le tableau de bord admin : Utilisateurs, Sections, Types de sources, Types de lieux Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -109,6 +109,24 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Raccourcis admin --}}
|
||||
<div class="grid grid-cols-2 sm:grid-cols-4 gap-3">
|
||||
@foreach([
|
||||
['label' => 'Utilisateurs', 'route' => 'admin.utilisateurs.index', 'icon' => 'M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z'],
|
||||
['label' => 'Sections', 'route' => 'admin.sections.index', 'icon' => 'M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-2 10v-5a1 1 0 00-1-1h-2a1 1 0 00-1 1v5m4 0H9'],
|
||||
['label' => 'Types de sources','route' => 'admin.source-types.index','icon' => 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2'],
|
||||
['label' => 'Types de lieux', 'route' => 'admin.lieu-types.index', 'icon' => 'M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z'],
|
||||
] as $link)
|
||||
<a href="{{ route($link['route']) }}"
|
||||
class="flex items-center gap-3 px-4 py-3 bg-white border border-gray-200 rounded-xl hover:border-indigo-300 hover:shadow-sm transition-all text-sm text-gray-700 font-medium">
|
||||
<svg class="w-5 h-5 text-gray-400 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="{{ $link['icon'] }}"/>
|
||||
</svg>
|
||||
{{ $link['label'] }}
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
|
||||
{{-- Sources à valider --}}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
@if(auth()->user()->isSectionManager())
|
||||
<!-- Menu Administration -->
|
||||
<div class="hidden sm:flex sm:items-center" x-data="{ adminOpen: false }">
|
||||
<div class="relative hidden sm:flex sm:items-center" x-data="{ adminOpen: false }">
|
||||
<button @click="adminOpen = !adminOpen"
|
||||
class="inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium leading-5 transition duration-150 ease-in-out
|
||||
{{ request()->routeIs('admin.*') ? 'border-indigo-400 text-gray-900' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300' }}">
|
||||
@@ -40,7 +40,7 @@
|
||||
</button>
|
||||
|
||||
<div x-show="adminOpen" @click.outside="adminOpen = false" x-cloak
|
||||
class="absolute top-14 mt-1 w-56 bg-white rounded-md shadow-lg border border-gray-100 z-50">
|
||||
class="absolute top-full left-0 mt-1 w-56 bg-white rounded-md shadow-lg border border-gray-100 z-50">
|
||||
@if(auth()->user()->isAdmin())
|
||||
<a href="{{ route('admin.dashboard') }}"
|
||||
class="block px-4 py-2 text-sm font-medium text-indigo-700 hover:bg-indigo-50 border-b border-gray-100">
|
||||
|
||||
Reference in New Issue
Block a user