]> BookStack Code Mirror - bookstack/blob - resources/views/pages/show.blade.php
added rtl support for hebrew + added to localMap
[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" page-display="{{ $page->id }}">
15             @include('pages.pointer', ['page' => $page])
16             @include('pages.page-display')
17         </div>
18     </div>
19
20     @if ($commentsEnabled)
21         <div class="container small p-none comments-container mb-l">
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         <div id="page-navigation" class="mb-xl">
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         </div>
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         </div>
107     </div>
108
109     <div class="actions mb-xl">
110         <h5>Actions</h5>
111
112         <div class="icon-list text-primary">
113
114             {{--User Actions--}}
115             @if(userCan('page-update', $page))
116                 <a href="{{ $page->getUrl('/edit') }}" class="icon-list-item">
117                     <span>@icon('edit')</span>
118                     <span>{{ trans('common.edit') }}</span>
119                 </a>
120             @endif
121             @if(userCanOnAny('page-create'))
122                 <a href="{{ $page->getUrl('/copy') }}" class="icon-list-item">
123                     <span>@icon('copy')</span>
124                     <span>{{ trans('common.copy') }}</span>
125                 </a>
126             @endif
127             @if(userCan('page-update', $page))
128                 @if(userCan('page-delete', $page))
129                         <a href="{{ $page->getUrl('/move') }}" class="icon-list-item">
130                             <span>@icon('folder')</span>
131                             <span>{{ trans('common.move') }}</span>
132                         </a>
133                 @endif
134                 <a href="{{ $page->getUrl('/revisions') }}" class="icon-list-item">
135                     <span>@icon('history')</span>
136                     <span>{{ trans('entities.revisions') }}</span>
137                 </a>
138             @endif
139             @if(userCan('restrictions-manage', $page))
140                 <a href="{{ $page->getUrl('/permissions') }}" class="icon-list-item">
141                     <span>@icon('lock')</span>
142                     <span>{{ trans('entities.permissions') }}</span>
143                 </a>
144             @endif
145             @if(userCan('page-delete', $page))
146                 <a href="{{ $page->getUrl('/delete') }}" class="icon-list-item">
147                     <span>@icon('delete')</span>
148                     <span>{{ trans('common.delete') }}</span>
149                 </a>
150             @endif
151
152             <hr class="primary-background"/>
153
154             {{--Export--}}
155             <div dropdown class="dropdown-container block">
156                 <div dropdown-toggle class="icon-list-item">
157                     <span>@icon('export')</span>
158                     <span>{{ trans('entities.export') }}</span>
159                 </div>
160                 <ul class="dropdown-menu wide">
161                     <li><a href="{{ $page->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
162                     <li><a href="{{ $page->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
163                     <li><a href="{{ $page->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
164                 </ul>
165             </div>
166         </div>
167
168     </div>
169 @stop