0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-19 22:51:30 +00:00

Merge branch 'feature_change_view_in_shelves_show' of git://github.com/philjak/BookStack into philjak-feature_change_view_in_shelves_show

This commit is contained in:
Dan Brown 2020-04-10 12:21:56 +01:00
commit b8c16b15a9
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
2 changed files with 17 additions and 5 deletions
app/Http/Controllers

View file

@ -103,6 +103,7 @@ class BookshelfController extends Controller
public function show(string $slug)
{
$shelf = $this->bookshelfRepo->getBySlug($slug);
$view = setting()->getForCurrentUser('books_view_type', config('app.views.books'));
$this->checkOwnablePermission('book-view', $shelf);
Views::add($shelf);
@ -111,6 +112,7 @@ class BookshelfController extends Controller
$this->setPageTitle($shelf->getShortName());
return view('shelves.show', [
'shelf' => $shelf,
'view' => $view,
'activity' => Activity::entityActivity($shelf, 20, 1)
]);
}