1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-06-13 00:41:59 +03:00

Migrated a whole load more page/chapter/shelf views

This commit is contained in:
Dan Brown
2019-02-02 11:41:41 +00:00
parent 32603362a6
commit 20988962fe
26 changed files with 369 additions and 338 deletions

View File

@ -214,13 +214,14 @@ class ChapterController extends Controller
* @param $bookSlug
* @param $chapterSlug
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
* @throws \BookStack\Exceptions\NotFoundException
*/
public function showRestrict($bookSlug, $chapterSlug)
public function showPermissions($bookSlug, $chapterSlug)
{
$chapter = $this->entityRepo->getBySlug('chapter', $chapterSlug, $bookSlug);
$this->checkOwnablePermission('restrictions-manage', $chapter);
$roles = $this->userRepo->getRestrictableRoles();
return view('chapters/restrictions', [
return view('chapters.permissions', [
'chapter' => $chapter,
'roles' => $roles
]);
@ -232,8 +233,10 @@ class ChapterController extends Controller
* @param $chapterSlug
* @param Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
* @throws \BookStack\Exceptions\NotFoundException
* @throws \Throwable
*/
public function restrict($bookSlug, $chapterSlug, Request $request)
public function permissions($bookSlug, $chapterSlug, Request $request)
{
$chapter = $this->entityRepo->getBySlug('chapter', $chapterSlug, $bookSlug);
$this->checkOwnablePermission('restrictions-manage', $chapter);