]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/BookController.php
Changed the location of the "view-toggle" to be under the books views.
[bookstack] / app / Http / Controllers / BookController.php
index 7a98bd49ec1b67119c7aa151c0cb874964505a94..2c3946239cac3981e4abffab0fe5ae14b4ce2de9 100644 (file)
@@ -36,11 +36,11 @@ class BookController extends Controller
      */
     public function index()
     {
-        $books = $this->entityRepo->getAllPaginated('book', 20);
+        $books = $this->entityRepo->getAllPaginated('book', 18);
         $recents = $this->signedIn ? $this->entityRepo->getRecentlyViewed('book', 4, 0) : false;
         $popular = $this->entityRepo->getPopular('book', 4, 0);
         $new = $this->entityRepo->getRecentlyCreated('book', 4, 0);
-        $booksViewType = setting()->getUser($this->currentUser, 'books_view_type', 'list');
+        $booksViewType = setting()->getUser($this->currentUser, 'books_view_type', config('app.views.books', 'list'));
         $this->setPageTitle(trans('entities.books'));
         return view('books/index', [
             'books' => $books,