]> BookStack Code Mirror - bookstack/blob - resources/views/pages/show.blade.php
Updated 'Spanish Argentina' translation.
[bookstack] / resources / views / pages / show.blade.php
1 @extends('sidebar-layout')
2
3 @section('toolbar')
4     <div class="col-sm-8 col-xs-5 faded">
5         @include('pages._breadcrumbs', ['page' => $page])
6     </div>
7     <div class="col-sm-4 col-xs-7 faded">
8         <div class="action-buttons">
9             <span dropdown class="dropdown-container">
10                 <div dropdown-toggle class="text-button text-primary">@icon('export'){{ trans('entities.export') }}</div>
11                 <ul class="wide">
12                     <li><a href="{{ $page->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
13                     <li><a href="{{ $page->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
14                     <li><a href="{{ $page->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
15                 </ul>
16             </span>
17             @if(userCan('page-update', $page))
18                 <a href="{{ $page->getUrl('/edit') }}" class="text-primary text-button" >@icon('edit'){{ trans('common.edit') }}</a>
19             @endif
20             @if(userCan('page-update', $page) || userCan('restrictions-manage', $page) || userCan('page-delete', $page))
21                 <div dropdown class="dropdown-container">
22                     <a dropdown-toggle class="text-primary text-button">@icon('more') {{ trans('common.more') }}</a>
23                     <ul>
24                         @if(userCan('page-update', $page))
25                             <li><a href="{{ $page->getUrl('/copy') }}" class="text-primary" >@icon('copy'){{ trans('common.copy') }}</a></li>
26                             <li><a href="{{ $page->getUrl('/move') }}" class="text-primary" >@icon('folder'){{ trans('common.move') }}</a></li>
27                             <li><a href="{{ $page->getUrl('/revisions') }}" class="text-primary">@icon('history'){{ trans('entities.revisions') }}</a></li>
28                         @endif
29                         @if(userCan('restrictions-manage', $page))
30                             <li><a href="{{ $page->getUrl('/permissions') }}" class="text-primary">@icon('lock'){{ trans('entities.permissions') }}</a></li>
31                         @endif
32                         @if(userCan('page-delete', $page))
33                             <li><a href="{{ $page->getUrl('/delete') }}" class="text-neg">@icon('delete'){{ trans('common.delete') }}</a></li>
34                         @endif
35                     </ul>
36                 </div>
37             @endif
38
39         </div>
40     </div>
41 @stop
42
43 @section('sidebar')
44     @if($book->restricted || ($page->chapter && $page->chapter->restricted) || $page->restricted)
45         <div class="card">
46             <h3>@icon('permission') {{ trans('entities.permissions') }}</h3>
47             <div class="body">
48                 <div class="text-muted">
49
50                     @if($book->restricted)
51                         @if(userCan('restrictions-manage', $book))
52                             <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
53                         @else
54                             @icon('lock'){{ trans('entities.books_permissions_active') }}
55                         @endif
56                         <br>
57                     @endif
58
59                     @if($page->chapter && $page->chapter->restricted)
60                         @if(userCan('restrictions-manage', $page->chapter))
61                             <a href="{{ $page->chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
62                         @else
63                             @icon('lock'){{ trans('entities.chapters_permissions_active') }}
64                         @endif
65                         <br>
66                     @endif
67
68                     @if($page->restricted)
69                         @if(userCan('restrictions-manage', $page))
70                             <a href="{{ $page->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.pages_permissions_active') }}</a>
71                         @else
72                             @icon('lock'){{ trans('entities.pages_permissions_active') }}
73                         @endif
74                         <br>
75                     @endif
76                 </div>
77             </div>
78         </div>
79     @endif
80
81     @if($page->tags->count() > 0)
82         <div class="card tag-display">
83             <h3>@icon('tag') {{ trans('entities.page_tags') }}</h3>
84             <div class="body">
85                 @include('components.tag-list', ['entity' => $page])
86             </div>
87         </div>
88     @endif
89
90     @if ($page->attachments->count() > 0)
91         <div class="card">
92             <h3>@icon('attach') {{ trans('entities.pages_attachments') }}</h3>
93             <div class="body">
94                 @foreach($page->attachments as $attachment)
95                     <div class="attachment">
96                         <a href="{{ $attachment->getUrl() }}" @if($attachment->external) target="_blank" @endif>@icon($attachment->external ? 'export' : 'file'){{ $attachment->name }}</a>
97                     </div>
98                 @endforeach
99             </div>
100         </div>
101     @endif
102
103     @if (isset($pageNav) && count($pageNav))
104         <div class="card">
105             <h3>@icon('open-book') {{ trans('entities.pages_navigation') }}</h3>
106             <div class="body">
107                 <div class="sidebar-page-nav menu">
108                     @foreach($pageNav as $navItem)
109                         <li class="page-nav-item h{{ $navItem['level'] }}">
110                             <a href="{{ $navItem['link'] }}">{{ $navItem['text'] }}</a>
111                         </li>
112                     @endforeach
113                 </div>
114             </div>
115         </div>
116     @endif
117
118     <div class="card">
119         <h3>@icon('info') {{ trans('common.details') }}</h3>
120         <div class="body">
121             @include('partials.entity-meta', ['entity' => $page])
122         </div>
123     </div>
124
125     @include('partials/book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
126
127 @stop
128
129 @section('body')
130     <div class="page-content" page-display="{{ $page->id }}" ng-non-bindable>
131
132         <div class="pointer-container" id="pointer">
133             <div class="pointer anim" >
134                 <span class="icon text-primary">@icon('link') @icon('include', ['style' => 'display:none;'])</span>
135                 <input readonly="readonly" type="text" id="pointer-url" placeholder="url">
136                 <button class="button icon" data-clipboard-target="#pointer-url" type="button" title="{{ trans('entities.pages_copy_link') }}">@icon('copy')</button>
137             </div>
138         </div>
139
140         @include('pages/page-display')
141
142     </div>
143     @if ($commentsEnabled)
144       <div class="container small nopad">
145           @include('comments/comments', ['page' => $page])
146       </div>
147     @endif
148 @stop