1 @extends('sidebar-layout')
4 <div class="col-sm-6 col-xs-3 faded" v-pre>
5 @include('chapters._breadcrumbs', ['chapter' => $chapter])
7 <div class="col-sm-6 col-xs-9 faded">
8 <div class="action-buttons">
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="{{ $chapter->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
13 <li><a href="{{ $chapter->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
14 <li><a href="{{ $chapter->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
17 @if(userCan('page-create', $chapter))
18 <a href="{{ $chapter->getUrl('/create-page') }}" class="text-pos text-button">@icon('add'){{ trans('entities.pages_new') }}</a>
20 @if(userCan('chapter-update', $chapter))
21 <a href="{{ $chapter->getUrl('/edit') }}" class="text-primary text-button">@icon('edit'){{ trans('common.edit') }}</a>
23 @if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter))
24 <div dropdown class="dropdown-container">
25 <a dropdown-toggle class="text-primary text-button">@icon('more') {{ trans('common.more') }}</a>
27 @if(userCan('chapter-update', $chapter))
28 <li><a href="{{ $chapter->getUrl('/move') }}" class="text-primary">@icon('folder'){{ trans('common.move') }}</a></li>
30 @if(userCan('restrictions-manage', $chapter))
31 <li><a href="{{ $chapter->getUrl('/permissions') }}" class="text-primary">@icon('lock'){{ trans('entities.permissions') }}</a></li>
33 @if(userCan('chapter-delete', $chapter))
34 <li><a href="{{ $chapter->getUrl('/delete') }}" class="text-neg">@icon('delete'){{ trans('common.delete') }}</a></li>
43 @section('container-attrs')
45 entity-id="{{ $chapter->id }}"
52 <form @submit.prevent="searchBook" class="search-box">
53 <input v-model="searchTerm" @change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.chapters_search_this') }}">
54 <button type="submit">@icon('search')</button>
55 <button v-if="searching" v-cloak class="text-neg" @click="clearSearch()" type="button">@icon('close')</button>
60 @if($book->restricted || $chapter->restricted)
62 <h3>@icon('permission') {{ trans('entities.permissions') }}</h3>
64 @if($book->restricted)
65 <p class="text-muted">
66 @if(userCan('restrictions-manage', $book))
67 <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
69 @icon('lock'){{ trans('entities.books_permissions_active') }}
74 @if($chapter->restricted)
75 <p class="text-muted">
76 @if(userCan('restrictions-manage', $chapter))
77 <a href="{{ $chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
79 @icon('lock'){{ trans('entities.chapters_permissions_active') }}
88 <h3>@icon('info') {{ trans('common.details') }}</h3>
90 @include('partials.entity-meta', ['entity' => $chapter])
94 @include('partials/book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
99 <div class="container small">
100 <h1 v-pre>{{ $chapter->name }}</h1>
101 <div class="chapter-content" v-show="!searching">
102 <p v-pre class="text-muted break-text">{!! nl2br(e($chapter->description)) !!}</p>
104 @if(count($pages) > 0)
105 <div v-pre class="page-list">
107 @foreach($pages as $page)
108 @include('pages/list-item', ['page' => $page])
113 <div v-pre class="well">
114 <p class="text-muted italic">{{ trans('entities.chapters_empty') }}</p>
116 @if(userCan('page-create', $chapter))
117 <a href="{{ $chapter->getUrl('/create-page') }}" class="button outline page">@icon('page'){{ trans('entities.books_empty_create_page') }}</a>
119 @if(userCan('page-create', $chapter) && userCan('book-update', $book))
120 <em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>
122 @if(userCan('book-update', $book))
123 <a href="{{ $book->getUrl('/sort') }}" class="button outline book">@icon('book'){{ trans('entities.books_empty_sort_current_book') }}</a>
130 <div class="search-results" v-cloak v-show="searching">
131 <h3 class="text-muted">{{ trans('entities.search_results') }} <a v-if="searching" @click="clearSearch()" class="text-small">@icon('close'){{ trans('entities.search_clear') }}</a></h3>
132 <div v-if="!searchResults">
133 @include('partials/loading-icon')
135 <div v-html="searchResults"></div>