|
| 1 | +<x-layouts.cp title="Tableau de bord"> |
| 2 | + <x-container class="max-w-7xl mx-auto px-4 sm:px-6"> |
| 3 | + <div> |
| 4 | + <div class="sm:flex sm:items-center"> |
| 5 | + <div class="sm:flex-auto"> |
| 6 | + <h1 class="text-xl font-semibold text-skin-inverted">{{ __('Utilisateurs') }}</h1> |
| 7 | + <p class="mt-2 text-sm text-skin-inverted-muted">{{ __('Une liste de tous les utilisateurs de votre compte, avec leur nom, leur titre, leur email et leur rôle.') }}</p> |
| 8 | + </div> |
| 9 | + <div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none"> |
| 10 | + <x-button type="button">{{ __('Inviter') }}</x-button> |
| 11 | + </div> |
| 12 | + </div> |
| 13 | + <div class="mt-8 flex flex-col"> |
| 14 | + <div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8"> |
| 15 | + <div class="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8"> |
| 16 | + <div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg"> |
| 17 | + <table class="min-w-full divide-y divide-skin-base"> |
| 18 | + <thead class="bg-skin-card-muted"> |
| 19 | + <tr> |
| 20 | + <th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-skin-inverted sm:pl-6">{{ __('Nom') }}</th> |
| 21 | + <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-skin-inverted">{{ __('Email') }}</th> |
| 22 | + <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-skin-inverted">{{ __('Role') }}</th> |
| 23 | + <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-skin-inverted">{{ __('Inscription') }}</th> |
| 24 | + <th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6"> |
| 25 | + <span class="sr-only">{{ __('Éditer') }}</span> |
| 26 | + </th> |
| 27 | + </tr> |
| 28 | + </thead> |
| 29 | + <tbody class="divide-y divide-skin-input bg-skin-menu"> |
| 30 | + @foreach($users as $user) |
| 31 | + <tr> |
| 32 | + <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-skin-inverted sm:pl-6"> |
| 33 | + <div class="flex items-center"> |
| 34 | + <div class="h-10 w-10 flex-shrink-0"> |
| 35 | + <img class="h-10 w-10 rounded-full" src="{{ $user->profile_photo_url }}" alt="{{ $user->username }}"> |
| 36 | + </div> |
| 37 | + <div class="ml-4"> |
| 38 | + <div class="flex items-center font-medium text-skin-inverted"> |
| 39 | + {{ $user->name }} |
| 40 | + @if($user->isLoggedInUser()) |
| 41 | + <span class="ml-2 inline-flex items-center px-1.5 py-0.5 rounded-full text-xs font-medium leading-none bg-green-50 text-green-800"> |
| 42 | + {{ __('Moi') }} |
| 43 | + </span> |
| 44 | + @endif |
| 45 | + </div> |
| 46 | + <div class="text-skin-base">{{ $user->username }}</div> |
| 47 | + </div> |
| 48 | + </div> |
| 49 | + </td> |
| 50 | + <td class="whitespace-nowrap px-3 py-4 text-sm text-skin-base">{{ $user->email }}</td> |
| 51 | + <td class="whitespace-nowrap px-3 py-4 text-sm text-skin-base">{{ $user->roles_label }}</td> |
| 52 | + <td class="whitespace-nowrap px-3 py-4 text-sm text-skin-base">{{ $user->created_at->diffForHumans() }}</td> |
| 53 | + <td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6"> |
| 54 | + @if(! $user->isLoggedInUser()) |
| 55 | + <a href="#" class="text-green-600 hover:text-green-900">{{ __('Afficher') }}<span class="sr-only">, {{ $user->name }}</span></a> |
| 56 | + @endif |
| 57 | + </td> |
| 58 | + </tr> |
| 59 | + @endforeach |
| 60 | + </tbody> |
| 61 | + </table> |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + </div> |
| 66 | + |
| 67 | + <div class="mt-6"> |
| 68 | + {{ $users->links() }} |
| 69 | + </div> |
| 70 | + </div> |
| 71 | + |
| 72 | + </x-container> |
| 73 | +</x-layouts.cp> |
0 commit comments