0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-22 07:40:58 +00: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 
This commit is contained in:
Dan Brown 2020-04-10 12:49:16 +01:00
parent b8c16b15a9
commit 053cbbd5b6
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
9 changed files with 54 additions and 61 deletions
app/Http/Controllers

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', [