0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-22 07:40:58 +00: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
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
26 changed files with 369 additions and 338 deletions
app/Http/Controllers

View file

@ -40,15 +40,15 @@ class BookshelfController extends Controller
$recents = $this->signedIn ? $this->entityRepo->getRecentlyViewed('bookshelf', 4, 0) : false;
$popular = $this->entityRepo->getPopular('bookshelf', 4, 0);
$new = $this->entityRepo->getRecentlyCreated('bookshelf', 4, 0);
$shelvesViewType = setting()->getUser($this->currentUser, 'bookshelves_view_type', config('app.views.bookshelves', 'grid'));
$view = setting()->getUser($this->currentUser, 'bookshelves_view_type', config('app.views.bookshelves', 'grid'));
$this->setPageTitle(trans('entities.shelves'));
return view('shelves/index', [
return view('shelves.index', [
'shelves' => $shelves,
'recents' => $recents,
'popular' => $popular,
'new' => $new,
'shelvesViewType' => $shelvesViewType
'view' => $view
]);
}
@ -61,7 +61,7 @@ class BookshelfController extends Controller
$this->checkPermission('bookshelf-create-all');
$books = $this->entityRepo->getAll('book', false, 'update');
$this->setPageTitle(trans('entities.shelves_create'));
return view('shelves/create', ['books' => $books]);
return view('shelves.create', ['books' => $books]);
}
/**
@ -100,7 +100,7 @@ class BookshelfController extends Controller
Views::add($bookshelf);
$this->setPageTitle($bookshelf->getShortName());
return view('shelves/show', [
return view('shelves.show', [
'shelf' => $bookshelf,
'books' => $books,
'activity' => Activity::entityActivity($bookshelf, 20, 0)
@ -126,7 +126,7 @@ class BookshelfController extends Controller
});
$this->setPageTitle(trans('entities.shelves_edit_named', ['name' => $bookshelf->getShortName()]));
return view('shelves/edit', [
return view('shelves.edit', [
'shelf' => $bookshelf,
'books' => $books,
'shelfBooks' => $shelfBooks,
@ -170,7 +170,7 @@ class BookshelfController extends Controller
$this->checkOwnablePermission('bookshelf-delete', $bookshelf);
$this->setPageTitle(trans('entities.shelves_delete_named', ['name' => $bookshelf->getShortName()]));
return view('shelves/delete', ['shelf' => $bookshelf]);
return view('shelves.delete', ['shelf' => $bookshelf]);
}
/**