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