3 @section('container-attrs')
5 entity-id="{{ $book->id }}"
11 <div class="content-wrap card">
12 <h1 class="break-text" v-pre>{{$book->name}}</h1>
13 <div class="book-content" v-show="!searching">
14 <p class="text-muted" v-pre>{!! nl2br(e($book->description)) !!}</p>
15 @if(count($bookChildren) > 0)
16 <div class="entity-list book-contents" v-pre>
17 @foreach($bookChildren as $childElement)
18 @if($childElement->isA('chapter'))
19 @include('chapters.list-item', ['chapter' => $childElement])
21 @include('pages.list-item', ['page' => $childElement])
28 <p class="text-muted italic">{{ trans('entities.books_empty_contents') }}</p>
29 @if(userCan('page-create', $book))
30 <a href="{{ $book->getUrl('/create-page') }}" class="button outline page">@icon('page'){{ trans('entities.books_empty_create_page') }}</a>
32 @if(userCan('page-create', $book) && userCan('chapter-create', $book))
33 <em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>
35 @if(userCan('chapter-create', $book))
36 <a href="{{ $book->getUrl('/create-chapter') }}" class="button outline chapter">@icon('chapter'){{ trans('entities.books_empty_add_chapter') }}</a>
42 <div class="search-results" v-cloak v-show="searching">
44 <h3 class="text-muted">{{ trans('entities.search_results') }} <a v-if="searching" v-on:click="clearSearch()" class="text-small">@icon('close'){{ trans('entities.search_clear') }}</a></h3>
45 <div v-if="!searchResults">
46 @include('partials/loading-icon')
48 <div v-html="searchResults"></div>
57 <div class="actions mb-xl">
58 <h5>{{ trans('common.actions') }}</h5>
59 <div class="icon-list text-primary">
60 <div dropdown class="dropdown-container">
61 <div dropdown-toggle class="icon-list-item">
62 <span class="icon">@icon('export')</span>
63 <span>{{ trans('entities.export') }}</span>
66 <li><a href="{{ $book->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
67 <li><a href="{{ $book->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
68 <li><a href="{{ $book->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
72 @if(userCan('page-create', $book))
73 <a href="{{ $book->getUrl('/create-page') }}" class="icon-list-item">
74 <span class="icon">@icon('add')</span>
75 <span>{{ trans('entities.pages_new') }}</span>
78 @if(userCan('chapter-create', $book))
79 <a href="{{ $book->getUrl('/create-chapter') }}" class="icon-list-item">
80 <span class="icon">@icon('add')</span>
81 <span>{{ trans('entities.chapters_new') }}</span>
84 @if(userCan('book-update', $book))
85 <a href="{{ $book->getUrl('/edit') }}" class="icon-list-item">
86 <span class="icon">@icon('edit')</span>
87 <span>{{ trans('common.edit') }}</span>
89 <a href="{{ $book->getUrl('/sort') }}" class="icon-list-item">
90 <span class="icon">@icon('sort')</span>
91 <span>{{ trans('common.sort') }}</span>
94 @if(userCan('restrictions-manage', $book))
95 <a href="{{ $book->getUrl('/permissions') }}" class="icon-list-item">
96 <span class="icon">@icon('lock')</span>
97 <span>{{ trans('entities.permissions') }}</span>
100 @if(userCan('book-delete', $book))
101 <a href="{{ $book->getUrl('/delete') }}" class="icon-list-item">
102 <span class="icon">@icon('delete')</span>
103 <span>{{ trans('common.delete') }}</span>
113 @if($book->tags->count() > 0)
115 @include('components.tag-list', ['entity' => $book])
120 <form v-on:submit.prevent="searchBook" class="search-box">
121 <input v-model="searchTerm" v-on:change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.books_search_this') }}">
122 <button type="submit">@icon('search')</button>
123 <button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button">@icon('close')</button>
128 <h5>{{ trans('common.details') }}</h5>
129 <div class="text-small text-muted blended-links">
130 @include('partials.entity-meta', ['entity' => $book])
131 @if($book->restricted)
132 <div class="active-restriction">
133 @if(userCan('restrictions-manage', $book))
134 <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
136 @icon('lock'){{ trans('entities.books_permissions_active') }}
143 @if(count($activity) > 0)
145 <h5>{{ trans('entities.recent_activity') }}</h5>
146 @include('partials/activity-list', ['activity' => $activity])