v1.4.8h Fix guides category again :)

This commit is contained in:
victor 2020-10-28 08:20:50 +01:00
parent f51f92b218
commit 16eba9cd62
2 changed files with 34 additions and 11 deletions

View File

@ -10,6 +10,7 @@
@endsection @endsection
@section("content") @section("content")
<script src="toast.js"></script>
<h1 id="errormesseages" >Opret Bruger:</h1> <h1 id="errormesseages" >Opret Bruger:</h1>
<form method="post" action="{{ route("users.store") }}" onsubmit="return checkInputs()" enctype="multipart/form-data"> <form method="post" action="{{ route("users.store") }}" onsubmit="return checkInputs()" enctype="multipart/form-data">
@csrf @csrf
@ -44,7 +45,7 @@
</select> </select>
<label for="fileuploade">Skift brugerens profile billede:</label> <label for="fileuploade">Skift brugerens profile billede:</label>
<input id="fileuploade" type="file" name="resource" accept="image/*"> <input id="fileuploade" type="file" name="resource" accept="image/*">
<input type="submit" class="btn btn-dark text-white" value="Opret"> <input type="submit" class="btn btn-dark text-white" onclick="userMade()" value="Opret">
</form> </form>
@endsection @endsection
@ -123,5 +124,15 @@
else else
return false; return false;
} }
function userMade(){
new Toast({
message: 'This is a danger message. You can use this for errors etc',
type: 'danger'
});
}
</script> </script>
@endsection @endsection

View File

@ -190,18 +190,30 @@
@if($new->resource_id !== null) @if($new->resource_id !== null)
<div class="header" style="background-size: cover; background-position: center; background-image: url('{{ asset(\App\Resource::query()->where("id", "=", $new->resource_id)->first()->filename) }}');"></div> <div class="header" style="background-size: cover; background-position: center; background-image: url('{{ asset(\App\Resource::query()->where("id", "=", $new->resource_id)->first()->filename) }}');"></div>
<div class="information">{{__('msg.kategori')}}: {{\App\GuidesCategory::query()->where('id', '=', \App\Guide::query()->where('id','=', $new->arrangement_id)->first()->guide_category_id)->first()->guidesCategoryName}}</div> <div class="information">{{__('msg.kategori')}}: {{\App\GuidesCategory::query()->where('id', '=', \App\Guide::query()->where('id','=', $new->arrangement_id)->first()->guide_category_id)->first()->guidesCategoryName}}</div>
<div class="container" style="margin-top: 8px;">
@php $tags = [ '<p>', '<b>', '<em>', '<a>', '<u>', '<s>', '<sub>', '<ul>', '<li>', '<sup>', '<div>', '<blockquote>', '<ol>', '<strong>', '<br>', '<h1>', '<h2>', '<h3>', '<h4>', '<h5>', '<h6>', '<h7>', '<span>'] @endphp
{!! \App\Helpers::closetags(substr(strip_tags($new->content, $tags), 0, 300)) !!}
@if ($new->type == 'Guide') {{-- Else if's displaying guides, then show `Læs mere` --}}
<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 --}}
</div>
@else
<div class="container" style="margin-top: 8px;">
@php $tags = [ '<p>', '<b>', '<em>', '<a>', '<u>', '<s>', '<sub>', '<ul>', '<li>', '<sup>', '<div>', '<blockquote>', '<ol>', '<strong>', '<br>', '<h1>', '<h2>', '<h3>', '<h4>', '<h5>', '<h6>', '<h7>', '<span>'] @endphp
{!! \App\Helpers::closetags(substr(strip_tags($new->content, $tags), 0, 300)) !!}
<div class="information2">{{__('msg.kategori')}}: {{\App\GuidesCategory::query()->where('id', '=', \App\Guide::query()->where('id','=', $new->arrangement_id)->first()->guide_category_id)->first()->guidesCategoryName}}</div>
@if ($new->type == 'Guide') {{-- Else if's displaying guides, then show `Læs mere` --}}
<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 --}}
</div>
@endif @endif
<div class="container" style="margin-top: 8px;">
@php $tags = [ '<p>', '<b>', '<em>', '<a>', '<u>', '<s>', '<sub>', '<ul>', '<li>', '<sup>', '<div>', '<blockquote>', '<ol>', '<strong>', '<br>', '<h1>', '<h2>', '<h3>', '<h4>', '<h5>', '<h6>', '<h7>', '<span>'] @endphp
{!! \App\Helpers::closetags(substr(strip_tags($new->content, $tags), 0, 300)) !!}
<div class="information2">{{__('msg.kategori')}}: {{\App\GuidesCategory::query()->where('id', '=', \App\Guide::query()->where('id','=', $new->arrangement_id)->first()->guide_category_id)->first()->guidesCategoryName}}</div>
@if ($new->type == 'Guide') {{-- Else if's displaying guides, then show `Læs mere` --}}
<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 --}}
</div>
</div> </div>
@endif @endif