diff --git a/app/Http/Controllers/BookController.php b/app/Http/Controllers/BookController.php
index b5e2a4a85..95cd8bdeb 100644
--- a/app/Http/Controllers/BookController.php
+++ b/app/Http/Controllers/BookController.php
@@ -275,12 +275,12 @@ class BookController extends Controller
* @param $bookSlug
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
- public function showRestrict($bookSlug)
+ public function showPermissions($bookSlug)
{
$book = $this->entityRepo->getBySlug('book', $bookSlug);
$this->checkOwnablePermission('restrictions-manage', $book);
$roles = $this->userRepo->getRestrictableRoles();
- return view('books/restrictions', [
+ return view('books.permissions', [
'book' => $book,
'roles' => $roles
]);
@@ -289,11 +289,12 @@ class BookController extends Controller
/**
* Set the restrictions for this book.
* @param $bookSlug
- * @param $bookSlug
* @param Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
+ * @throws \BookStack\Exceptions\NotFoundException
+ * @throws \Throwable
*/
- public function restrict($bookSlug, Request $request)
+ public function permissions($bookSlug, Request $request)
{
$book = $this->entityRepo->getBySlug('book', $bookSlug);
$this->checkOwnablePermission('restrictions-manage', $book);
diff --git a/resources/assets/sass/_blocks.scss b/resources/assets/sass/_blocks.scss
index b000c7ed6..1baec7a92 100644
--- a/resources/assets/sass/_blocks.scss
+++ b/resources/assets/sass/_blocks.scss
@@ -175,7 +175,7 @@
background-color: #FFF;
box-shadow: $bs-card;
border-radius: 3px;
- padding-bottom: $-xs;
+ border: 1px solid transparent;
h3 {
padding: $-m;
padding-bottom: $-xs;
diff --git a/resources/assets/sass/_grid.scss b/resources/assets/sass/_grid.scss
index e6eb489b9..302b66707 100644
--- a/resources/assets/sass/_grid.scss
+++ b/resources/assets/sass/_grid.scss
@@ -57,6 +57,9 @@ body.flexbox {
margin-bottom: $-xl;
overflow: auto;
min-height: 60vh;
+ &.auto-height {
+ min-height: 0;
+ }
}
.tri-layout-container {
@@ -199,6 +202,14 @@ div[class^="col-"] img {
&.third {
grid-template-columns: 1fr 1fr 1fr;
}
+ &.left-focus {
+ grid-template-columns: 2fr 1fr;
+ }
+ &.large-gap {
+ grid-column-gap: $-xl;
+ grid-row-gap: $-xl;
+ justify-items: start;
+ }
}
.grid-card {
@@ -255,6 +266,9 @@ div[class^="col-"] img {
.grid.third {
grid-template-columns: 1fr 1fr;
}
+ .grid.left-focus {
+ grid-template-columns: 1fr;
+ }
}
@include smaller-than($s) {
diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scss
index 622dd32b1..9bae934d8 100644
--- a/resources/assets/sass/_lists.scss
+++ b/resources/assets/sass/_lists.scss
@@ -91,6 +91,9 @@
padding-left: 1.5rem;
padding-bottom: .2rem;
}
+ .icon {
+ z-index: 2;
+ }
&:after, .sub-menu:after {
content: '';
display: block;
@@ -100,7 +103,7 @@
bottom: 1rem;
border-left: 2px solid #DDD;
opacity: 0.6;
- z-index: 1;
+ z-index: 0;
}
}
diff --git a/resources/views/books/delete.blade.php b/resources/views/books/delete.blade.php
index 0ac98e895..e50589866 100644
--- a/resources/views/books/delete.blade.php
+++ b/resources/views/books/delete.blade.php
@@ -1,28 +1,27 @@
@extends('simple-layout')
-@section('toolbar')
-
-
-
-
@icon('delete') {{ trans('entities.books_delete') }}
-
-
{{ trans('entities.books_delete_explain', ['bookName' => $book->name]) }}
-
{{ trans('entities.books_delete_confirmation') }}
-
-
+
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $book,
+ $book->getUrl('/delete') => trans('entities.books_delete')
+ ]])
+
+
+
+
{{ trans('entities.books_delete') }}
+
{{ trans('entities.books_delete_explain', ['bookName' => $book->name]) }}
+
{{ trans('entities.books_delete_confirmation') }}
+
+
diff --git a/resources/views/books/permissions.blade.php b/resources/views/books/permissions.blade.php
new file mode 100644
index 000000000..b1ff3b0a8
--- /dev/null
+++ b/resources/views/books/permissions.blade.php
@@ -0,0 +1,20 @@
+@extends('simple-layout')
+
+@section('body')
+
+
+
+
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $book,
+ $book->getUrl('/permissions') => trans('entities.books_permissions')
+ ]])
+
+
+
+
{{ trans('entities.books_permissions') }}
+ @include('form.entity-permissions', ['model' => $book])
+
+
+
+@stop
diff --git a/resources/views/books/restrictions.blade.php b/resources/views/books/restrictions.blade.php
deleted file mode 100644
index 2a6eb0bea..000000000
--- a/resources/views/books/restrictions.blade.php
+++ /dev/null
@@ -1,21 +0,0 @@
-@extends('simple-layout')
-
-@section('toolbar')
-
- @include('books._breadcrumbs', ['book' => $book])
-
-@stop
-
-@section('body')
-
-
-
-
-
@icon('lock') {{ trans('entities.books_permissions') }}
-
- @include('form/restriction-form', ['model' => $book])
-
-
-
-
-@stop
diff --git a/resources/views/books/sort.blade.php b/resources/views/books/sort.blade.php
index 77e95448f..00ab90f4f 100644
--- a/resources/views/books/sort.blade.php
+++ b/resources/views/books/sort.blade.php
@@ -1,53 +1,54 @@
@extends('simple-layout')
-@section('toolbar')
-
- @include('books._breadcrumbs', ['book' => $book])
-
-@stop
-
@section('body')
-
-
-
-
@icon('sort') {{ trans('entities.books_sort') }}
-
-
- @include('books/sort-box', ['book' => $book, 'bookChildren' => $bookChildren])
-
-
-
-
-
-
- @if(count($books) > 1)
-
-
-
@icon('book') {{ trans('entities.books_sort_show_other') }}
-
- @foreach($books as $otherBook)
- @if($otherBook->id !== $book->id)
-
- @endif
- @endforeach
-
-
-
- @endif
+
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $book,
+ $book->getUrl('/sort') => trans('entities.books_sort')
+ ]])
+
+
+
+
+
{{ trans('entities.books_sort') }}
+
+ @include('books/sort-box', ['book' => $book, 'bookChildren' => $bookChildren])
+
+
+
+
+
+
+
+ @if(count($books) > 1)
+
+
{{ trans('entities.books_sort_show_other') }}
+
+ @foreach($books as $otherBook)
+ @if($otherBook->id !== $book->id)
+
+ @endif
+ @endforeach
+
+
+ @endif
+
+
+
@stop
diff --git a/resources/views/chapters/create.blade.php b/resources/views/chapters/create.blade.php
index 765756055..e8325c247 100644
--- a/resources/views/chapters/create.blade.php
+++ b/resources/views/chapters/create.blade.php
@@ -1,26 +1,21 @@
@extends('simple-layout')
-@section('toolbar')
-
-@stop
-
@section('body')
-
-
-
@icon('add') {{ trans('entities.chapters_create') }}
-
-
-
-
-
+
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $book,
+ $book->getUrl('create-chapter') => trans('entities.chapters_create')
+ ]])
+
+
+
+
{{ trans('entities.chapters_create') }}
+
+
+
+
@stop
\ No newline at end of file
diff --git a/resources/views/chapters/edit.blade.php b/resources/views/chapters/edit.blade.php
index 04c5aa724..8bf22dbb9 100644
--- a/resources/views/chapters/edit.blade.php
+++ b/resources/views/chapters/edit.blade.php
@@ -1,24 +1,25 @@
@extends('simple-layout')
-@section('toolbar')
-
- @include('chapters._breadcrumbs', ['chapter' => $chapter])
-
-@stop
-
@section('body')
-
-
-
@icon('edit') {{ trans('entities.chapters_edit') }}
-
-
-
+
+
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $book,
+ $chapter,
+ $chapter->getUrl('/edit') => trans('entities.chapters_edit')
+ ]])
+
+
+
{{ trans('entities.chapters_edit') }}
+
+
+
@stop
\ No newline at end of file
diff --git a/resources/views/chapters/form.blade.php b/resources/views/chapters/form.blade.php
index fde460844..014caf2d3 100644
--- a/resources/views/chapters/form.blade.php
+++ b/resources/views/chapters/form.blade.php
@@ -22,5 +22,5 @@
diff --git a/resources/views/chapters/restrictions.blade.php b/resources/views/chapters/restrictions.blade.php
index 70eb224ae..cf5fa1964 100644
--- a/resources/views/chapters/restrictions.blade.php
+++ b/resources/views/chapters/restrictions.blade.php
@@ -13,7 +13,7 @@
@icon('lock') {{ trans('entities.chapters_permissions') }}
- @include('form/restriction-form', ['model' => $chapter])
+ @include('form.entity-permissions', ['model' => $chapter])
diff --git a/resources/views/form/restriction-form.blade.php b/resources/views/form/entity-permissions.blade.php
similarity index 93%
rename from resources/views/form/restriction-form.blade.php
rename to resources/views/form/entity-permissions.blade.php
index c32fe005a..9dce0b59e 100644
--- a/resources/views/form/restriction-form.blade.php
+++ b/resources/views/form/entity-permissions.blade.php
@@ -8,7 +8,6 @@
@include('form/checkbox', ['name' => 'restricted', 'label' => trans('entities.permissions_enable')])
-