3 @section('container-attrs')
4 component="entity-search"
5 option:entity-search:entity-id="{{ $chapter->id }}"
6 option:entity-search:entity-type="chapter"
11 <div class="mb-m print-hidden">
12 @include('partials.breadcrumbs', ['crumbs' => [
18 <main class="content-wrap card">
19 <h1 class="break-text">{{ $chapter->name }}</h1>
20 <div refs="entity-search@contentView" class="chapter-content">
21 <p class="text-muted break-text">{!! nl2br(e($chapter->description)) !!}</p>
22 @if(count($pages) > 0)
23 <div class="entity-list book-contents">
24 @foreach($pages as $page)
25 @include('pages.list-item', ['page' => $page])
31 <p class="text-muted italic mb-m mt-xl">{{ trans('entities.chapters_empty') }}</p>
33 <div class="icon-list block inline">
34 @if(userCan('page-create', $chapter))
35 <a href="{{ $chapter->getUrl('/create-page') }}" class="icon-list-item text-page">
36 <span class="icon">@icon('page')</span>
37 <span>{{ trans('entities.books_empty_create_page') }}</span>
40 @if(userCan('book-update', $book))
41 <a href="{{ $book->getUrl('/sort') }}" class="icon-list-item text-book">
42 <span class="icon">@icon('book')</span>
43 <span>{{ trans('entities.books_empty_sort_current_book') }}</span>
52 @include('partials.entity-search-results')
55 @include('partials.entity-sibling-navigation', ['next' => $next, 'previous' => $previous])
62 <h5>{{ trans('common.details') }}</h5>
63 <div class="blended-links text-small text-muted">
64 @include('partials.entity-meta', ['entity' => $chapter])
66 @if($book->restricted)
67 <div class="active-restriction">
68 @if(userCan('restrictions-manage', $book))
69 <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
71 @icon('lock'){{ trans('entities.books_permissions_active') }}
76 @if($chapter->restricted)
77 <div class="active-restriction">
78 @if(userCan('restrictions-manage', $chapter))
79 <a href="{{ $chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
81 @icon('lock'){{ trans('entities.chapters_permissions_active') }}
88 <div class="actions mb-xl">
89 <h5>{{ trans('common.actions') }}</h5>
90 <div class="icon-list text-primary">
92 @if(userCan('page-create', $chapter))
93 <a href="{{ $chapter->getUrl('/create-page') }}" class="icon-list-item">
94 <span>@icon('add')</span>
95 <span>{{ trans('entities.pages_new') }}</span>
99 <hr class="primary-background"/>
101 @if(userCan('chapter-update', $chapter))
102 <a href="{{ $chapter->getUrl('/edit') }}" class="icon-list-item">
103 <span>@icon('edit')</span>
104 <span>{{ trans('common.edit') }}</span>
107 @if(userCan('chapter-update', $chapter) && userCan('chapter-delete', $chapter))
108 <a href="{{ $chapter->getUrl('/move') }}" class="icon-list-item">
109 <span>@icon('folder')</span>
110 <span>{{ trans('common.move') }}</span>
113 @if(userCan('restrictions-manage', $chapter))
114 <a href="{{ $chapter->getUrl('/permissions') }}" class="icon-list-item">
115 <span>@icon('lock')</span>
116 <span>{{ trans('entities.permissions') }}</span>
119 @if(userCan('chapter-delete', $chapter))
120 <a href="{{ $chapter->getUrl('/delete') }}" class="icon-list-item">
121 <span>@icon('delete')</span>
122 <span>{{ trans('common.delete') }}</span>
126 <hr class="primary-background"/>
129 @include('partials.entity-favourite-action', ['entity' => $chapter])
131 @include('partials.entity-export-menu', ['entity' => $chapter])
138 @include('partials.entity-search-form', ['label' => trans('entities.chapters_search_this')])
140 @if($chapter->tags->count() > 0)
142 @include('components.tag-list', ['entity' => $chapter])
146 @include('partials.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])