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

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

{!! session()->get('eventunsubscribed') !!} @if(!$userevents['events']->isEmpty() || !$userevents['multiple']->isEmpty()) @foreach($userevents as $key => $allevents) @foreach($allevents as $userevent)
@csrf @method("delete")
@if($userevent->resource_id !== null)

{{ $userevent->name }}

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

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

@else

{{ $userevent->name }}

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

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

@endif
@if (count(\App\UserEvent::query()->where('event_id', '=', $userevent->id)->where('multiple_event_id', '=', null)->where('user_id', '=', Auth::user()->id)->get()) > 0 || count(\App\UserEvent::query()->where('multiple_event_id', '=', $userevent->id)->where('event_id', '=', null)->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 $userevent->id ])}}">{{__('msg.læsmere')}} $userevent->id ])}}">{{__('msg.sedeltagere')}}
@endforeach @endforeach @else

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

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