]> BookStack Code Mirror - bookstack/blob - resources/views/chapters/show.blade.php
Add feature to send test e-mails
[bookstack] / resources / views / chapters / show.blade.php
1 @extends('tri-layout')
2
3 @section('container-attrs')
4     id="entity-dashboard"
5     entity-id="{{ $chapter->id }}"
6     entity-type="chapter"
7 @stop
8
9 @section('body')
10
11     <div class="mb-m print-hidden">
12         @include('partials.breadcrumbs', ['crumbs' => [
13             $chapter->book,
14             $chapter,
15         ]])
16     </div>
17
18     <main class="content-wrap card">
19         <h1 class="break-text" v-pre>{{ $chapter->name }}</h1>
20         <div class="chapter-content" v-show="!searching">
21             <p v-pre class="text-muted break-text">{!! nl2br(e($chapter->description)) !!}</p>
22             @if(count($pages) > 0)
23                 <div v-pre class="entity-list book-contents">
24                     @foreach($pages as $page)
25                         @include('pages.list-item', ['page' => $page])
26                     @endforeach
27                 </div>
28             @else
29                 <div class="mt-xl" v-pre>
30                     <hr>
31                     <p class="text-muted italic mb-m mt-xl">{{ trans('entities.chapters_empty') }}</p>
32
33                     <div class="icon-list block inline">
34                         @if(userCan('page-create', $chapter))
35                             <a href="{{ $chapter->getUrl('/create-page') }}" class="icon-list-item text-page">
36                                 <span class="icon">@icon('page')</span>
37                                 <span>{{ trans('entities.books_empty_create_page') }}</span>
38                             </a>
39                         @endif
40                         @if(userCan('book-update', $book))
41                             <a href="{{ $book->getUrl('/sort') }}" class="icon-list-item text-book">
42                                 <span class="icon">@icon('book')</span>
43                                 <span>{{ trans('entities.books_empty_sort_current_book') }}</span>
44                             </a>
45                         @endif
46                     </div>
47
48                 </div>
49             @endif
50         </div>
51
52         @include('partials.entity-dashboard-search-results')
53     </main>
54
55 @stop
56
57 @section('right')
58
59     <div class="mb-xl">
60         <h5>{{ trans('common.details') }}</h5>
61         <div class="blended-links text-small text-muted">
62             @include('partials.entity-meta', ['entity' => $chapter])
63
64             @if($book->restricted)
65                 <div class="active-restriction">
66                     @if(userCan('restrictions-manage', $book))
67                         <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
68                     @else
69                         @icon('lock'){{ trans('entities.books_permissions_active') }}
70                     @endif
71                 </div>
72             @endif
73
74             @if($chapter->restricted)
75                 <div class="active-restriction">
76                     @if(userCan('restrictions-manage', $chapter))
77                         <a href="{{ $chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
78                     @else
79                         @icon('lock'){{ trans('entities.chapters_permissions_active') }}
80                     @endif
81                 </div>
82             @endif
83         </div>
84     </div>
85
86     <div class="actions mb-xl">
87         <h5>{{ trans('common.actions') }}</h5>
88         <div class="icon-list text-primary">
89
90             @if(userCan('page-create', $chapter))
91                 <a href="{{ $chapter->getUrl('/create-page') }}" class="icon-list-item">
92                     <span>@icon('add')</span>
93                     <span>{{ trans('entities.pages_new') }}</span>
94                 </a>
95             @endif
96
97             <hr class="primary-background"/>
98
99             @if(userCan('chapter-update', $chapter))
100                 <a href="{{ $chapter->getUrl('/edit') }}" class="icon-list-item">
101                     <span>@icon('edit')</span>
102                     <span>{{ trans('common.edit') }}</span>
103                 </a>
104             @endif
105             @if(userCan('chapter-update', $chapter) && userCan('chapter-delete', $chapter))
106                 <a href="{{ $chapter->getUrl('/move') }}" class="icon-list-item">
107                     <span>@icon('folder')</span>
108                     <span>{{ trans('common.move') }}</span>
109                 </a>
110             @endif
111             @if(userCan('restrictions-manage', $chapter))
112                 <a href="{{ $chapter->getUrl('/permissions') }}" class="icon-list-item">
113                     <span>@icon('lock')</span>
114                     <span>{{ trans('entities.permissions') }}</span>
115                 </a>
116             @endif
117             @if(userCan('chapter-delete', $chapter))
118                 <a href="{{ $chapter->getUrl('/delete') }}" class="icon-list-item">
119                     <span>@icon('delete')</span>
120                     <span>{{ trans('common.delete') }}</span>
121                 </a>
122             @endif
123
124             <hr class="primary-background"/>
125
126             @include('partials.entity-export-menu', ['entity' => $chapter])
127         </div>
128     </div>
129 @stop
130
131 @section('left')
132
133     @include('partials.entity-dashboard-search-box')
134
135     @if($chapter->tags->count() > 0)
136         <div class="mb-xl">
137             @include('components.tag-list', ['entity' => $chapter])
138         </div>
139     @endif
140
141     @include('partials.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
142 @stop
143
144