1 @extends('layouts.tri')
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, '...') }}">
12 <meta property="og:image" content="{{ $book->getBookCover() }}">
19 @include('entities.breadcrumbs', ['crumbs' => [
24 <main class="content-wrap card">
25 <h1 class="break-text">{{$book->name}}</h1>
26 <div refs="entity-search@contentView" class="book-content">
27 <p class="text-muted">{!! nl2br(e($book->description)) !!}</p>
28 @if(count($bookChildren) > 0)
29 <div class="entity-list book-contents">
30 @foreach($bookChildren as $childElement)
31 @if($childElement->isA('chapter'))
32 @include('chapters.parts.list-item', ['chapter' => $childElement])
34 @include('pages.parts.list-item', ['page' => $childElement])
41 <p class="text-muted italic mb-m mt-xl">{{ trans('entities.books_empty_contents') }}</p>
43 <div class="icon-list block inline">
44 @if(userCan('page-create', $book))
45 <a href="{{ $book->getUrl('/create-page') }}" class="icon-list-item text-page">
46 <span class="icon">@icon('page')</span>
47 <span>{{ trans('entities.books_empty_create_page') }}</span>
50 @if(userCan('chapter-create', $book))
51 <a href="{{ $book->getUrl('/create-chapter') }}" class="icon-list-item text-chapter">
52 <span class="icon">@icon('chapter')</span>
53 <span>{{ trans('entities.books_empty_add_chapter') }}</span>
62 @include('entities.search-results')
69 <h5>{{ trans('common.details') }}</h5>
70 <div class="text-small text-muted blended-links">
71 @include('entities.meta', ['entity' => $book])
72 @if($book->restricted)
73 <div class="active-restriction">
74 @if(userCan('restrictions-manage', $book))
75 <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
77 @icon('lock'){{ trans('entities.books_permissions_active') }}
84 <div class="actions mb-xl">
85 <h5>{{ trans('common.actions') }}</h5>
86 <div class="icon-list text-primary">
88 @if(userCan('page-create', $book))
89 <a href="{{ $book->getUrl('/create-page') }}" class="icon-list-item">
90 <span>@icon('add')</span>
91 <span>{{ trans('entities.pages_new') }}</span>
94 @if(userCan('chapter-create', $book))
95 <a href="{{ $book->getUrl('/create-chapter') }}" class="icon-list-item">
96 <span>@icon('add')</span>
97 <span>{{ trans('entities.chapters_new') }}</span>
101 <hr class="primary-background">
103 @if(userCan('book-update', $book))
104 <a href="{{ $book->getUrl('/edit') }}" class="icon-list-item">
105 <span>@icon('edit')</span>
106 <span>{{ trans('common.edit') }}</span>
108 <a href="{{ $book->getUrl('/sort') }}" class="icon-list-item">
109 <span>@icon('sort')</span>
110 <span>{{ trans('common.sort') }}</span>
113 @if(userCan('book-create-all'))
114 <a href="{{ $book->getUrl('/copy') }}" class="icon-list-item">
115 <span>@icon('copy')</span>
116 <span>{{ trans('common.copy') }}</span>
119 @if(userCan('restrictions-manage', $book))
120 <a href="{{ $book->getUrl('/permissions') }}" class="icon-list-item">
121 <span>@icon('lock')</span>
122 <span>{{ trans('entities.permissions') }}</span>
125 @if(userCan('book-delete', $book))
126 <a href="{{ $book->getUrl('/delete') }}" class="icon-list-item">
127 <span>@icon('delete')</span>
128 <span>{{ trans('common.delete') }}</span>
132 <hr class="primary-background">
135 @include('entities.favourite-action', ['entity' => $book])
137 @if(userCan('content-export'))
138 @include('entities.export-menu', ['entity' => $book])
147 @include('entities.search-form', ['label' => trans('entities.books_search_this')])
149 @if($book->tags->count() > 0)
151 @include('entities.tag-list', ['entity' => $book])
155 @if(count($bookParentShelves) > 0)
156 <div class="actions mb-xl">
157 <h5>{{ trans('entities.shelves_long') }}</h5>
158 @include('entities.list', ['entities' => $bookParentShelves, 'style' => 'compact'])
162 @if(count($activity) > 0)
164 <h5>{{ trans('entities.recent_activity') }}</h5>
165 @include('common.activity-list', ['activity' => $activity])