1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-27 06:01:54 +03:00

Show bookshelves that a book belongs to on a book view

Closes #1598
This commit is contained in:
Christopher Wilkinson
2019-09-27 00:45:10 +01:00
parent 7cd956b24b
commit 4ad4dfa55a
5 changed files with 52 additions and 3 deletions

View File

@ -150,6 +150,7 @@ class BookController extends Controller
$this->checkOwnablePermission('book-view', $book);
$bookChildren = $this->bookRepo->getBookChildren($book);
$bookParentShelves = $this->bookRepo->getBookParentShelves($book);
Views::add($book);
if ($request->has('shelf')) {
@ -161,6 +162,7 @@ class BookController extends Controller
'book' => $book,
'current' => $book,
'bookChildren' => $bookChildren,
'bookParentShelves' => $bookParentShelves,
'activity' => Activity::entityActivity($book, 20, 1)
]);
}