mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 12:16:07 +00:00
Made default books view configurable in .env
Under 'APP_VIEWS_BOOKS' key. Closes #675
This commit is contained in:
parent
1d5440493c
commit
a45922616f
@ -40,7 +40,7 @@ class BookController extends Controller
|
|||||||
$recents = $this->signedIn ? $this->entityRepo->getRecentlyViewed('book', 4, 0) : false;
|
$recents = $this->signedIn ? $this->entityRepo->getRecentlyViewed('book', 4, 0) : false;
|
||||||
$popular = $this->entityRepo->getPopular('book', 4, 0);
|
$popular = $this->entityRepo->getPopular('book', 4, 0);
|
||||||
$new = $this->entityRepo->getRecentlyCreated('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'));
|
$this->setPageTitle(trans('entities.books'));
|
||||||
return view('books/index', [
|
return view('books/index', [
|
||||||
'books' => $books,
|
'books' => $books,
|
||||||
|
@ -2,11 +2,14 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
|
|
||||||
'env' => env('APP_ENV', 'production'),
|
'env' => env('APP_ENV', 'production'),
|
||||||
|
|
||||||
'editor' => env('APP_EDITOR', 'html'),
|
'editor' => env('APP_EDITOR', 'html'),
|
||||||
|
|
||||||
|
'views' => [
|
||||||
|
'books' => env('APP_VIEWS_BOOKS', 'list')
|
||||||
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Application Debug Mode
|
| Application Debug Mode
|
||||||
|
Loading…
Reference in New Issue
Block a user