]> BookStack Code Mirror - bookstack/blob - resources/views/shelves/show.blade.php
Move logFailedAccess into Activity
[bookstack] / resources / views / shelves / show.blade.php
1 @extends('tri-layout')
2
3 @section('body')
4
5     <div class="mb-s">
6         @include('partials.breadcrumbs', ['crumbs' => [
7             $shelf,
8         ]])
9     </div>
10
11     <main class="card content-wrap">
12         <h1 class="break-text">{{$shelf->name}}</h1>
13         <div class="book-content">
14             <p class="text-muted">{!! nl2br(e($shelf->description)) !!}</p>
15             @if(count($shelf->visibleBooks) > 0)
16                 <div class="entity-list">
17                     @foreach($shelf->visibleBooks as $book)
18                         @include('books.list-item', ['book' => $book])
19                     @endforeach
20                 </div>
21             @else
22                 <div class="mt-xl">
23                     <hr>
24                     <p class="text-muted italic mt-xl mb-m">{{ trans('entities.shelves_empty_contents') }}</p>
25                     <div class="icon-list inline block">
26                         @if(userCan('book-create-all') && userCan('bookshelf-update', $shelf))
27                             <a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item text-book">
28                                 <span class="icon">@icon('add')</span>
29                                 <span>{{ trans('entities.books_create') }}</span>
30                             </a>
31                         @endif
32                         @if(userCan('bookshelf-update', $shelf))
33                             <a href="{{ $shelf->getUrl('/edit') }}" class="icon-list-item text-bookshelf">
34                                 <span class="icon">@icon('edit')</span>
35                                 <span>{{ trans('entities.shelves_edit_and_assign') }}</span>
36                             </a>
37                         @endif
38                     </div>
39                 </div>
40             @endif
41         </div>
42     </main>
43
44 @stop
45
46 @section('left')
47
48     @if($shelf->tags->count() > 0)
49         <div id="tags" class="mb-xl">
50             @include('components.tag-list', ['entity' => $shelf])
51         </div>
52     @endif
53
54     <div id="details" class="mb-xl">
55         <h5>{{ trans('common.details') }}</h5>
56         <div class="text-small text-muted blended-links">
57             @include('partials.entity-meta', ['entity' => $shelf])
58             @if($shelf->restricted)
59                 <div class="active-restriction">
60                     @if(userCan('restrictions-manage', $shelf))
61                         <a href="{{ $shelf->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.shelves_permissions_active') }}</a>
62                     @else
63                         @icon('lock'){{ trans('entities.shelves_permissions_active') }}
64                     @endif
65                 </div>
66             @endif
67         </div>
68     </div>
69
70     @if(count($activity) > 0)
71         <div class="mb-xl">
72             <h5>{{ trans('entities.recent_activity') }}</h5>
73             @include('partials.activity-list', ['activity' => $activity])
74         </div>
75     @endif
76 @stop
77
78 @section('right')
79     <div class="actions mb-xl">
80         <h5>{{ trans('common.actions') }}</h5>
81         <div class="icon-list text-primary">
82
83             @if(userCan('book-create-all') && userCan('bookshelf-update', $shelf))
84                 <a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item">
85                     <span class="icon">@icon('add')</span>
86                     <span>{{ trans('entities.books_new_action') }}</span>
87                 </a>
88             @endif
89
90             <hr class="primary-background">
91
92             @if(userCan('bookshelf-update', $shelf))
93                 <a href="{{ $shelf->getUrl('/edit') }}" class="icon-list-item">
94                     <span>@icon('edit')</span>
95                     <span>{{ trans('common.edit') }}</span>
96                 </a>
97             @endif
98
99             @if(userCan('restrictions-manage', $shelf))
100                 <a href="{{ $shelf->getUrl('/permissions') }}" class="icon-list-item">
101                     <span>@icon('lock')</span>
102                     <span>{{ trans('entities.permissions') }}</span>
103                 </a>
104             @endif
105
106             @if(userCan('bookshelf-delete', $shelf))
107                 <a href="{{ $shelf->getUrl('/delete') }}" class="icon-list-item">
108                     <span>@icon('delete')</span>
109                     <span>{{ trans('common.delete') }}</span>
110                 </a>
111             @endif
112
113         </div>
114     </div>
115 @stop
116
117
118
119