{{ $chapter->name }}
-
{!! nl2br(e($chapter->description)) !!}
+{!! $chapter->descriptionHtml() !!}
@if(count($pages) > 0)
@foreach($pages as $page)
@@ -64,25 +66,37 @@
{{ trans('common.details') }}
-
- @include('entities.meta', ['entity' => $chapter])
+
+ @include('entities.meta', ['entity' => $chapter, 'watchOptions' => $watchOptions])
- @if($book->restricted)
+ @if($book->hasPermissions())
@if(userCan('restrictions-manage', $book))
- @icon('lock'){{ trans('entities.books_permissions_active') }}
+
+ @icon('lock')
+
@endif
- @if($chapter->restricted)
+ @if($chapter->hasPermissions())
{{ trans('entities.books_permissions_active') }}
+
@else
- @icon('lock'){{ trans('entities.books_permissions_active') }}
+
@endif
@if(userCan('restrictions-manage', $chapter))
- @icon('lock'){{ trans('entities.chapters_permissions_active') }}
+
+ @icon('lock')
+
@endif
@@ -91,10 +105,10 @@
{{ trans('entities.chapters_permissions_active') }}
+
@else
- @icon('lock'){{ trans('entities.chapters_permissions_active') }}
+
@endif
{{ trans('common.actions') }}
-
+
@if(userCan('page-create', $chapter))
-
+
@icon('add')
{{ trans('entities.pages_new') }}
@@ -103,33 +117,50 @@
@if(userCan('chapter-update', $chapter)) - + @icon('edit') {{ trans('common.edit') }} @endif + @if(userCanOnAny('create', \BookStack\Entities\Models\Book::class) || userCan('chapter-create-all') || userCan('chapter-create-own')) + + @icon('copy') + {{ trans('common.copy') }} + + @endif @if(userCan('chapter-update', $chapter) && userCan('chapter-delete', $chapter)) - + @icon('folder') {{ trans('common.move') }} @endif @if(userCan('restrictions-manage', $chapter)) - + @icon('lock') {{ trans('entities.permissions') }} @endif @if(userCan('chapter-delete', $chapter)) - + @icon('delete') {{ trans('common.delete') }} @endif + @if($chapter->book && userCan('book-update', $chapter->book)) +
+ + @icon('sort') + {{ trans('entities.chapter_sort_book') }} + + @endif +
- @if(signedInUser()) + @if($watchOptions->canWatch() && !$watchOptions->isWatching()) + @include('entities.watch-action', ['entity' => $chapter]) + @endif + @if(!user()->isGuest()) @include('entities.favourite-action', ['entity' => $chapter]) @endif @if(userCan('content-export'))
@if(userCan('chapter-update', $chapter)) - + @icon('edit') {{ trans('common.edit') }} @endif + @if(userCanOnAny('create', \BookStack\Entities\Models\Book::class) || userCan('chapter-create-all') || userCan('chapter-create-own')) + + @icon('copy') + {{ trans('common.copy') }} + + @endif @if(userCan('chapter-update', $chapter) && userCan('chapter-delete', $chapter)) - + @icon('folder') {{ trans('common.move') }} @endif @if(userCan('restrictions-manage', $chapter)) - + @icon('lock') {{ trans('entities.permissions') }} @endif @if(userCan('chapter-delete', $chapter)) - + @icon('delete') {{ trans('common.delete') }} @endif + @if($chapter->book && userCan('book-update', $chapter->book)) +
+ + @icon('sort') + {{ trans('entities.chapter_sort_book') }} + + @endif +
- @if(signedInUser()) + @if($watchOptions->canWatch() && !$watchOptions->isWatching()) + @include('entities.watch-action', ['entity' => $chapter]) + @endif + @if(!user()->isGuest()) @include('entities.favourite-action', ['entity' => $chapter]) @endif @if(userCan('content-export'))