@extends("app.layout.base") @section("title") Aktiviteter @endsection @section("content")

{{ __('msg.aktiviteter') }}

@if(count(\App\Notification::query()->where("user_id", "=", auth()->user()->id)->get()) > 0)
× {{__('msg.aktivitetaflyst')}} @foreach(\App\Notification::query()->where("user_id", "=", auth()->user()->id)->get() as $notification)

{{ $notification->message }}{{ __("msg.canceled") }}

@endforeach
@endif @if(!$events->isEmpty()) @foreach($events as $event)
@if($event->resource_id !== null)
@endif

{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}

{{ $event->name }}

{{__('msg.af')}}: {{ $event->accountable }}

@if (count(\App\UserEvent::query()->where('event_id', '=', $event->id)->where('user_id', '=', Auth::user()->id)->get()) > 0) {{__('msg.afmeld')}} @else {{-- ^ If you're already participating in the event, then show a ´cancel´ button - v Else show a ´participate´ button --}} {{__('msg.tilmeld')}} @endif $event->id ])}}">{{__('msg.læsmere')}} $event->id ])}}">{{__('msg.sedeltagere')}}
@endforeach @else

{{__('msg.dereringenaktiviteter')}}!

@endif {{__('msg.setilmeldteaktiviteter')}}
@endsection @section("scripts") @endsection