]> BookStack Code Mirror - bookstack/blob - resources/views/pages/show.blade.php
Docker: Fix permission with node service by adding node as user
[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 clearfix" 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                 @include('attachments.list', ['attachments' => $page->attachments])
41             </div>
42         </div>
43     @endif
44
45     @if (isset($pageNav) && count($pageNav))
46         <nav id="page-navigation" class="mb-xl" aria-label="{{ trans('entities.pages_navigation') }}">
47             <h5>{{ trans('entities.pages_navigation') }}</h5>
48             <div class="body">
49                 <div class="sidebar-page-nav menu">
50                     @foreach($pageNav as $navItem)
51                         <li class="page-nav-item h{{ $navItem['level'] }}">
52                             <a href="{{ $navItem['link'] }}" class="text-limit-lines-1 block">{{ $navItem['text'] }}</a>
53                             <div class="primary-background sidebar-page-nav-bullet"></div>
54                         </li>
55                     @endforeach
56                 </div>
57             </div>
58         </nav>
59     @endif
60
61     @include('partials.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
62 @stop
63
64 @section('right')
65     <div id="page-details" class="entity-details mb-xl">
66         <h5>{{ trans('common.details') }}</h5>
67         <div class="body text-small blended-links">
68             @include('partials.entity-meta', ['entity' => $page])
69
70             @if($book->restricted)
71                 <div class="active-restriction">
72                     @if(userCan('restrictions-manage', $book))
73                         <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
74                     @else
75                         @icon('lock'){{ trans('entities.books_permissions_active') }}
76                     @endif
77                 </div>
78             @endif
79
80             @if($page->chapter && $page->chapter->restricted)
81                 <div class="active-restriction">
82                     @if(userCan('restrictions-manage', $page->chapter))
83                         <a href="{{ $page->chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
84                     @else
85                         @icon('lock'){{ trans('entities.chapters_permissions_active') }}
86                     @endif
87                 </div>
88             @endif
89
90             @if($page->restricted)
91                 <div class="active-restriction">
92                     @if(userCan('restrictions-manage', $page))
93                         <a href="{{ $page->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.pages_permissions_active') }}</a>
94                     @else
95                         @icon('lock'){{ trans('entities.pages_permissions_active') }}
96                     @endif
97                 </div>
98             @endif
99
100             @if($page->template)
101                 <div>
102                     @icon('template'){{ trans('entities.pages_is_template') }}
103                 </div>
104             @endif
105         </div>
106     </div>
107
108     <div class="actions mb-xl">
109         <h5>{{ trans('common.actions') }}</h5>
110
111         <div class="icon-list text-primary">
112
113             {{--User Actions--}}
114             @if(userCan('page-update', $page))
115                 <a href="{{ $page->getUrl('/edit') }}" class="icon-list-item">
116                     <span>@icon('edit')</span>
117                     <span>{{ trans('common.edit') }}</span>
118                 </a>
119             @endif
120             @if(userCanOnAny('page-create'))
121                 <a href="{{ $page->getUrl('/copy') }}" class="icon-list-item">
122                     <span>@icon('copy')</span>
123                     <span>{{ trans('common.copy') }}</span>
124                 </a>
125             @endif
126             @if(userCan('page-update', $page))
127                 @if(userCan('page-delete', $page))
128                         <a href="{{ $page->getUrl('/move') }}" class="icon-list-item">
129                             <span>@icon('folder')</span>
130                             <span>{{ trans('common.move') }}</span>
131                         </a>
132                 @endif
133                 <a href="{{ $page->getUrl('/revisions') }}" class="icon-list-item">
134                     <span>@icon('history')</span>
135                     <span>{{ trans('entities.revisions') }}</span>
136                 </a>
137             @endif
138             @if(userCan('restrictions-manage', $page))
139                 <a href="{{ $page->getUrl('/permissions') }}" class="icon-list-item">
140                     <span>@icon('lock')</span>
141                     <span>{{ trans('entities.permissions') }}</span>
142                 </a>
143             @endif
144             @if(userCan('page-delete', $page))
145                 <a href="{{ $page->getUrl('/delete') }}" class="icon-list-item">
146                     <span>@icon('delete')</span>
147                     <span>{{ trans('common.delete') }}</span>
148                 </a>
149             @endif
150
151             <hr class="primary-background"/>
152
153             {{--Export--}}
154             @include('partials.entity-export-menu', ['entity' => $page])
155         </div>
156
157     </div>
158 @stop