{{-- Logged-in users get the dashboard shell; visitors the public site chrome. --}} @extends(auth()->check() ? 'layouts.dashboard' : 'layouts.app') @section('title', $event->title) @section('page_title', __('Event Details')) @php $typeColors = ['webinar' => 'primary', 'workshop' => 'success', 'seminar' => 'info', 'offline' => 'secondary']; $isFull = $event->max_participants > 0 && $event->registrations_count >= $event->max_participants; @endphp @section('content')
@if($event->image) {{ $event->title }} @endif
{{ status_label($event->event_type) }} {{ status_label($event->status) }}

{{ $event->title }}

{!! nl2br(e($event->description)) !!}
  • {{ __('Starts:') }} {{ optional($event->start_time)->format('d M Y, h:i A') }}
  • {{ __('Ends:') }} {{ optional($event->end_time)->format('d M Y, h:i A') }}
  • @if($event->event_type === 'offline')
  • {{ __('Location:') }} {{ $event->location ?: __('TBA') }}
  • @else
  • {{ __('Mode:') }} {{ __('Online') }}
  • @endif
  • {{ __('Price:') }} {{ $event->price > 0 ? money($event->price) : __('Free') }}
  • {{ __('Registered:') }} {{ $event->registrations_count }}{{ $event->max_participants > 0 ? ' / ' . $event->max_participants : '' }}
@if($alreadyRegistered) {{ __('You are registered') }} @elseif($event->status !== 'published') @elseif($isFull) @elseif(! auth()->check()) {{ __('Log in to register') }} @else
@csrf
@endif @php($calLoc = $event->event_type === 'offline' ? ($event->location ?: '') : ($event->meeting_url ?: route('events.show', $event))) @php($calGoogle = \App\Support\CalendarLink::googleUrl($event->title, $event->start_time, $event->end_time, (string) \Illuminate\Support\Str::limit(strip_tags((string) $event->description), 300), $calLoc)) @php($calOutlook = \App\Support\CalendarLink::outlookUrl($event->title, $event->start_time, $event->end_time, (string) \Illuminate\Support\Str::limit(strip_tags((string) $event->description), 300), $calLoc)) @if($event->status === 'published' && $event->start_time)
@if($calGoogle) Google@endif @if($calOutlook) Outlook@endif .ics
@if(config('calendar.google.client_id') && config('calendar.google.client_secret') || config('calendar.microsoft.client_id') && config('calendar.microsoft.client_secret'))
@foreach(['google', 'microsoft'] as $calendarProvider) @if(config("calendar.{$calendarProvider}.client_id") && config("calendar.{$calendarProvider}.client_secret") && auth()->check() && ! auth()->user()->calendarConnections()->where('provider', $calendarProvider)->exists()) {{ __('Connect') }} {{ ucfirst($calendarProvider) }} @elseif(auth()->check() && auth()->user()->calendarConnections()->where('provider', $calendarProvider)->exists())
@csrf
@endif @endforeach
@endif @endif {{ __('Back to events') }}
@endsection