45 lines
2.2 KiB
PHP
45 lines
2.2 KiB
PHP
<x-app-layout>
|
|||
|
|
<x-slot name="header">
|
||
|
|
<div class="flex justify-between items-center">
|
||
|
|
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
|
||
|
|
{{ __('Groups') }}
|
||
|
|
</h2>
|
||
|
|
<a href="{{ route('groups.create') }}" class="text-sm text-indigo-600 dark:text-indigo-400 hover:underline">
|
||
|
|
{{ __('New group') }}
|
||
|
|
</a>
|
||
|
|
</div>
|
||
|
|
</x-slot>
|
||
|
|
|
||
|
|
<div class="py-12">
|
||
|
|
<div class="max-w-5xl mx-auto sm:px-6 lg:px-8">
|
||
|
|
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg">
|
||
|
|
<div class="p-6 text-gray-900 dark:text-gray-100">
|
||
|
|
@if ($groups->isEmpty())
|
||
|
|
<p class="text-gray-500 dark:text-gray-400">
|
||
|
|
{{ __("You don't own or belong to any groups yet.") }}
|
||
|
|
</p>
|
||
|
|
@else
|
||
|
|
<ul class="divide-y divide-gray-200 dark:divide-gray-700">
|
||
|
|
@foreach ($groups as $group)
|
||
|
|
<li class="py-3">
|
||
|
|
<a href="{{ route('groups.show', $group) }}" class="flex justify-between items-center">
|
||
|
|
<div>
|
||
|
|
<span class="font-medium">{{ $group->name }}</span>
|
||
|
|
@if ($group->owner_id === auth()->id())
|
||
|
|
<span class="ml-2 text-xs uppercase tracking-wide text-gray-500 dark:text-gray-400">{{ __('owner') }}</span>
|
||
|
|
@endif
|
||
|
|
</div>
|
||
|
|
<span class="text-sm text-gray-500 dark:text-gray-400">
|
||
|
|
{{ $group->members_count }} {{ Str::plural('member', $group->members_count) }}
|
||
|
|
</span>
|
||
|
|
</a>
|
||
|
|
</li>
|
||
|
|
@endforeach
|
||
|
|
</ul>
|
||
|
|
@endif
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</x-app-layout>
|