]> BookStack Code Mirror - bookstack/blob - resources/views/shelves/show.blade.php
Update settings.php
[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                 @if($view === 'list')
17                     <div class="entity-list">
18                         @foreach($shelf->visibleBooks as $book)
19                             @include('books.list-item', ['book' => $book])
20                         @endforeach
21                     </div>
22                 @else
23                     <div class="grid third">
24                         @foreach($shelf->visibleBooks as $key => $book)
25                             @include('books.grid-item', ['book' => $book])
26                         @endforeach
27                     </div>
28                 @endif
29             @else
30                 <div class="mt-xl">
31                     <hr>
32                     <p class="text-muted italic mt-xl mb-m">{{ trans('entities.shelves_empty_contents') }}</p>
33                     <div class="icon-list inline block">
34                         @if(userCan('book-create-all') && userCan('bookshelf-update', $shelf))
35                             <a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item text-book">
36                                 <span class="icon">@icon('add')</span>
37                                 <span>{{ trans('entities.books_create') }}</span>
38                             </a>
39                         @endif
40                         @if(userCan('bookshelf-update', $shelf))
41                             <a href="{{ $shelf->getUrl('/edit') }}" class="icon-list-item text-bookshelf">
42                                 <span class="icon">@icon('edit')</span>
43                                 <span>{{ trans('entities.shelves_edit_and_assign') }}</span>
44                             </a>
45                         @endif
46                     </div>
47                 </div>
48             @endif
49         </div>
50     </main>
51
52 @stop
53
54 @section('left')
55
56     @if($shelf->tags->count() > 0)
57         <div id="tags" class="mb-xl">
58             @include('components.tag-list', ['entity' => $shelf])
59         </div>
60     @endif
61
62     <div id="details" class="mb-xl">
63         <h5>{{ trans('common.details') }}</h5>
64         <div class="text-small text-muted blended-links">
65             @include('partials.entity-meta', ['entity' => $shelf])
66             @if($shelf->restricted)
67                 <div class="active-restriction">
68                     @if(userCan('restrictions-manage', $shelf))
69                         <a href="{{ $shelf->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.shelves_permissions_active') }}</a>
70                     @else
71                         @icon('lock'){{ trans('entities.shelves_permissions_active') }}
72                     @endif
73                 </div>
74             @endif
75         </div>
76     </div>
77
78     @if(count($activity) > 0)
79         <div class="mb-xl">
80             <h5>{{ trans('entities.recent_activity') }}</h5>
81             @include('partials.activity-list', ['activity' => $activity])
82         </div>
83     @endif
84 @stop
85
86 @section('right')
87     <div class="actions mb-xl">
88         <h5>{{ trans('common.actions') }}</h5>
89         <div class="icon-list text-primary">
90
91             @if(userCan('book-create-all') && userCan('bookshelf-update', $shelf))
92                 <a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item">
93                     <span class="icon">@icon('add')</span>
94                     <span>{{ trans('entities.books_new_action') }}</span>
95                 </a>
96             @endif
97
98             @include('partials.view-toggle', ['view' => $view, 'type' => 'shelf'])
99
100             <hr class="primary-background">
101
102             @if(userCan('bookshelf-update', $shelf))
103                 <a href="{{ $shelf->getUrl('/edit') }}" class="icon-list-item">
104                     <span>@icon('edit')</span>
105                     <span>{{ trans('common.edit') }}</span>
106                 </a>
107             @endif
108
109             @if(userCan('restrictions-manage', $shelf))
110                 <a href="{{ $shelf->getUrl('/permissions') }}" class="icon-list-item">
111                     <span>@icon('lock')</span>
112                     <span>{{ trans('entities.permissions') }}</span>
113                 </a>
114             @endif
115
116             @if(userCan('bookshelf-delete', $shelf))
117                 <a href="{{ $shelf->getUrl('/delete') }}" class="icon-list-item">
118                     <span>@icon('delete')</span>
119                     <span>{{ trans('common.delete') }}</span>
120                 </a>
121             @endif
122
123         </div>
124     </div>
125 @stop
126
127
128
129