1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Updated view-change endpoints to be clearer, separated books and shelf

- Separated books-list and shelf-show view types to be saved separately.

During review of #1755
This commit is contained in:
Dan Brown
2020-04-10 12:49:16 +01:00
parent b8c16b15a9
commit 053cbbd5b6
9 changed files with 54 additions and 61 deletions

View File

@ -103,11 +103,11 @@ 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);
$this->entityContextManager->setShelfContext($shelf->id);
$view = setting()->getForCurrentUser('bookshelf_view_type', config('app.views.books'));
$this->setPageTitle($shelf->getShortName());
return view('shelves.show', [