From 75fbd373c86d313e76ffd5aa884733c2d0e63cb4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Aug 2022 20:32:17 -0600 Subject: [PATCH] Remove quilljs from admin page editor, fixes #3616 --- app/Http/Controllers/SiteController.php | 2 +- resources/views/admin/pages/edit.blade.php | 127 +++++++++++---------- resources/views/admin/pages/home.blade.php | 107 +++++++++-------- 3 files changed, 122 insertions(+), 114 deletions(-) diff --git a/app/Http/Controllers/SiteController.php b/app/Http/Controllers/SiteController.php index 7202f7c6e..f4cac26be 100644 --- a/app/Http/Controllers/SiteController.php +++ b/app/Http/Controllers/SiteController.php @@ -80,7 +80,7 @@ class SiteController extends Controller { $page = Cache::remember('site:privacy', now()->addDays(120), function() { $slug = '/site/privacy'; - $page = Page::whereSlug($slug)->whereActive(true)->first(); + return Page::whereSlug($slug)->whereActive(true)->first(); }); return View::make('site.privacy')->with(compact('page'))->render(); } diff --git a/resources/views/admin/pages/edit.blade.php b/resources/views/admin/pages/edit.blade.php index de1a7feb8..5a3530e0d 100644 --- a/resources/views/admin/pages/edit.blade.php +++ b/resources/views/admin/pages/edit.blade.php @@ -1,27 +1,36 @@ -@extends('admin.partial.template') - -@include('admin.settings.sidebar') +@extends('admin.partial.template-full') @section('section') -
-

Edit Page

-

{{$page->slug}}

-
-
- -
+
+
+
+
+
+
+

Edit Page

+

{{$page->slug}}

+
+
+
+
+
+

Page URL: {{$page->url()}} {{-- Edit --}}

-
+
{!!$page->content!!}
+
+ + +
-
+
active?'checked="true"':''}}>
@@ -34,69 +43,69 @@
- +
@endsection @push('styles') - @endpush @push('scripts') - - -@endpush \ No newline at end of file +@endpush diff --git a/resources/views/admin/pages/home.blade.php b/resources/views/admin/pages/home.blade.php index cb315c27b..bab294647 100644 --- a/resources/views/admin/pages/home.blade.php +++ b/resources/views/admin/pages/home.blade.php @@ -1,11 +1,56 @@ @extends('admin.partial.template-full') @section('section') -
-

Pages

-

Set custom page content

-
-
+
+
+
+
+
+
+

Pages

+

Manage public and custom page content

+
+ + @if($pages->count() < 4) +
+
+
+ @if(!$pages->contains('slug', '=', '/site/about')) +
+ @csrf + + +
+ @endif + @if(!$pages->contains('slug', '=', '/site/privacy')) +
+ @csrf + + +
+ @endif + @if(!$pages->contains('slug', '=', '/site/terms')) +
+ @csrf + + +
+ @endif + @if(!$pages->contains('slug', '=', '/site/kb/community-guidelines')) +
+ @csrf + + +
+ @endif +
+
+ @endif +
+
+
+
+
@if($pages->count())
@@ -46,57 +91,11 @@
{{$pages->links()}}
-
-
-
- @csrf - - - -
- @csrf - - - -
- @csrf - - - -
- @csrf - - - -
- @else -
+ @else +
-

No custom pages found

+

No custom pages found

-
-
-
- @csrf - - - -
- @csrf - - - -
- @csrf - - - -
- @csrf - - - -
@endif @endsection