1 @extends('layouts.tri')
4 <meta property="og:description" content="{{ Str::limit($page->text, 100, '...') }}">
7 @include('entities.body-tag-classes', ['entity' => $page])
11 <div class="mb-m print-hidden">
12 @include('entities.breadcrumbs', ['crumbs' => [
14 $page->hasChapter() ? $page->chapter : null,
19 <main class="content-wrap card">
20 <div component="page-display"
21 option:page-display:page-id="{{ $page->id }}"
22 class="page-content clearfix">
23 @include('pages.parts.page-display')
25 @include('pages.parts.pointer', ['page' => $page])
28 @include('entities.sibling-navigation', ['next' => $next, 'previous' => $previous])
30 @if ($commentTree->enabled())
31 <div class="comments-container mb-l print-hidden">
32 @include('comments.comments', ['commentTree' => $commentTree, 'page' => $page])
33 <div class="clearfix"></div>
40 @if($page->tags->count() > 0)
42 @include('entities.tag-list', ['entity' => $page])
46 @if ($page->attachments->count() > 0)
47 <div id="page-attachments" class="mb-l">
48 <h5>{{ trans('entities.pages_attachments') }}</h5>
50 @include('attachments.list', ['attachments' => $page->attachments])
55 @if (isset($pageNav) && count($pageNav))
56 <nav id="page-navigation" class="mb-xl" aria-label="{{ trans('entities.pages_navigation') }}">
57 <h5>{{ trans('entities.pages_navigation') }}</h5>
59 <div class="sidebar-page-nav menu">
60 @foreach($pageNav as $navItem)
61 <li class="page-nav-item h{{ $navItem['level'] }}">
62 <a href="{{ $navItem['link'] }}" class="text-limit-lines-1 block">{{ $navItem['text'] }}</a>
63 <div class="link-background sidebar-page-nav-bullet"></div>
71 @include('entities.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
75 <div id="page-details" class="entity-details mb-xl">
76 <h5>{{ trans('common.details') }}</h5>
77 <div class="blended-links">
78 @include('entities.meta', ['entity' => $page, 'watchOptions' => $watchOptions])
80 @if($book->hasPermissions())
81 <div class="active-restriction">
82 @if(userCan('restrictions-manage', $book))
83 <a href="{{ $book->getUrl('/permissions') }}" class="entity-meta-item">
85 <div>{{ trans('entities.books_permissions_active') }}</div>
88 <div class="entity-meta-item">
90 <div>{{ trans('entities.books_permissions_active') }}</div>
96 @if($page->chapter && $page->chapter->hasPermissions())
97 <div class="active-restriction">
98 @if(userCan('restrictions-manage', $page->chapter))
99 <a href="{{ $page->chapter->getUrl('/permissions') }}" class="entity-meta-item">
101 <div>{{ trans('entities.chapters_permissions_active') }}</div>
104 <div class="entity-meta-item">
106 <div>{{ trans('entities.chapters_permissions_active') }}</div>
112 @if($page->hasPermissions())
113 <div class="active-restriction">
114 @if(userCan('restrictions-manage', $page))
115 <a href="{{ $page->getUrl('/permissions') }}" class="entity-meta-item">
117 <div>{{ trans('entities.pages_permissions_active') }}</div>
120 <div class="entity-meta-item">
122 <div>{{ trans('entities.pages_permissions_active') }}</div>
129 <div class="entity-meta-item">
131 <div>{{ trans('entities.pages_is_template') }}</div>
137 <div class="actions mb-xl">
138 <h5>{{ trans('common.actions') }}</h5>
140 <div class="icon-list text-link">
143 @if(userCan('page-update', $page))
144 <a href="{{ $page->getUrl('/edit') }}" data-shortcut="edit" class="icon-list-item">
145 <span>@icon('edit')</span>
146 <span>{{ trans('common.edit') }}</span>
149 @if(userCanOnAny('create', \BookStack\Entities\Models\Book::class) || userCanOnAny('create', \BookStack\Entities\Models\Chapter::class) || userCan('page-create-all') || userCan('page-create-own'))
150 <a href="{{ $page->getUrl('/copy') }}" data-shortcut="copy" class="icon-list-item">
151 <span>@icon('copy')</span>
152 <span>{{ trans('common.copy') }}</span>
155 @if(userCan('page-update', $page))
156 @if(userCan('page-delete', $page))
157 <a href="{{ $page->getUrl('/move') }}" data-shortcut="move" class="icon-list-item">
158 <span>@icon('folder')</span>
159 <span>{{ trans('common.move') }}</span>
163 <a href="{{ $page->getUrl('/revisions') }}" data-shortcut="revisions" class="icon-list-item">
164 <span>@icon('history')</span>
165 <span>{{ trans('entities.revisions') }}</span>
167 @if(userCan('restrictions-manage', $page))
168 <a href="{{ $page->getUrl('/permissions') }}" data-shortcut="permissions" class="icon-list-item">
169 <span>@icon('lock')</span>
170 <span>{{ trans('entities.permissions') }}</span>
173 @if(userCan('page-delete', $page))
174 <a href="{{ $page->getUrl('/delete') }}" data-shortcut="delete" class="icon-list-item">
175 <span>@icon('delete')</span>
176 <span>{{ trans('common.delete') }}</span>
180 <hr class="primary-background"/>
182 @if($watchOptions->canWatch() && !$watchOptions->isWatching())
183 @include('entities.watch-action', ['entity' => $page])
185 @if(!user()->isGuest())
186 @include('entities.favourite-action', ['entity' => $page])
188 @if(userCan('content-export'))
189 @include('entities.export-menu', ['entity' => $page])