3 @section('container-attrs')
4 component="entity-search"
5 option:entity-search:entity-id="{{ $chapter->id }}"
6 option:entity-search:entity-type="chapter"
10 <meta property="og:description" content="{{ Str::limit($chapter->description, 100) }}">
11 <meta property="og:image" content="{{ $chapter->book->getBookCover() }}">
16 <div class="mb-m print-hidden">
17 @include('partials.breadcrumbs', ['crumbs' => [
23 <main class="content-wrap card">
24 <h1 class="break-text">{{ $chapter->name }}</h1>
25 <div refs="entity-search@contentView" class="chapter-content">
26 <p class="text-muted break-text">{!! nl2br(e($chapter->description)) !!}</p>
27 @if(count($pages) > 0)
28 <div class="entity-list book-contents">
29 @foreach($pages as $page)
30 @include('pages.list-item', ['page' => $page])
36 <p class="text-muted italic mb-m mt-xl">{{ trans('entities.chapters_empty') }}</p>
38 <div class="icon-list block inline">
39 @if(userCan('page-create', $chapter))
40 <a href="{{ $chapter->getUrl('/create-page') }}" class="icon-list-item text-page">
41 <span class="icon">@icon('page')</span>
42 <span>{{ trans('entities.books_empty_create_page') }}</span>
45 @if(userCan('book-update', $book))
46 <a href="{{ $book->getUrl('/sort') }}" class="icon-list-item text-book">
47 <span class="icon">@icon('book')</span>
48 <span>{{ trans('entities.books_empty_sort_current_book') }}</span>
57 @include('partials.entity-search-results')
65 <h5>{{ trans('common.details') }}</h5>
66 <div class="blended-links text-small text-muted">
67 @include('partials.entity-meta', ['entity' => $chapter])
69 @if($book->restricted)
70 <div class="active-restriction">
71 @if(userCan('restrictions-manage', $book))
72 <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
74 @icon('lock'){{ trans('entities.books_permissions_active') }}
79 @if($chapter->restricted)
80 <div class="active-restriction">
81 @if(userCan('restrictions-manage', $chapter))
82 <a href="{{ $chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
84 @icon('lock'){{ trans('entities.chapters_permissions_active') }}
91 <div class="actions mb-xl">
92 <h5>{{ trans('common.actions') }}</h5>
93 <div class="icon-list text-primary">
95 @if(userCan('page-create', $chapter))
96 <a href="{{ $chapter->getUrl('/create-page') }}" class="icon-list-item">
97 <span>@icon('add')</span>
98 <span>{{ trans('entities.pages_new') }}</span>
102 <hr class="primary-background"/>
104 @if(userCan('chapter-update', $chapter))
105 <a href="{{ $chapter->getUrl('/edit') }}" class="icon-list-item">
106 <span>@icon('edit')</span>
107 <span>{{ trans('common.edit') }}</span>
110 @if(userCan('chapter-update', $chapter) && userCan('chapter-delete', $chapter))
111 <a href="{{ $chapter->getUrl('/move') }}" class="icon-list-item">
112 <span>@icon('folder')</span>
113 <span>{{ trans('common.move') }}</span>
116 @if(userCan('restrictions-manage', $chapter))
117 <a href="{{ $chapter->getUrl('/permissions') }}" class="icon-list-item">
118 <span>@icon('lock')</span>
119 <span>{{ trans('entities.permissions') }}</span>
122 @if(userCan('chapter-delete', $chapter))
123 <a href="{{ $chapter->getUrl('/delete') }}" class="icon-list-item">
124 <span>@icon('delete')</span>
125 <span>{{ trans('common.delete') }}</span>
129 <hr class="primary-background"/>
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])