-
- <div class="container" id="page-show" ng-non-bindable>
- <div class="row">
- <div class="col-md-9 print-full-width">
- <div class="page-content">
-
- <div class="pointer-container" id="pointer">
- <div class="pointer anim">
- <span class="icon text-primary"><i class="zmdi zmdi-link"></i></span>
- <input readonly="readonly" type="text" id="pointer-url" placeholder="url">
- <button class="button icon" data-clipboard-target="#pointer-url" type="button" title="{{ trans('entities.pages_copy_link') }}"><i class="zmdi zmdi-copy"></i></button>
- </div>
+@section('sidebar')
+ @if($book->restricted || ($page->chapter && $page->chapter->restricted) || $page->restricted)
+ <div class="card">
+ <h3>@icon('permission') {{ trans('entities.permissions') }}</h3>
+ <div class="body">
+ <div class="text-muted">
+
+ @if($book->restricted)
+ @if(userCan('restrictions-manage', $book))
+ <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
+ @else
+ @icon('lock'){{ trans('entities.books_permissions_active') }}
+ @endif
+ <br>
+ @endif
+
+ @if($page->chapter && $page->chapter->restricted)
+ @if(userCan('restrictions-manage', $page->chapter))
+ <a href="{{ $page->chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
+ @else
+ @icon('lock'){{ trans('entities.chapters_permissions_active') }}
+ @endif
+ <br>
+ @endif
+
+ @if($page->restricted)
+ @if(userCan('restrictions-manage', $page))
+ <a href="{{ $page->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.pages_permissions_active') }}</a>
+ @else
+ @icon('lock'){{ trans('entities.pages_permissions_active') }}
+ @endif
+ <br>
+ @endif
+ </div>
+ </div>
+ </div>
+ @endif
+
+ @if($page->tags->count() > 0)
+ <div class="card tag-display">
+ <h3>@icon('tag') {{ trans('entities.page_tags') }}</h3>
+ <div class="body">
+ <table>
+ <tbody>
+ @foreach($page->tags as $tag)
+ <tr class="tag">
+ <td @if(!$tag->value) colspan="2" @endif><a href="{{ baseUrl('/search?term=%5B' . urlencode($tag->name) .'%5D') }}">{{ $tag->name }}</a></td>
+ @if($tag->value) <td class="tag-value"><a href="{{ baseUrl('/search?term=%5B' . urlencode($tag->name) .'%3D' . urlencode($tag->value) . '%5D') }}">{{$tag->value}}</a></td> @endif
+ </tr>
+ @endforeach
+ </tbody>
+ </table>
+ </div>
+ </div>
+ @endif
+
+ @if ($page->attachments->count() > 0)
+ <div class="card">
+ <h3>@icon('attach') {{ trans('entities.pages_attachments') }}</h3>
+ <div class="body">
+ @foreach($page->attachments as $attachment)
+ <div class="attachment">
+ <a href="{{ $attachment->getUrl() }}" @if($attachment->external) target="_blank" @endif>@icon($attachment->external ? 'export' : 'file'){{ $attachment->name }}</a>