v1.5.23 added when a multi or just a event is achieve remove it from index pages

This commit is contained in:
2021-05-10 12:17:48 +02:00
parent 322dbaf31e
commit 3908a6b00c
8 changed files with 53 additions and 50 deletions
@@ -73,27 +73,31 @@
<!--If there is a images to the event do this: Start-->
@if(!$events->isEmpty())
@foreach($events as $event)
<div class="card">
@if($event->resource_id !== null)
<div class="header">
<img class="w-100" src="{{ asset(\App\Resource::query()->where("id", "=", $event->resource_id)->first()->filename) }}">
</div>
@endif
<div class="container" class="mt-1">
<p class="m-none">{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}</p>
<h4 class="m-none">{{ $event->name }}</h4>
<p class="mt-0">{{__('msg.af')}}: {{ $event->accountable }}</p>
<div class="row justify-content-space mt-1">
@if (count(\App\UserEvent::query()->where('event_id', '=', $event->id)->where('user_id', '=', Auth::user()->id)->get()) > 0)
<a class="sde-blue text-center m-none p-none bold" href="javascript:void(0);" onclick="ajaxCall({{ $event->id }}, this)" >{{__('msg.afmeld')}}</a>
@else {{-- ^ If you're already participating in the event, then show a ´cancel´ button - v Else show a ´participate´ button --}}
<a class="sde-blue text-center m-none p-none bold" href="javascript:void(0);" onclick="ajaxCall({{ $event->id }}, this)" >{{__('msg.tilmeld')}}</a>
@endif
<a class="sde-blue text-center m-none p-none bold" href="{{route("events.show", ["event" => $event->id ])}}">{{__('msg.læsmere')}}</a>
<a class="sde-blue text-center m-none p-none bold" href="{{route("events.accountsignups", ["event" => $event->id ])}}">{{__('msg.sedeltagere')}}</a>
@if(\Carbon\Carbon::now() < date("Y-m-d H:i", strtotime($event->date)))
<div class="card">
@if($event->resource_id !== null)
<div class="header">
<img class="w-100" src="{{ asset(\App\Resource::query()->where("id", "=", $event->resource_id)->first()->filename) }}">
</div>
@endif
<div class="container" class="mt-1">
<p class="m-none">{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}</p>
<h4 class="m-none">{{ $event->name }}</h4>
<p class="mt-0">{{__('msg.af')}}: {{ $event->accountable }}</p>
<div class="row justify-content-space mt-1">
@if (count(\App\UserEvent::query()->where('event_id', '=', $event->id)->where('user_id', '=', Auth::user()->id)->get()) > 0)
<a class="sde-blue text-center m-none p-none bold" href="javascript:void(0);" onclick="ajaxCall({{ $event->id }}, this)" >{{__('msg.afmeld')}}</a>
@else {{-- ^ If you're already participating in the event, then show a ´cancel´ button - v Else show a ´participate´ button --}}
<a class="sde-blue text-center m-none p-none bold" href="javascript:void(0);" onclick="ajaxCall({{ $event->id }}, this)" >{{__('msg.tilmeld')}}</a>
@endif
<a class="sde-blue text-center m-none p-none bold" href="{{route("events.show", ["event" => $event->id ])}}">{{__('msg.læsmere')}}</a>
<a class="sde-blue text-center m-none p-none bold" href="{{route("events.accountsignups", ["event" => $event->id ])}}">{{__('msg.sedeltagere')}}</a>
</div>
</div>
</div>
</div>
@else
<p class="text-center mb-auto">{{__('msg.dereringenaktiviteter')}}!</p>
@endif
@endforeach
@else
<p class="text-center mb-auto">{{__('msg.dereringenaktiviteter')}}!</p>