v1.5.18 Multiple events works, only admin pages is missing some pdf, view user and jpg functions
This commit is contained in:
@@ -1,27 +1,23 @@
|
||||
@extends("app.layout.base")
|
||||
@section("title")
|
||||
Ugenlige aktiviteter
|
||||
Ugentlige aktiviteter
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<style>
|
||||
iframe, .ql-video {
|
||||
width: 100%;
|
||||
}
|
||||
div.card {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 30px;
|
||||
width: auto;
|
||||
heigt: auto;
|
||||
|
||||
border-bottom: 2px solid black;
|
||||
}
|
||||
div.container {
|
||||
padding: 8px;
|
||||
text-align: justify;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.header > img {
|
||||
border-radius: 2px 2px 2px 2px
|
||||
border-radius: 10px 10px 0px 0px
|
||||
}
|
||||
/*Alert box*/
|
||||
.alert {
|
||||
@@ -55,9 +51,11 @@
|
||||
|
||||
<?php
|
||||
$Week = date('W'); //Current week
|
||||
|
||||
?>
|
||||
|
||||
<main>
|
||||
<p hidden>{{ setlocale(LC_ALL, 'da_dk')}}</p>
|
||||
<h1 class="text-center sde-blue mb-2rem">{{ __('msg.ugentligaktiviteter') }}</h1>
|
||||
<!--Alert box, display when a event is delete: start-->
|
||||
@if(count(\App\Notification::query()->where("user_id", "=", auth()->user()->id)->get()) > 0)
|
||||
@@ -78,20 +76,32 @@
|
||||
@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)
|
||||
<p>{{$multiEvents->name}}</p>
|
||||
<p>{{$multiEvents->accountable}}</p>
|
||||
<p>{{$multiEvents->description}}</p>
|
||||
<p>{{$multiEvents->date}}</p>
|
||||
<p>{{$multiEvents->event}}</p>
|
||||
|
||||
|
||||
<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>
|
||||
</div>
|
||||
@endif
|
||||
@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>
|
||||
<div id="snackbar"></div>
|
||||
@endsection
|
||||
@section("scripts")
|
||||
<script type="text/javascript">
|
||||
@@ -103,11 +113,11 @@
|
||||
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
|
||||
}
|
||||
|
||||
function ajaxCall(event_id, el) {
|
||||
function ajaxCall(multiple_event_id, el) {
|
||||
if(el.innerHTML === "{{__("msg.tilmeld")}}") {
|
||||
axios.post("{{ route("userevents.createajax") }}",
|
||||
axios.post("{{ route("multiple-events.createajax") }}",
|
||||
{
|
||||
event_id: event_id
|
||||
multiple_event_id: multiple_event_id
|
||||
}
|
||||
).then(function (response) {
|
||||
var data = response.data;
|
||||
@@ -119,9 +129,9 @@
|
||||
console.log(error);
|
||||
});
|
||||
} else if(el.innerHTML === "{{__("msg.afmeld")}}"){
|
||||
axios.post("{{ route("userevents.createajaxcancel") }}",
|
||||
axios.post("{{ route("multiple-events.createajaxcancel") }}",
|
||||
{
|
||||
event_id: event_id
|
||||
multiple_event_id: multiple_event_id
|
||||
}
|
||||
).then(function (response) {
|
||||
var data = response.data;
|
||||
|
||||
Reference in New Issue
Block a user