]> BookStack Code Mirror - bookstack/blob - resources/views/shelves/show.blade.php
d7f604a6358a0af38e63e49191d466a5d4dcb25c
[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     <div 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($books) > 0)
16                 <div class="entity-list">
17                     @foreach($books as $book)
18                         @include('books/list-item', ['book' => $book])
19                     @endforeach
20                 </div>
21             @else
22                 <p>
23                     {{-- TODO - Empty Shelf State--}}
24                     <hr>
25                     <span class="text-muted italic">{{ trans('entities.shelves_empty_contents') }}</span>
26                     @if(userCan('bookshelf-create', $shelf))
27                         <br/>
28                         <a href="{{ $shelf->getUrl('/edit') }}" class="button outline">{{ trans('entities.shelves_edit_and_assign') }}</a>
29                     @endif
30                 </p>
31             @endif
32         </div>
33     </div>
34
35 @stop
36
37 @section('left')
38
39     @if($shelf->tags->count() > 0)
40         <div id="tags" class="mb-xl">
41             @include('components.tag-list', ['entity' => $shelf])
42         </div>
43     @endif
44
45     <div id="details" class="mb-xl">
46         <h5>{{ trans('common.details') }}</h5>
47         <div class="text-small text-muted blended-links">
48             @include('partials.entity-meta', ['entity' => $shelf])
49             @if($shelf->restricted)
50                 <div class="active-restriction">
51                     @if(userCan('restrictions-manage', $shelf))
52                         <a href="{{ $shelf->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.shelves_permissions_active') }}</a>
53                     @else
54                         @icon('lock'){{ trans('entities.shelves_permissions_active') }}
55                     @endif
56                 </div>
57             @endif
58         </div>
59     </div>
60
61     @if(count($activity) > 0)
62         <div class="mb-xl">
63             <h5>{{ trans('entities.recent_activity') }}</h5>
64             @include('partials.activity-list', ['activity' => $activity])
65         </div>
66     @endif
67 @stop
68
69 @section('right')
70     <div class="actions mb-xl">
71         <h5>{{ trans('common.actions') }}</h5>
72         <div class="icon-list text-primary">
73
74             @if(userCan('bookshelf-update', $shelf))
75                 <a href="{{ $shelf->getUrl('/edit') }}" class="icon-list-item">
76                     <span>@icon('edit')</span>
77                     <span>{{ trans('common.edit') }}</span>
78                 </a>
79             @endif
80
81             @if(userCan('restrictions-manage', $shelf))
82                 <a href="{{ $shelf->getUrl('/permissions') }}" class="icon-list-item">
83                     <span>@icon('lock')</span>
84                     <span>{{ trans('entities.permissions') }}</span>
85                 </a>
86             @endif
87
88             @if(userCan('bookshelf-delete', $shelf))
89                 <a href="{{ $shelf->getUrl('/delete') }}" class="icon-list-item">
90                     <span>@icon('delete')</span>
91                     <span>{{ trans('common.delete') }}</span>
92                 </a>
93             @endif
94
95         </div>
96     </div>
97 @stop
98
99
100
101