From 41d7147a29e634ee816d67728a273d640c27c273 Mon Sep 17 00:00:00 2001 From: CaffeineSheep Date: Sat, 18 Mar 2023 16:07:57 +0000 Subject: [PATCH] temporary fix for general category permissions, adjusted some things --- app/Http/Controllers/HomeController.php | 3 +-- resources/sass/_colors.scss | 4 ++++ resources/sass/_variables.scss | 9 +++++++++ .../views/search/parts/entity-selector-list.blade.php | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 7a61eea7ff0..0529e178c76 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -44,8 +44,7 @@ public function index(Request $request, ActivityQueries $activities) $quickLinks = collect([ new BasicListItem('/shelves/symbols', 'All Symbols', 'See all of the official symbols', 'star-circle'), new BasicListItem(env('TASK_MANAGER_URL', null), 'SymbolHub', 'Find new symbols to add', 'symbolhub'), - new BasicListItem('/shelves/getting-started/all', 'How Can I Help?', 'Learn how you can help Symbolpedia!', 'info'), - // ...(Bookshelf::getBySlug('contribute')->visibleBooks()->get()->all() ?? [], true), + new BasicListItem('/books/general/page/getting-started', 'Getting Started', 'Learn how you can help Symbolpedia!', 'info'), ...Bookshelf::getBySlug('contribute')->visibleBooks()->get()->all(), ]); diff --git a/resources/sass/_colors.scss b/resources/sass/_colors.scss index 5cd9545e63c..71d8708b444 100644 --- a/resources/sass/_colors.scss +++ b/resources/sass/_colors.scss @@ -95,6 +95,10 @@ color: var(--color-chapter); fill: var(--color-chapter); } +.text-info, .text-info:hover { + color: var(--color-info); + fill: var(--color-info); +} /* * Standard & Entity background colors diff --git a/resources/sass/_variables.scss b/resources/sass/_variables.scss index edae9ce3064..e58a74497c0 100644 --- a/resources/sass/_variables.scss +++ b/resources/sass/_variables.scss @@ -48,6 +48,15 @@ $fs-s: 12px; --color-book: #077b70; --color-bookshelf: #a94747; + // --color-info: #E4572E; + // --color-info: #F7B801; + // --color-info: #52FFB8; + // --color-info: #00CC77; + // --color-info: #55DDE0; + + // --color-info: #26CCCF; + --color-info: #23BBBE; + // --color-tasks: #5249ff; // --color-tasks: #4983ff; --color-tasks: #359d49; diff --git a/resources/views/search/parts/entity-selector-list.blade.php b/resources/views/search/parts/entity-selector-list.blade.php index cc22515c18f..04bec65f0a8 100644 --- a/resources/views/search/parts/entity-selector-list.blade.php +++ b/resources/views/search/parts/entity-selector-list.blade.php @@ -5,7 +5,7 @@ @include('entities.list-item', [ 'entity' => $entity, 'showPath' => true, - 'locked' => $permission !== 'view' && !userCan($permission, $entity) && ($entity->slug !== 'community-review' && userCan('page-update', $entity) && $entity instanceof \BookStack\Entities\Models\Book) + 'locked' => $permission !== 'view' && !userCan($permission, $entity) && (($entity->slug !== 'community-review' && userCan('page-update', $entity)) || ($entity->slug == 'general' && !userCan('page-update', $entity))) && $entity instanceof \BookStack\Entities\Models\Book ]) @if($index !== count($entities) - 1)