@extends('layouts.user') @section('title', $group->name ?? 'Group') @section('content')

Group

{{ $group->name }}

Created by {{ $group->owner?->name ?? 'Unknown' }}

{{ $group->created_at?->diffForHumans() }}
@if($group->description)

{{ $group->description }}

@endif
Privacy: {{ ucfirst($group->privacy) }}
@php $membershipStatus = $membership?->status; @endphp @if($membershipStatus === 'approved') Member
@csrf
@elseif($membershipStatus === 'pending') Join request pending @else
@csrf
@endif

Topics

@can('manageTopics', $group) Admin @endcan
@if($topics->isEmpty())

No topics yet.

@else @endif @can('create', [\App\Models\GroupTopic::class, $group])
@csrf
@endcan

Discussions

@php $activeTopic = $topics->firstWhere('id', (int) $activeTopicId); @endphp @if(! $activeTopic)

Select a topic to start a discussion.

@elseif($activeTopic->status !== 'active' || $activeTopic->is_locked)

This topic is not accepting new posts.

@endif @if($activeTopic) @can('create', [\App\Models\GroupPost::class, $group, $activeTopic])
@csrf
@endcan @endif
@forelse($posts as $post)

{{ $post->author?->name ?? 'Unknown' }}

{{ $post->created_at?->diffForHumans() }}

@if($post->is_pinned) Pinned @endif @if($post->is_locked) Locked @endif

{{ $post->body }}

@can('pin', $post)
@csrf
@endcan @can('lock', $post)
@csrf
@endcan @can('delete', $post)
@csrf @method('DELETE')
@endcan
@foreach($post->comments as $comment)

{{ $comment->author?->name ?? 'Unknown' }}

{{ $comment->created_at?->diffForHumans() }}

{{ $comment->body }}

@can('delete', $comment)
@csrf @method('DELETE')
@endcan
@endforeach
@can('create', [\App\Models\GroupComment::class, $post])
@csrf
@endcan
@empty

No discussions yet.

@endforelse
{{ $posts->links() }}

Meetings

@can('create', [\App\Models\GroupMeeting::class, $group])
@csrf
@endcan

Upcoming

@forelse($meetingsUpcoming as $meeting)

{{ $meeting->title }}

{{ $meeting->starts_at?->format('M j, Y g:i A') }} ({{ $meeting->timezone }})

@if($meeting->description)

{{ $meeting->description }}

@endif
{{ ucfirst($meeting->status) }}
@can('join', $meeting) Join @endcan @can('rsvp', $meeting)
@csrf
@csrf
@csrf
@endcan @can('cancel', $meeting)
@csrf
@endcan
@empty

No upcoming meetings.

@endforelse

Past

@forelse($meetingsPast as $meeting)

{{ $meeting->title }}

{{ $meeting->starts_at?->format('M j, Y g:i A') }} ({{ $meeting->timezone }})

@empty

No past meetings.

@endforelse
@endsection