1 @extends('sidebar-layout')
4 <div class="col-sm-6 col-xs-1 faded">
5 @include('books._breadcrumbs', ['book' => $book])
7 <div class="col-sm-6 col-xs-11">
8 <div class="action-buttons faded">
9 <span dropdown class="dropdown-container">
10 <div dropdown-toggle class="text-button text-primary">@icon('export'){{ trans('entities.export') }}</div>
12 <li><a href="{{ $book->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
13 <li><a href="{{ $book->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
14 <li><a href="{{ $book->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
17 @if(userCan('page-create', $book))
18 <a href="{{ $book->getUrl('/page/create') }}" class="text-pos text-button">@icon('add'){{ trans('entities.pages_new') }}</a>
20 @if(userCan('chapter-create', $book))
21 <a href="{{ $book->getUrl('/chapter/create') }}" class="text-pos text-button">@icon('add'){{ trans('entities.chapters_new') }}</a>
23 @if(userCan('book-update', $book) || userCan('restrictions-manage', $book) || userCan('book-delete', $book))
24 <div dropdown class="dropdown-container">
25 <a dropdown-toggle class="text-primary text-button">@icon('more'){{ trans('common.more') }}</a>
27 @if(userCan('book-update', $book))
28 <li><a href="{{$book->getEditUrl()}}" class="text-primary">@icon('edit'){{ trans('common.edit') }}</a></li>
29 <li><a href="{{ $book->getUrl('/sort') }}" class="text-primary">@icon('sort'){{ trans('common.sort') }}</a></li>
31 @if(userCan('restrictions-manage', $book))
32 <li><a href="{{ $book->getUrl('/permissions') }}" class="text-primary">@icon('lock'){{ trans('entities.permissions') }}</a></li>
34 @if(userCan('book-delete', $book))
35 <li><a href="{{ $book->getUrl('/delete') }}" class="text-neg">@icon('delete'){{ trans('common.delete') }}</a></li>
48 <form v-on:submit.prevent="searchBook" class="search-box">
49 <input v-model="searchTerm" v-on:change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.books_search_this') }}">
50 <button type="submit">@icon('search')</button>
51 <button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button">@icon('close')</button>
56 @if($book->restricted)
58 <h3>@icon('permission') {{ trans('entities.permissions') }}</h3>
60 <p class="text-muted">
61 @if(userCan('restrictions-manage', $book))
62 <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
64 @icon('lock'){{ trans('entities.books_permissions_active') }}
71 @if(count($activity) > 0)
72 <div class="activity card">
73 <h3>@icon('time') {{ trans('entities.recent_activity') }}</h3>
74 @include('partials/activity-list', ['activity' => $activity])
79 <h3>@icon('info') {{ trans('common.details') }}</h3>
81 @include('partials.entity-meta', ['entity' => $book])
86 @section('container-attrs')
88 entity-id="{{ $book->id }}"
94 <div class="container small">
95 <h1>{{$book->name}}</h1>
96 <div class="book-content" v-show="!searching">
97 <p class="text-muted" v-pre>{!! nl2br(e($book->description)) !!}</p>
98 @if(count($bookChildren) > 0)
99 <div class="page-list" v-pre>
101 @foreach($bookChildren as $childElement)
102 @if($childElement->isA('chapter'))
103 @include('chapters/list-item', ['chapter' => $childElement])
105 @include('pages/list-item', ['page' => $childElement])
112 <p class="text-muted italic">{{ trans('entities.books_empty_contents') }}</p>
113 @if(userCan('page-create', $book))
114 <a href="{{ $book->getUrl('/page/create') }}" class="button outline page">@icon('page'){{ trans('entities.books_empty_create_page') }}</a>
116 @if(userCan('page-create', $book) && userCan('chapter-create', $book))
117 <em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>
119 @if(userCan('chapter-create', $book))
120 <a href="{{ $book->getUrl('/chapter/create') }}" class="button outline chapter">@icon('chapter'){{ trans('entities.books_empty_add_chapter') }}</a>
126 <div class="search-results" v-cloak v-show="searching">
127 <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>
128 <div v-if="!searchResults">
129 @include('partials/loading-icon')
131 <div v-html="searchResults"></div>