mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-06 10:44:33 +08:00
Allow toggling between grid and list view in shelf view (shelves.show)
This commit is contained in:
@ -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)
|
||||
]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user