v1.5.19d Add the add function in create multiple events

This commit is contained in:
2021-05-04 11:24:56 +02:00
parent 574534fe2a
commit c617012187
3 changed files with 37 additions and 58 deletions
@@ -73,31 +73,25 @@
<!--If there is a images to the event do this: Start-->
@if(!$multiEvents->isEmpty())
@if($multiEvents->contains('week', $Week)) {{-- If any of the menues in the menu table has the number of the week in the 'week' column, do this --}}
@foreach($multiEvents as $multiEvent)
@if($multiEvent->week == $Week)
<div class="card">
<div class="container" class="mt-1">
<h4 class="m-none">{{ date('l', strtotime($multiEvent->date)) }}</h4>
<h4 class="m-none">{{$multiEvent->name}}</h4>
<p class="mt-0">{{__('msg.af')}}: {{$multiEvent->accountable}}</p>
<p class="mt-0">{{$multiEvent->description}}</p>
<p class="m-none">{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($multiEvent->date))->format('d/m/Y \k\l\. H:i') }}</p>
<div class="row justify-content-space mt-1">
@if (count(\App\UserEvent::query()->where('multiple_event_id', '=', $multiEvent->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({{ $multiEvent->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({{ $multiEvent->id }}, this)" >{{__('msg.tilmeld')}}</a>
@endif
<a class="sde-blue text-center m-none p-none bold" href="{{route("multiple-events.accountsignups", ["multiEvent" => $multiEvent->id ])}}">{{__('msg.sedeltagere')}}</a>
</div>
<div class="card">
<div class="container" class="mt-1">
<h4 class="m-none">{{ date('l', strtotime($multiEvent->date)) }}</h4>
<h4 class="m-none">{{$multiEvent->name}}</h4>
<p class="mt-0">{{__('msg.af')}}: {{$multiEvent->accountable}}</p>
<p class="mt-0">{{$multiEvent->description}}</p>
<p class="m-none">{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($multiEvent->date))->format('d/m/Y \k\l\. H:i') }}</p>
<div class="row justify-content-space mt-1">
@if (count(\App\UserEvent::query()->where('multiple_event_id', '=', $multiEvent->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({{ $multiEvent->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({{ $multiEvent->id }}, this)" >{{__('msg.tilmeld')}}</a>
@endif
<a class="sde-blue text-center m-none p-none bold" href="{{route("multiple-events.accountsignups", ["multiEvent" => $multiEvent->id ])}}">{{__('msg.sedeltagere')}}</a>
</div>
</div>
@endif
</div>
@endforeach
@else
<p class="text-center">{{__('msg.dereringenugentligeaktiviteter')}}!</p>
@endif
@endif
<button onclick="document.location = document.referrer;" class="btn btn-sde-blue text-white mb-1 mt-auto">{{ __('msg.tilbage') }}</button>
</main>