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