1 @extends('layouts.tri')
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, '...') }}">
15 <div class="mb-m print-hidden">
16 @include('entities.breadcrumbs', ['crumbs' => [
22 <main class="content-wrap card">
23 <h1 class="break-text">{{ $chapter->name }}</h1>
24 <div refs="entity-search@contentView" class="chapter-content">
25 <p class="text-muted break-text">{!! nl2br(e($chapter->description)) !!}</p>
26 @if(count($pages) > 0)
27 <div class="entity-list book-contents">
28 @foreach($pages as $page)
29 @include('pages.parts.list-item', ['page' => $page])
35 <p class="text-muted italic mb-m mt-xl">{{ trans('entities.chapters_empty') }}</p>
37 <div class="icon-list block inline">
38 @if(userCan('page-create', $chapter))
39 <a href="{{ $chapter->getUrl('/create-page') }}" class="icon-list-item text-page">
40 <span class="icon">@icon('page')</span>
41 <span>{{ trans('entities.books_empty_create_page') }}</span>
44 @if(userCan('book-update', $book))
45 <a href="{{ $book->getUrl('/sort') }}" class="icon-list-item text-book">
46 <span class="icon">@icon('book')</span>
47 <span>{{ trans('entities.books_empty_sort_current_book') }}</span>
56 @include('entities.search-results')
59 @include('entities.sibling-navigation', ['next' => $next, 'previous' => $previous])
66 <h5>{{ trans('common.details') }}</h5>
67 <div class="blended-links text-small text-muted">
68 @include('entities.meta', ['entity' => $chapter])
70 @if($book->restricted)
71 <div class="active-restriction">
72 @if(userCan('restrictions-manage', $book))
73 <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
75 @icon('lock'){{ trans('entities.books_permissions_active') }}
80 @if($chapter->restricted)
81 <div class="active-restriction">
82 @if(userCan('restrictions-manage', $chapter))
83 <a href="{{ $chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
85 @icon('lock'){{ trans('entities.chapters_permissions_active') }}
92 <div class="actions mb-xl">
93 <h5>{{ trans('common.actions') }}</h5>
94 <div class="icon-list text-primary">
96 @if(userCan('page-create', $chapter))
97 <a href="{{ $chapter->getUrl('/create-page') }}" class="icon-list-item">
98 <span>@icon('add')</span>
99 <span>{{ trans('entities.pages_new') }}</span>
103 <hr class="primary-background"/>
105 @if(userCan('chapter-update', $chapter))
106 <a href="{{ $chapter->getUrl('/edit') }}" class="icon-list-item">
107 <span>@icon('edit')</span>
108 <span>{{ trans('common.edit') }}</span>
111 @if(userCanOnAny('chapter-create'))
112 <a href="{{ $chapter->getUrl('/copy') }}" class="icon-list-item">
113 <span>@icon('copy')</span>
114 <span>{{ trans('common.copy') }}</span>
117 @if(userCan('chapter-update', $chapter) && userCan('chapter-delete', $chapter))
118 <a href="{{ $chapter->getUrl('/move') }}" class="icon-list-item">
119 <span>@icon('folder')</span>
120 <span>{{ trans('common.move') }}</span>
123 @if(userCan('restrictions-manage', $chapter))
124 <a href="{{ $chapter->getUrl('/permissions') }}" class="icon-list-item">
125 <span>@icon('lock')</span>
126 <span>{{ trans('entities.permissions') }}</span>
129 @if(userCan('chapter-delete', $chapter))
130 <a href="{{ $chapter->getUrl('/delete') }}" class="icon-list-item">
131 <span>@icon('delete')</span>
132 <span>{{ trans('common.delete') }}</span>
136 <hr class="primary-background"/>
139 @include('entities.favourite-action', ['entity' => $chapter])
141 @if(userCan('content-export'))
142 @include('entities.export-menu', ['entity' => $chapter])
150 @include('entities.search-form', ['label' => trans('entities.chapters_search_this')])
152 @if($chapter->tags->count() > 0)
154 @include('entities.tag-list', ['entity' => $chapter])
158 @include('entities.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])