]> BookStack Code Mirror - bookstack/blob - resources/views/pages/show.blade.php
Update errors.php
[bookstack] / resources / views / pages / show.blade.php
1 @extends('tri-layout')
2
3 @section('body')
4
5     <div class="mb-m print-hidden">
6         @include('partials.breadcrumbs', ['crumbs' => [
7             $page->book,
8             $page->hasChapter() ? $page->chapter : null,
9             $page,
10         ]])
11     </div>
12
13     <main class="content-wrap card">
14         <div class="page-content" page-display="{{ $page->id }}">
15             @include('pages.pointer', ['page' => $page])
16             @include('pages.page-display')
17         </div>
18     </main>
19
20     @if ($commentsEnabled)
21         <div class="container small p-none comments-container mb-l print-hidden">
22             @include('comments.comments', ['page' => $page])
23             <div class="clearfix"></div>
24         </div>
25     @endif
26 @stop
27
28 @section('left')
29
30     @if($page->tags->count() > 0)
31         <section>
32             @include('components.tag-list', ['entity' => $page])
33         </section>
34     @endif
35
36     @if ($page->attachments->count() > 0)
37         <div id="page-attachments" class="mb-l">
38             <h5>{{ trans('entities.pages_attachments') }}</h5>
39             <div class="body">
40                 @foreach($page->attachments as $attachment)
41                     <div class="attachment icon-list">
42                         <a class="icon-list-item py-xs" href="{{ $attachment->getUrl() }}" @if($attachment->external) target="_blank" @endif>
43                             <span class="icon">@icon($attachment->external ? 'export' : 'file')</span>
44                             <span>{{ $attachment->name }}</span>
45                         </a>
46                     </div>
47                 @endforeach
48             </div>
49         </div>
50     @endif
51
52     @if (isset($pageNav) && count($pageNav))
53         <nav id="page-navigation" class="mb-xl" aria-label="{{ trans('entities.pages_navigation') }}">
54             <h5>{{ trans('entities.pages_navigation') }}</h5>
55             <div class="body">
56                 <div class="sidebar-page-nav menu">
57                     @foreach($pageNav as $navItem)
58                         <li class="page-nav-item h{{ $navItem['level'] }}">
59                             <a href="{{ $navItem['link'] }}" class="limit-text block">{{ $navItem['text'] }}</a>
60                             <div class="primary-background sidebar-page-nav-bullet"></div>
61                         </li>
62                     @endforeach
63                 </div>
64             </div>
65         </nav>
66     @endif
67
68     @include('partials.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
69 @stop
70
71 @section('right')
72     <div id="page-details" class="entity-details mb-xl">
73         <h5>{{ trans('common.details') }}</h5>
74         <div class="body text-small blended-links">
75             @include('partials.entity-meta', ['entity' => $page])
76
77             @if($book->restricted)
78                 <div class="active-restriction">
79                     @if(userCan('restrictions-manage', $book))
80                         <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
81                     @else
82                         @icon('lock'){{ trans('entities.books_permissions_active') }}
83                     @endif
84                 </div>
85             @endif
86
87             @if($page->chapter && $page->chapter->restricted)
88                 <div class="active-restriction">
89                     @if(userCan('restrictions-manage', $page->chapter))
90                         <a href="{{ $page->chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
91                     @else
92                         @icon('lock'){{ trans('entities.chapters_permissions_active') }}
93                     @endif
94                 </div>
95             @endif
96
97             @if($page->restricted)
98                 <div class="active-restriction">
99                     @if(userCan('restrictions-manage', $page))
100                         <a href="{{ $page->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.pages_permissions_active') }}</a>
101                     @else
102                         @icon('lock'){{ trans('entities.pages_permissions_active') }}
103                     @endif
104                 </div>
105             @endif
106
107             @if($page->template)
108                 <div>
109                     @icon('template'){{ trans('entities.pages_is_template') }}
110                 </div>
111             @endif
112         </div>
113     </div>
114
115     <div class="actions mb-xl">
116         <h5>Actions</h5>
117
118         <div class="icon-list text-primary">
119
120             {{--User Actions--}}
121             @if(userCan('page-update', $page))
122                 <a href="{{ $page->getUrl('/edit') }}" class="icon-list-item">
123                     <span>@icon('edit')</span>
124                     <span>{{ trans('common.edit') }}</span>
125                 </a>
126             @endif
127             @if(userCanOnAny('page-create'))
128                 <a href="{{ $page->getUrl('/copy') }}" class="icon-list-item">
129                     <span>@icon('copy')</span>
130                     <span>{{ trans('common.copy') }}</span>
131                 </a>
132             @endif
133             @if(userCan('page-update', $page))
134                 @if(userCan('page-delete', $page))
135                         <a href="{{ $page->getUrl('/move') }}" class="icon-list-item">
136                             <span>@icon('folder')</span>
137                             <span>{{ trans('common.move') }}</span>
138                         </a>
139                 @endif
140                 <a href="{{ $page->getUrl('/revisions') }}" class="icon-list-item">
141                     <span>@icon('history')</span>
142                     <span>{{ trans('entities.revisions') }}</span>
143                 </a>
144             @endif
145             @if(userCan('restrictions-manage', $page))
146                 <a href="{{ $page->getUrl('/permissions') }}" class="icon-list-item">
147                     <span>@icon('lock')</span>
148                     <span>{{ trans('entities.permissions') }}</span>
149                 </a>
150             @endif
151             @if(userCan('page-delete', $page))
152                 <a href="{{ $page->getUrl('/delete') }}" class="icon-list-item">
153                     <span>@icon('delete')</span>
154                     <span>{{ trans('common.delete') }}</span>
155                 </a>
156             @endif
157
158             <hr class="primary-background"/>
159
160             {{--Export--}}
161             @include('partials.entity-export-menu', ['entity' => $page])
162         </div>
163
164     </div>
165 @stop