From 138f5d5c4f1570ed041c93ee8a558fe792b16025 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 3 Feb 2019 13:45:45 +0000 Subject: [PATCH] Updated user and shelf views to new design --- app/Actions/ActivityService.php | 4 +- app/Auth/UserRepo.php | 2 +- app/Entities/Bookshelf.php | 3 +- app/Http/Controllers/BookController.php | 2 +- app/Http/Controllers/BookshelfController.php | 37 +- app/Http/Controllers/PageController.php | 14 - app/Http/Controllers/UserController.php | 13 +- resources/assets/sass/_blocks.scss | 18 +- resources/assets/sass/_buttons.scss | 11 +- resources/assets/sass/_colors.scss | 3 + resources/assets/sass/_forms.scss | 19 +- resources/assets/sass/_grid.scss | 22 +- resources/assets/sass/_text.scss | 4 +- resources/lang/en/settings.php | 7 +- resources/views/books/edit.blade.php | 2 +- resources/views/books/list.blade.php | 4 +- resources/views/books/show.blade.php | 2 +- .../components/custom-checkbox.blade.php | 11 + .../views/components/image-picker.blade.php | 25 +- .../views/components/toggle-switch.blade.php | 2 +- resources/views/form/checkbox.blade.php | 20 +- .../views/form/entity-permissions.blade.php | 17 +- .../views/form/restriction-checkbox.blade.php | 19 +- .../views/form/role-checkboxes.blade.php | 21 +- .../views/pages/detailed-listing.blade.php | 16 +- resources/views/partials/sort.blade.php | 2 +- resources/views/search/all.blade.php | 402 +++++++++--------- resources/views/shelves/delete.blade.php | 32 +- resources/views/shelves/edit.blade.php | 32 +- resources/views/shelves/grid-item.blade.php | 23 +- resources/views/shelves/index.blade.php | 10 +- resources/views/shelves/list-item.blade.php | 18 +- resources/views/shelves/list.blade.php | 32 +- resources/views/shelves/permissions.blade.php | 29 ++ .../views/shelves/restrictions.blade.php | 34 -- resources/views/shelves/show.blade.php | 112 ++--- resources/views/users/create.blade.php | 41 +- resources/views/users/delete.blade.php | 39 +- resources/views/users/edit.blade.php | 138 +++--- resources/views/users/forms/ldap.blade.php | 2 + .../views/users/forms/standard.blade.php | 61 +-- resources/views/users/forms/system.blade.php | 2 + resources/views/users/index.blade.php | 2 +- routes/web.php | 7 +- 44 files changed, 719 insertions(+), 597 deletions(-) create mode 100644 resources/views/components/custom-checkbox.blade.php create mode 100644 resources/views/shelves/permissions.blade.php delete mode 100644 resources/views/shelves/restrictions.blade.php diff --git a/app/Actions/ActivityService.php b/app/Actions/ActivityService.php index 37cd0a6a4..11f8b8732 100644 --- a/app/Actions/ActivityService.php +++ b/app/Actions/ActivityService.php @@ -103,7 +103,7 @@ class ActivityService * @param int $page * @return array */ - public function entityActivity($entity, $count = 20, $page = 0) + public function entityActivity($entity, $count = 20, $page = 1) { if ($entity->isA('book')) { $query = $this->activity->where('book_id', '=', $entity->id); @@ -114,7 +114,7 @@ class ActivityService $activity = $this->permissionService ->filterRestrictedEntityRelations($query, 'activities', 'entity_id', 'entity_type') - ->orderBy('created_at', 'desc')->with(['entity', 'user.avatar'])->skip($count * $page)->take($count)->get(); + ->orderBy('created_at', 'desc')->with(['entity', 'user.avatar'])->skip($count * ($page - 1))->take($count)->get(); return $this->filterSimilar($activity); } diff --git a/app/Auth/UserRepo.php b/app/Auth/UserRepo.php index 31b91108d..b2ff0bc58 100644 --- a/app/Auth/UserRepo.php +++ b/app/Auth/UserRepo.php @@ -256,7 +256,7 @@ class UserRepo */ public function getAllRoles() { - return $this->role->all(); + return $this->role->newQuery()->orderBy('name', 'asc')->get(); } /** diff --git a/app/Entities/Bookshelf.php b/app/Entities/Bookshelf.php index c37e36b59..6753c2882 100644 --- a/app/Entities/Bookshelf.php +++ b/app/Entities/Bookshelf.php @@ -50,6 +50,7 @@ class Bookshelf extends Entity */ public function getBookCover($width = 440, $height = 250) { + // TODO - Make generic, focused on books right now, Perhaps set-up a better image $default = baseUrl('/book_default_cover.png'); if (!$this->image_id) { return $default; @@ -64,7 +65,7 @@ class Bookshelf extends Entity } /** - * Get the cover image of the book + * Get the cover image of the shelf * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function cover() diff --git a/app/Http/Controllers/BookController.php b/app/Http/Controllers/BookController.php index 95cd8bdeb..65f97b8c9 100644 --- a/app/Http/Controllers/BookController.php +++ b/app/Http/Controllers/BookController.php @@ -108,7 +108,7 @@ class BookController extends Controller 'book' => $book, 'current' => $book, 'bookChildren' => $bookChildren, - 'activity' => Activity::entityActivity($book, 20, 0) + 'activity' => Activity::entityActivity($book, 20, 1) ]); } diff --git a/app/Http/Controllers/BookshelfController.php b/app/Http/Controllers/BookshelfController.php index 8db362f3c..dd305be97 100644 --- a/app/Http/Controllers/BookshelfController.php +++ b/app/Http/Controllers/BookshelfController.php @@ -36,11 +36,22 @@ class BookshelfController extends Controller */ public function index() { - $shelves = $this->entityRepo->getAllPaginated('bookshelf', 18); + + $view = setting()->getUser($this->currentUser, 'bookshelves_view_type', config('app.views.bookshelves', 'grid')); + + $sort = setting()->getUser($this->currentUser, 'bookshelves_sort', 'name'); + $order = setting()->getUser($this->currentUser, 'bookshelves_sort_order', 'asc'); + $sortOptions = [ + 'name' => trans('common.sort_name'), + 'created_at' => trans('common.sort_created_at'), + 'updated_at' => trans('common.sort_updated_at'), + ]; + + $shelves = $this->entityRepo->getAllPaginated('bookshelf', 18, $sort, $order); $recents = $this->signedIn ? $this->entityRepo->getRecentlyViewed('bookshelf', 4, 0) : false; $popular = $this->entityRepo->getPopular('bookshelf', 4, 0); $new = $this->entityRepo->getRecentlyCreated('bookshelf', 4, 0); - $view = setting()->getUser($this->currentUser, 'bookshelves_view_type', config('app.views.bookshelves', 'grid')); + $this->setPageTitle(trans('entities.shelves')); return view('shelves.index', [ @@ -48,7 +59,10 @@ class BookshelfController extends Controller 'recents' => $recents, 'popular' => $popular, 'new' => $new, - 'view' => $view + 'view' => $view, + 'sort' => $sort, + 'order' => $order, + 'sortOptions' => $sortOptions, ]); } @@ -103,7 +117,7 @@ class BookshelfController extends Controller return view('shelves.show', [ 'shelf' => $bookshelf, 'books' => $books, - 'activity' => Activity::entityActivity($bookshelf, 20, 0) + 'activity' => Activity::entityActivity($bookshelf, 20, 1) ]); } @@ -190,31 +204,32 @@ class BookshelfController extends Controller } /** - * Show the Restrictions view. - * @param $slug + * Show the permissions view. + * @param string $slug * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View * @throws \BookStack\Exceptions\NotFoundException */ - public function showRestrict(string $slug) + public function showPermissions(string $slug) { $bookshelf = $this->entityRepo->getBySlug('bookshelf', $slug); $this->checkOwnablePermission('restrictions-manage', $bookshelf); $roles = $this->userRepo->getRestrictableRoles(); - return view('shelves.restrictions', [ + return view('shelves.permissions', [ 'shelf' => $bookshelf, 'roles' => $roles ]); } /** - * Set the restrictions for this bookshelf. - * @param $slug + * Set the permissions for this bookshelf. + * @param string $slug * @param Request $request * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector * @throws \BookStack\Exceptions\NotFoundException + * @throws \Throwable */ - public function restrict(string $slug, Request $request) + public function permissions(string $slug, Request $request) { $bookshelf = $this->entityRepo->getBySlug('bookshelf', $slug); $this->checkOwnablePermission('restrictions-manage', $bookshelf); diff --git a/app/Http/Controllers/PageController.php b/app/Http/Controllers/PageController.php index 875cca60a..7ebf26209 100644 --- a/app/Http/Controllers/PageController.php +++ b/app/Http/Controllers/PageController.php @@ -534,20 +534,6 @@ class PageController extends Controller return $this->downloadResponse($pageText, $pageSlug . '.txt'); } - /** - * Show a listing of recently created pages - * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View - */ - public function showRecentlyCreated() - { - // TODO - Still exist? - $pages = $this->pageRepo->getRecentlyCreatedPaginated('page', 20)->setPath(baseUrl('/pages/recently-created')); - return view('pages.detailed-listing', [ - 'title' => trans('entities.recently_created_pages'), - 'pages' => $pages - ]); - } - /** * Show a listing of recently created pages * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index fc0431e94..327a54995 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -289,15 +289,20 @@ class UserController extends Controller } /** - * Change the stored sort type for the books view. - * @param $id + * Change the stored sort type for a particular view. + * @param string $id + * @param string $type * @param Request $request * @return \Illuminate\Http\RedirectResponse */ - public function changeBooksSort($id, Request $request) + public function changeSort(string $id, string $type, Request $request) { // TODO - Test this endpoint - return $this->changeListSort($id, $request, 'books'); + $validSortTypes = ['books', 'bookshelves']; + if (!in_array($type, $validSortTypes)) { + return redirect()->back(500); + } + return $this->changeListSort($id, $request, $type); } /** diff --git a/resources/assets/sass/_blocks.scss b/resources/assets/sass/_blocks.scss index 1baec7a92..a52ac71a9 100644 --- a/resources/assets/sass/_blocks.scss +++ b/resources/assets/sass/_blocks.scss @@ -86,27 +86,27 @@ @mixin spacing($prop, $propLetter) { @each $sizeLetter, $size in $spacing { .#{$propLetter}-#{$sizeLetter} { - #{$prop}: $size; + #{$prop}: $size !important; } .#{$propLetter}x-#{$sizeLetter} { - #{$prop}-left: $size; - #{$prop}-right: $size; + #{$prop}-left: $size !important; + #{$prop}-right: $size !important; } .#{$propLetter}y-#{$sizeLetter} { - #{$prop}-top: $size; - #{$prop}-bottom: $size; + #{$prop}-top: $size !important; + #{$prop}-bottom: $size !important; } .#{$propLetter}t-#{$sizeLetter} { - #{$prop}-top: $size; + #{$prop}-top: $size !important; } .#{$propLetter}r-#{$sizeLetter} { - #{$prop}-right: $size; + #{$prop}-right: $size !important; } .#{$propLetter}b-#{$sizeLetter} { - #{$prop}-bottom: $size; + #{$prop}-bottom: $size !important; } .#{$propLetter}l-#{$sizeLetter} { - #{$prop}-left: $size; + #{$prop}-left: $size !important; } } diff --git a/resources/assets/sass/_buttons.scss b/resources/assets/sass/_buttons.scss index 49615fc9d..5e973a947 100644 --- a/resources/assets/sass/_buttons.scss +++ b/resources/assets/sass/_buttons.scss @@ -28,7 +28,7 @@ $button-border-radius: 2px; .button-base { text-decoration: none; - font-size: $fs-m; + font-size: 0.85rem; line-height: 1.4em; padding: $-xs*1.3 $-m; margin-top: $-xs; @@ -67,6 +67,11 @@ $button-border-radius: 2px; margin-left: $-s; } +.button.small { + font-size: 0.75rem; + padding: $-xs*1.2 $-s; +} + .button.outline { background-color: transparent; color: #888; @@ -115,6 +120,7 @@ $button-border-radius: 2px; margin: 0; border: none; user-select: none; + font-size: 0.75rem; &:focus, &:active { outline: 0; } @@ -124,6 +130,9 @@ $button-border-radius: 2px; &.neg { color: $negative; } + &.muted { + color: #666; + } } .button-group { diff --git a/resources/assets/sass/_colors.scss b/resources/assets/sass/_colors.scss index d89b26463..d2ee13837 100644 --- a/resources/assets/sass/_colors.scss +++ b/resources/assets/sass/_colors.scss @@ -101,4 +101,7 @@ p.secondary, p .secondary, span.secondary, .text-secondary { .bg-book { background-color: $color-book; +} +.bg-shelf { + background-color: $color-bookshelf; } \ No newline at end of file diff --git a/resources/assets/sass/_forms.scss b/resources/assets/sass/_forms.scss index 2c612f533..6634ac81b 100644 --- a/resources/assets/sass/_forms.scss +++ b/resources/assets/sass/_forms.scss @@ -98,7 +98,7 @@ label { line-height: 1.4em; font-size: 0.94em; font-weight: 400; - color: #999; + color: #666; padding-bottom: 2px; margin-bottom: 0.2em; &.inline { @@ -149,9 +149,10 @@ input[type=date] { height: 16px; border-radius: 2px; display: inline-block; - border: 2px solid #999; + border: 2px solid currentColor; + opacity: 0.6; overflow: hidden; - fill: #888; + fill: currentColor; .svg-icon { width: 100%; height: 100%; @@ -172,8 +173,12 @@ input[type=date] { } .custom-checkbox:hover { background-color: rgba(0, 0, 0, 0.05); + opacity: 0.8; } } +.toggle-switch-list .toggle-switch { + margin: $-xs 0; +} .form-group { margin-bottom: $-s; @@ -193,6 +198,14 @@ input[type=date] { .setting-list-label + p.small { margin-bottom: 0; } +.setting-list-label + .grid { + margin-top: $-m; +} +.setting-list .grid { + input[type=text], input[type=email], input[type=password], select { + width: 100%; + } +} .simple-code-input { background-color: #F8F8F8; diff --git a/resources/assets/sass/_grid.scss b/resources/assets/sass/_grid.scss index 1bcfefe64..b3d4895a3 100644 --- a/resources/assets/sass/_grid.scss +++ b/resources/assets/sass/_grid.scss @@ -50,6 +50,16 @@ body.flexbox { flex: 1; } +.dual-column-content { + columns: 2; +} + +@include smaller-than($m) { + .dual-column-content { + columns: 1; + } +} + .content-wrap.card { padding: $-l $-xxl; margin-left: auto; @@ -65,6 +75,12 @@ body.flexbox { } } +@include smaller-than($m) { + .content-wrap.card { + padding: $-m $-l; + } +} + .tri-layout-container { display: grid; grid-template-columns: 1fr minmax(auto, 940px) 1fr; @@ -271,9 +287,13 @@ div[class^="col-"] img { .grid.third { grid-template-columns: 1fr 1fr; } - .grid.left-focus, .grid.right-focus { + .grid.half, .grid.left-focus, .grid.right-focus { grid-template-columns: 1fr; } + .grid.large-gap { + grid-column-gap: $-m; + grid-row-gap: $-m; + } .grid.right-focus.reverse-collapse > *:nth-child(2) { order: 0; } diff --git a/resources/assets/sass/_text.scss b/resources/assets/sass/_text.scss index 683c8077a..972eafddd 100644 --- a/resources/assets/sass/_text.scss +++ b/resources/assets/sass/_text.scss @@ -149,8 +149,8 @@ em, i, .italic { } small, p.small, span.small, .text-small { - font-size: 0.8em; - color: lighten($text-dark, 20%); + font-size: 0.85em; + color: lighten($text-dark, 10%); small, p.small, span.small, .text-small { font-size: 1em; } diff --git a/resources/lang/en/settings.php b/resources/lang/en/settings.php index c5dba1dd5..eb0d8df07 100755 --- a/resources/lang/en/settings.php +++ b/resources/lang/en/settings.php @@ -91,9 +91,14 @@ return [ 'user_profile' => 'User Profile', 'users_add_new' => 'Add New User', 'users_search' => 'Search Users', + 'users_details' => 'User Details', + 'users_details_desc' => 'Set a display name and an email address for this user. The email address will be used for logging into the application.', 'users_role' => 'User Roles', + 'users_role_desc' => 'Select which roles this user will be assigned to. If a user is assigned to multiple roles the permissions from those roles will stack and they will receive all abilities of the assigned roles.', + 'users_password' => 'User Password', + 'users_password_desc' => 'Set a password used to log-in to the application. This must be at least 5 characters long.', 'users_external_auth_id' => 'External Authentication ID', - 'users_password_warning' => 'Only fill the below if you would like to change your password:', + 'users_password_warning' => 'Only fill the below if you would like to change your password.', 'users_system_public' => 'This user represents any guest users that visit your instance. It cannot be used to log in but is assigned automatically.', 'users_delete' => 'Delete User', 'users_delete_named' => 'Delete user :userName', diff --git a/resources/views/books/edit.blade.php b/resources/views/books/edit.blade.php index 351f88845..e1162d4b4 100644 --- a/resources/views/books/edit.blade.php +++ b/resources/views/books/edit.blade.php @@ -7,7 +7,7 @@
@include('partials.breadcrumbs', ['crumbs' => [ $book, - $book->getUrl() => trans('entities.books_edit') + $book->getUrl('/edit') => trans('entities.books_edit') ]])
diff --git a/resources/views/books/list.blade.php b/resources/views/books/list.blade.php index 5e077727b..6e0cc1fd6 100644 --- a/resources/views/books/list.blade.php +++ b/resources/views/books/list.blade.php @@ -1,10 +1,10 @@
-
+

{{ trans('entities.books') }}

- @include('partials.sort', ['options' => $sortOptions, 'order' => $order, 'sort' => $sort]) + @include('partials.sort', ['options' => $sortOptions, 'order' => $order, 'sort' => $sort, 'type' => 'books'])
diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php index 75b8a9e41..ba07ade0a 100644 --- a/resources/views/books/show.blade.php +++ b/resources/views/books/show.blade.php @@ -143,7 +143,7 @@ @if(count($activity) > 0)
{{ trans('entities.recent_activity') }}
- @include('partials/activity-list', ['activity' => $activity]) + @include('partials.activity-list', ['activity' => $activity])
@endif @stop diff --git a/resources/views/components/custom-checkbox.blade.php b/resources/views/components/custom-checkbox.blade.php new file mode 100644 index 000000000..57ab1342c --- /dev/null +++ b/resources/views/components/custom-checkbox.blade.php @@ -0,0 +1,11 @@ +{{-- +$name +$value +$checked +$label +--}} + \ No newline at end of file diff --git a/resources/views/components/image-picker.blade.php b/resources/views/components/image-picker.blade.php index 034b65cc5..630006d82 100644 --- a/resources/views/components/image-picker.blade.php +++ b/resources/views/components/image-picker.blade.php @@ -1,17 +1,20 @@
-
- {{ trans('components.image_preview') }} +
+
+ {{ trans('components.image_preview') }} +
+
+ +
+ + + @if ($showRemove) + | + + @endif +
- -
- - - @if ($showRemove) - | - - @endif -
\ No newline at end of file diff --git a/resources/views/components/toggle-switch.blade.php b/resources/views/components/toggle-switch.blade.php index c6d78f1b9..366e56ee8 100644 --- a/resources/views/components/toggle-switch.blade.php +++ b/resources/views/components/toggle-switch.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/form/checkbox.blade.php b/resources/views/form/checkbox.blade.php index 255896906..255b591aa 100644 --- a/resources/views/form/checkbox.blade.php +++ b/resources/views/form/checkbox.blade.php @@ -1,11 +1,15 @@ - - +{{-- +$name +$label +$errors? +$model? +--}} +@include('components.custom-checkbox', [ + 'name' => $name, + 'label' => $label, + 'value' => 'true', + 'checked' => old($name) || (!old() && isset($model) && $model->$name) +]) @if($errors->has($name))
{{ $errors->first($name) }}
diff --git a/resources/views/form/entity-permissions.blade.php b/resources/views/form/entity-permissions.blade.php index 92af4d592..bb7d992f7 100644 --- a/resources/views/form/entity-permissions.blade.php +++ b/resources/views/form/entity-permissions.blade.php @@ -2,15 +2,18 @@ {!! csrf_field() !!} -

{{ trans('entities.permissions_intro') }}

+

{{ trans('entities.permissions_intro') }}

- @include('form/checkbox', ['name' => 'restricted', 'label' => trans('entities.permissions_enable')]) + @include('form.checkbox', [ + 'name' => 'restricted', + 'label' => trans('entities.permissions_enable'), + ])
{{--TODO - Add global and role "Select All" options--}} - +
@@ -18,12 +21,12 @@ @foreach($roles as $role) - + @if(!$model->isA('page')) - + @endif - - + + @endforeach
{{ trans('common.role') }} isA('page')) colspan="3" @else colspan="4" @endif>{{ trans('common.actions') }}
{{ $role->display_name }}@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create'])@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create'])@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.update'), 'action' => 'update'])@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.delete'), 'action' => 'delete'])@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.update'), 'action' => 'update'])@include('form.restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.delete'), 'action' => 'delete'])
diff --git a/resources/views/form/restriction-checkbox.blade.php b/resources/views/form/restriction-checkbox.blade.php index aab5a0729..65a94239e 100644 --- a/resources/views/form/restriction-checkbox.blade.php +++ b/resources/views/form/restriction-checkbox.blade.php @@ -1,6 +1,13 @@ -{{--TODO - Make custom--}} - \ No newline at end of file +{{-- +$name +$label +$role +$action +$model? +--}} +@include('components.custom-checkbox', [ + 'name' => $name . '[' . $role->id . '][' . $action . ']', + 'label' => $label, + 'value' => 'true', + 'checked' => isset($model) && $model->hasRestriction($role->id, $action) +]) \ No newline at end of file diff --git a/resources/views/form/role-checkboxes.blade.php b/resources/views/form/role-checkboxes.blade.php index df868ee98..ab6265264 100644 --- a/resources/views/form/role-checkboxes.blade.php +++ b/resources/views/form/role-checkboxes.blade.php @@ -1,13 +1,16 @@ -@foreach($roles as $role) - -@endforeach +
+ @foreach($roles as $role) +
+ @include('components.custom-checkbox', [ + 'name' => $name . '[' . $role->name . ']', + 'label' => $role->display_name, + 'value' => $role->id, + 'checked' => old($name . '.' . $role->name) || (!old('name') && isset($model) && $model->hasRole($role->name)) + ]) +
+ @endforeach +
@if($errors->has($name))
{{ $errors->first($name) }}
diff --git a/resources/views/pages/detailed-listing.blade.php b/resources/views/pages/detailed-listing.blade.php index b4991d79d..eb2fab94c 100644 --- a/resources/views/pages/detailed-listing.blade.php +++ b/resources/views/pages/detailed-listing.blade.php @@ -1,15 +1,17 @@ @extends('simple-layout') @section('body') -
-

 

-
-

{{ $title }}

- @include('partials/entity-list', ['entities' => $pages, 'style' => 'detailed']) -
+
+
+

{{ $title }}

+ +
+ @include('partials.entity-list', ['entities' => $pages, 'style' => 'detailed']) +
+ +
{!! $pages->links() !!}
-
@stop \ No newline at end of file diff --git a/resources/views/partials/sort.blade.php b/resources/views/partials/sort.blade.php index 03eab8487..d7ed4d92e 100644 --- a/resources/views/partials/sort.blade.php +++ b/resources/views/partials/sort.blade.php @@ -4,7 +4,7 @@ ?>
{{ trans('common.sort') }}
-
id}/change-books-sort") }}" method="post"> + id}/change-sort/{$type}") }}" method="post"> {!! csrf_field() !!} {!! method_field('PATCH') !!} diff --git a/resources/views/search/all.blade.php b/resources/views/search/all.blade.php index a952079d5..6a6c9d198 100644 --- a/resources/views/search/all.blade.php +++ b/resources/views/search/all.blade.php @@ -1,207 +1,207 @@ -@extends('sidebar-layout') - -@section('toolbar') - -@stop - -@section('container-attrs') - id="search-system" -@stop - -@section('sidebar') -
-

{{ trans('entities.search_filters') }}

- -
- -
{{ trans('entities.search_content_type') }}
-
- - -
- - -
- -
{{ trans('entities.search_exact_matches') }}
- - - - - - - - -
- - -
- -
- -
{{ trans('entities.search_tags') }}
- - - - - - - - -
- - -
- -
- - @if(signedInUser()) -
{{ trans('entities.search_options') }}
- - - - - - @endif - -
{{ trans('entities.search_date_options') }}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ trans('entities.search_updated_after') }} - - -
- - - -
{{ trans('entities.search_updated_before') }} - - -
- - - -
{{ trans('entities.search_created_after') }} - - -
- - - -
{{ trans('entities.search_created_before') }} - - -
- - - -
- - - - -
- -
-@stop +@extends('simple-layout') @section('body') + -
- +
+ +
+   +
+ +
+
+
+
{{ trans('entities.search_filters') }}
+ +
+
{{ trans('entities.search_content_type') }}
+
+ + +
+ + +
+ +
{{ trans('entities.search_exact_matches') }}
+ + + + + + + + +
+ + +
+ +
+ +
{{ trans('entities.search_tags') }}
+ + + + + + + + +
+ + +
+ +
+ + @if(signedInUser()) +
{{ trans('entities.search_options') }}
+ + + + + + @endif + +
{{ trans('entities.search_date_options') }}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ trans('entities.search_updated_after') }} + + +
+ + + +
{{ trans('entities.search_updated_before') }} + + +
+ + + +
{{ trans('entities.search_created_after') }} + + +
+ + + +
{{ trans('entities.search_created_before') }} + + +
+ + + +
+ + + +
+ +
+
+
+
+

{{ trans('entities.search_results') }}

+
{{ trans_choice('entities.search_total_results_found', $totalResults, ['count' => $totalResults]) }}
+
+ @include('partials.entity-list', ['entities' => $entities]) +
+ @if($hasNextPage) + + @endif +
+
+
-

{{ trans('entities.search_results') }}

-
{{ trans_choice('entities.search_total_results_found', $totalResults, ['count' => $totalResults]) }}
- @include('partials/entity-list', ['entities' => $entities]) - @if ($hasNextPage) - {{ trans('entities.search_more') }} - @endif
@stop diff --git a/resources/views/shelves/delete.blade.php b/resources/views/shelves/delete.blade.php index f3ad62456..f5a84c8ad 100644 --- a/resources/views/shelves/delete.blade.php +++ b/resources/views/shelves/delete.blade.php @@ -1,22 +1,26 @@ @extends('simple-layout') -@section('toolbar') -
- @include('shelves._breadcrumbs', ['shelf' => $shelf]) -
-@stop - @section('body')
-

 

-
-

@icon('delete') {{ trans('entities.shelves_delete') }}

-
-

{{ trans('entities.shelves_delete_explain', ['name' => $shelf->name]) }}

-

{{ trans('entities.shelves_delete_confirmation') }}

-
+
+ @include('partials.breadcrumbs', ['crumbs' => [ + $shelf, + $shelf->getUrl('/delete') => trans('entities.shelves_delete') + ]]) +
+ +
+

{{ trans('entities.shelves_delete') }}

+

{{ trans('entities.shelves_delete_explain', ['name' => $shelf->name]) }}

+ +
+

+ {{ trans('entities.shelves_delete_confirmation') }} +

+ + {!! csrf_field() !!} @@ -24,6 +28,8 @@
+ +
diff --git a/resources/views/shelves/edit.blade.php b/resources/views/shelves/edit.blade.php index ab88051e5..2199d1a54 100644 --- a/resources/views/shelves/edit.blade.php +++ b/resources/views/shelves/edit.blade.php @@ -1,24 +1,24 @@ @extends('simple-layout') -@section('toolbar') -
- @include('shelves._breadcrumbs', ['shelf' => $shelf]) -
-@stop - @section('body')
-

 

-
-

@icon('edit') {{ trans('entities.shelves_edit') }}

-
-
- - @include('shelves/form', ['model' => $shelf]) -
-
+ +
+ @include('partials.breadcrumbs', ['crumbs' => [ + $shelf, + $shelf->getUrl('/edit') => trans('entities.shelves_edit') + ]]) +
+ +
+

{{ trans('entities.shelves_edit') }}

+
+ + @include('shelves/form', ['model' => $shelf]) +
-@include('components.image-manager', ['imageType' => 'cover']) + + @include('components.image-manager', ['imageType' => 'cover']) @stop \ No newline at end of file diff --git a/resources/views/shelves/grid-item.blade.php b/resources/views/shelves/grid-item.blade.php index b70b5166e..c2d1b6127 100644 --- a/resources/views/shelves/grid-item.blade.php +++ b/resources/views/shelves/grid-item.blade.php @@ -1,18 +1,19 @@ -
- \ No newline at end of file + \ No newline at end of file diff --git a/resources/views/shelves/index.blade.php b/resources/views/shelves/index.blade.php index 717053a08..95b157df9 100644 --- a/resources/views/shelves/index.blade.php +++ b/resources/views/shelves/index.blade.php @@ -1,9 +1,7 @@ @extends('tri-layout') @section('body') -
- @include('shelves.list', ['shelves' => $shelves, 'view' => $view]) -
+ @include('shelves.list', ['shelves' => $shelves, 'view' => $view]) @stop @section('right') @@ -25,13 +23,13 @@ @section('left') @if($recents) -
+
{{ trans('entities.recently_viewed') }}
@include('partials.entity-list', ['entities' => $recents, 'style' => 'compact'])
@endif -