3 @section('container-attrs')
4 component="entity-search"
5 option:entity-search:entity-id="{{ $book->id }}"
6 option:entity-search:entity-type="book"
10 <meta property="og:description" content="{{ Str::limit($book->description, 100, '...') }}">
11 <meta property="og:image" content="{{ $book->getBookCover() }}">
17 @include('partials.breadcrumbs', ['crumbs' => [
22 <main class="content-wrap card">
23 <h1 class="break-text">{{$book->name}}</h1>
24 <div refs="entity-search@contentView" class="book-content">
25 <p class="text-muted">{!! nl2br(e($book->description)) !!}</p>
26 @if(count($bookChildren) > 0)
27 <div class="entity-list book-contents">
28 @foreach($bookChildren as $childElement)
29 @if($childElement->isA('chapter'))
30 @include('chapters.list-item', ['chapter' => $childElement])
32 @include('pages.list-item', ['page' => $childElement])
39 <p class="text-muted italic mb-m mt-xl">{{ trans('entities.books_empty_contents') }}</p>
41 <div class="icon-list block inline">
42 @if(userCan('page-create', $book))
43 <a href="{{ $book->getUrl('/create-page') }}" class="icon-list-item text-page">
44 <span class="icon">@icon('page')</span>
45 <span>{{ trans('entities.books_empty_create_page') }}</span>
48 @if(userCan('chapter-create', $book))
49 <a href="{{ $book->getUrl('/create-chapter') }}" class="icon-list-item text-chapter">
50 <span class="icon">@icon('chapter')</span>
51 <span>{{ trans('entities.books_empty_add_chapter') }}</span>
60 @include('partials.entity-search-results')
67 <h5>{{ trans('common.details') }}</h5>
68 <div class="text-small text-muted blended-links">
69 @include('partials.entity-meta', ['entity' => $book])
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') }}
82 <div class="actions mb-xl">
83 <h5>{{ trans('common.actions') }}</h5>
84 <div class="icon-list text-primary">
86 @if(userCan('page-create', $book))
87 <a href="{{ $book->getUrl('/create-page') }}" class="icon-list-item">
88 <span>@icon('add')</span>
89 <span>{{ trans('entities.pages_new') }}</span>
92 @if(userCan('chapter-create', $book))
93 <a href="{{ $book->getUrl('/create-chapter') }}" class="icon-list-item">
94 <span>@icon('add')</span>
95 <span>{{ trans('entities.chapters_new') }}</span>
99 <hr class="primary-background">
101 @if(userCan('book-update', $book))
102 <a href="{{ $book->getUrl('/edit') }}" class="icon-list-item">
103 <span>@icon('edit')</span>
104 <span>{{ trans('common.edit') }}</span>
106 <a href="{{ $book->getUrl('/sort') }}" class="icon-list-item">
107 <span>@icon('sort')</span>
108 <span>{{ trans('common.sort') }}</span>
111 @if(userCan('restrictions-manage', $book))
112 <a href="{{ $book->getUrl('/permissions') }}" class="icon-list-item">
113 <span>@icon('lock')</span>
114 <span>{{ trans('entities.permissions') }}</span>
117 @if(userCan('book-delete', $book))
118 <a href="{{ $book->getUrl('/delete') }}" class="icon-list-item">
119 <span>@icon('delete')</span>
120 <span>{{ trans('common.delete') }}</span>
124 <hr class="primary-background">
127 @include('partials.entity-favourite-action', ['entity' => $book])
129 @include('partials.entity-export-menu', ['entity' => $book])
137 @include('partials.entity-search-form', ['label' => trans('entities.books_search_this')])
139 @if($book->tags->count() > 0)
141 @include('components.tag-list', ['entity' => $book])
145 @if(count($bookParentShelves) > 0)
146 <div class="actions mb-xl">
147 <h5>{{ trans('entities.shelves_long') }}</h5>
148 @include('partials.entity-list', ['entities' => $bookParentShelves, 'style' => 'compact'])
152 @if(count($activity) > 0)
154 <h5>{{ trans('entities.recent_activity') }}</h5>
155 @include('partials.activity-list', ['activity' => $activity])