v0.11.2b - Made a support user account

This commit is contained in:
2020-09-07 08:28:49 +02:00
parent b62582e039
commit 84f5c51c48
6 changed files with 103 additions and 37 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
html, body {
background-color: #2c2f33;
background-color: #2F3136;
}
main {
background-color: #2c2f33;
background-color: #2F3136;
}
* {
@@ -11,7 +11,7 @@
@section("content")
<h1 id="errormesseages" >Opret Bruger:</h1>
<form method="post" action="{{ route("users.store") }}" onsubmit="return checkInputs()">
<form method="post" action="{{ route("users.store") }}" onsubmit="return checkInputs()" enctype="multipart/form-data">
@csrf
<label for="name_first">Fornavn:</label>
<input type="text" name="name_first" id="name_first" placeholder="Fornavn" required>
@@ -42,6 +42,8 @@
<option value="{{ $role->name }}">{{ $role->name }}</option>
@endforeach
</select>
<label for="fileuploade">Skift brugerens profile billede:</label>
<input id="fileuploade" type="file" name="resource" accept="image/*">
<input type="submit" class="btn btn-dark text-white" value="Opret">
</form>
@endsection
@@ -10,7 +10,7 @@
margin-bottom: 7px;
width: auto;
@if(request()->cookie("mode") == "dark")
background-color: rgba(0,0,0, 0.3);
background-color: #36393F;
@else
background-color: white;
@endif
@@ -69,12 +69,27 @@
.information{
text-align: center;
@if(request()->cookie("mode") == "dark")
background-color: #202225;
@else
background-color: rgba(240,240,240,0.8);
@endif
border-bottom: 1px solid rgba(0, 0, 0, .1);
width: 100%;
height: 25px;
}
.information2{
text-align: center;
@if(request()->cookie("mode") == "dark")
background-color: #202225;
@else
background-color: rgba(240,240,240,0.8);
@endif
width: 100%;
height: 25px;
}
.card > .img > a > img, .card > .img > img {
width: 100%;
}
@@ -125,20 +140,34 @@
<div class="title">{{ $new->subname }}</div>
@if($new->resource_id !== null)
<div class="header" style="background-size: cover; background-image: url('{{ asset(\App\Resource::query()->where("id", "=", $new->resource_id)->first()->filename) }}');"></div>
@endif
<div class="information">{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime(\App\Event::query()->where('id', '=', $new->arrangement_id)->first()->date))->format('d/m/Y \k\l\. H:i') }} | {{\App\Event::query()->where('id', '=', $new->arrangement_id)->first()->accountable}} </div>
<div class="container">
{!! \App\Helpers::closetags(substr($new->content, 0, 300) ) !!}
<div class="row" style="justify-content: space-between; margin-top: 16px; border-top: 1px solid rgba(0, 0, 0, .2);">
@if (count(\App\UserEvent::query()->where('event_id', '=', $new->arrangement_id)->where('user_id', '=', Auth::user()->id)->get()) > 0)
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:void(0);" onclick="ajaxCall({{ $new->arrangement_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 style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:void(0);" onclick="ajaxCall({{ $new->arrangement_id }}, this)" >{{__('msg.tilmeld')}}</a>
@endif
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.show", ["event" => $new->arrangement_id ])}}">{{__('msg.læsmere')}}</a>
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.accountsignups", ["event" => $new->arrangement_id ])}}">{{__('msg.sedeltagere')}}</a>
<div class="information">{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime(\App\Event::query()->where('id', '=', $new->arrangement_id)->first()->date))->format('d/m/Y \k\l\. H:i') }} | {{\App\Event::query()->where('id', '=', $new->arrangement_id)->first()->accountable}} </div>
<div class="container">
{!! \App\Helpers::closetags(substr($new->content, 0, 300) ) !!}
<div class="row" style="justify-content: space-between; padding-top: 12px; border-top: 1px solid rgba(0, 0, 0, .2);">
@if (count(\App\UserEvent::query()->where('event_id', '=', $new->arrangement_id)->where('user_id', '=', Auth::user()->id)->get()) > 0)
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:void(0);" onclick="ajaxCall({{ $new->arrangement_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 style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:void(0);" onclick="ajaxCall({{ $new->arrangement_id }}, this)" >{{__('msg.tilmeld')}}</a>
@endif
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.show", ["event" => $new->arrangement_id ])}}">{{__('msg.læsmere')}}</a>
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.accountsignups", ["event" => $new->arrangement_id ])}}">{{__('msg.sedeltagere')}}</a>
</div>
</div>
</div>
@else
<div class="container">
{!! \App\Helpers::closetags(substr($new->content, 0, 300) ) !!}
<div class="information2">{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime(\App\Event::query()->where('id', '=', $new->arrangement_id)->first()->date))->format('d/m/Y \k\l\. H:i') }} | {{\App\Event::query()->where('id', '=', $new->arrangement_id)->first()->accountable}} </div>
<div class="row" style="justify-content: space-between; padding-top: 12px; border-top: 1px solid rgba(0, 0, 0, .2);">
@if (count(\App\UserEvent::query()->where('event_id', '=', $new->arrangement_id)->where('user_id', '=', Auth::user()->id)->get()) > 0)
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:void(0);" onclick="ajaxCall({{ $new->arrangement_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 style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:void(0);" onclick="ajaxCall({{ $new->arrangement_id }}, this)" >{{__('msg.tilmeld')}}</a>
@endif
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.show", ["event" => $new->arrangement_id ])}}">{{__('msg.læsmere')}}</a>
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.accountsignups", ["event" => $new->arrangement_id ])}}">{{__('msg.sedeltagere')}}</a>
</div>
</div>
@endif
</div>
@else<!--Code that prints guides-->
<div class="card">
@@ -151,7 +180,7 @@
<div class="container" style="margin-top: 8px;">
{!! \App\Helpers::closetags(substr($new->content, 0, 300) ) !!}
@if ($new->type == 'Guide') {{-- Else if's displaying guides, then show `Læs mere` --}}
<div class="row" style="justify-content: center; border-top: 1px solid rgba(0, 0, 0, .2);">
<div class="row" style="justify-content: center; padding-top: 12px; border-top: 1px solid rgba(0, 0, 0, .2);">
<a style="font-weight: 700;" href="{{route("guides.show", ["guide" => $new->arrangement_id])}}" class="sde-blue">{{__('msg.læsmere')}}</a>
</div>
@endif {{-- Else if it's a menu or news, then don't show a button at bottom --}}