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

28 lines
1.4 KiB
PHP

@extends("app.layout.base")
@section("title")
Aktiviteter
@endsection
@section("content")
<main>
<h1 class="text-center sde-blue mb-0">{{ __('msg.aktiviteter') }}</h1>
@if(!$events->isEmpty())
@foreach($events as $event)
<form method="get" action="{{ route("userevents.create") }}">
<h3 class="sde-blue bold text-center mb-0">{{$event->name}}</h3>
<p class="text-center mt-0">Af: {{ $event->accountable }}</p>
<p class="text-center mt-0">{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}</p>
{!! $event->description !!}
<input type="hidden" name="event_id" value="{{ $event->id }}">
{!! session()->get('error#' . $event->id) !!}
{!! session()->get('signup#' . $event->id) !!}
<button type="submit" class="btn text-center btn-sde-blue" id="tilmeld">{{__('msg.tilmelde')}}</button>
</form>
@endforeach
@else
<p class="text-center">{{__('msg.dereringenaktiviteter')}}!</p>
@endif
<a href="{{ route("userevents.index") }}" type="submit" class="mt-2 btn text-center btn-sde-blue" id="tilmeld">{{__('msg.setilmeldteaktiviteter')}}</a>
</main>
@endsection