mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-17 13:52:04 +00:00
Allow toggling between grid and list view in shelf view (shelves.show)
This commit is contained in:
parent
189a598d56
commit
6cd26e23a8
2 changed files with 17 additions and 5 deletions
app/Http/Controllers
|
@ -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)
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue