Ekapp/skolehjem/resources/views/app/events/yourevents.blade.php

27 lines
1.3 KiB
PHP

@extends("app.layout.base")
@section("title")
Aktiviteter
@endsection
@section("content")
<main>
<h1 class="text-center sde-blue mb-0" style="margin-bottom: 2rem">{{__('msg.tilmeldteaktiviteter')}}</h1>
{!! session()->get('eventunsubscribed') !!}
@if(!$userevents->isEmpty())
@foreach($userevents as $userevent)
<form method="post" action="{{ route("userevents.destroy", $userevent) }}">
@csrf
@method("delete")
<h3 class="sde-blue bold text-center mb-0">{{$userevent->name}}</h3>
<p class="text-center mt-0">{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($userevent->date))->format('d/m/Y \k\l\. H:i') }}</p>
<p class="text-center">{!! $userevent->description !!}</p>
<button type="submit" class="btn text-center btn-sde-blue" onclick="return confirm('Are you sure you want to remove this event?');">{{__('msg.afmeld')}}</button>
</form>
@endforeach
@else
<p class="text-center">{{__('msg.duharikketilmeldtdignogenaktiviteter')}}!</p>
@endif
<a href="{{ route("events.index") }}" type="submit" style="margin-top: auto" class="mt-2 btn text-center btn-sde-blue">{{__('msg.tilbage')}}</a>
</main>
@endsection