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

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

{!! session()->get('eventunsubscribed') !!} @if(!$userevents->isEmpty()) @foreach($userevents 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('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 @else

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

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