]> BookStack Code Mirror - bookstack/blob - resources/views/books/show.blade.php
Add feature to send test e-mails
[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     <main 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     </main>
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             @include('partials.entity-export-menu', ['entity' => $book])
125         </div>
126     </div>
127
128 @stop
129
130 @section('left')
131
132     @include('partials.entity-dashboard-search-box')
133
134     @if($book->tags->count() > 0)
135         <div class="mb-xl">
136             @include('components.tag-list', ['entity' => $book])
137         </div>
138     @endif
139
140     @if(count($activity) > 0)
141         <div class="mb-xl">
142             <h5>{{ trans('entities.recent_activity') }}</h5>
143             @include('partials.activity-list', ['activity' => $activity])
144         </div>
145     @endif
146 @stop
147