Skip to content

Commit

Permalink
temporary fix for general category permissions, adjusted some things
Browse files Browse the repository at this point in the history
  • Loading branch information
CaffeineSheep committed Mar 18, 2023
1 parent ab68594 commit 41d7147
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
]);

Expand Down
4 changes: 4 additions & 0 deletions resources/sass/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions resources/sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 41d7147

Please sign in to comment.