]> BookStack Code Mirror - bookstack/blob - resources/views/shelves/show.blade.php
Added markdown export endpoints to API
[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
13         <div class="flex-container-row wrap v-center">
14             <h1 class="flex fit-content break-text">{{ $shelf->name }}</h1>
15             <div class="flex"></div>
16             <div class="flex fit-content text-m-right my-m ml-m">
17                 @include('partials.sort', ['options' => [
18                     'default' => trans('common.sort_default'),
19                     'name' => trans('common.sort_name'),
20                     'created_at' => trans('common.sort_created_at'),
21                     'updated_at' => trans('common.sort_updated_at'),
22                 ], 'order' => $order, 'sort' => $sort, 'type' => 'shelf_books'])
23             </div>
24         </div>
25
26         <div class="book-content">
27             <p class="text-muted">{!! nl2br(e($shelf->description)) !!}</p>
28             @if(count($sortedVisibleShelfBooks) > 0)
29                 @if($view === 'list')
30                     <div class="entity-list">
31                         @foreach($sortedVisibleShelfBooks as $book)
32                             @include('books.list-item', ['book' => $book])
33                         @endforeach
34                     </div>
35                 @else
36                     <div class="grid third">
37                         @foreach($sortedVisibleShelfBooks as $book)
38                             @include('partials.entity-grid-item', ['entity' => $book])
39                         @endforeach
40                     </div>
41                 @endif
42             @else
43                 <div class="mt-xl">
44                     <hr>
45                     <p class="text-muted italic mt-xl mb-m">{{ trans('entities.shelves_empty_contents') }}</p>
46                     <div class="icon-list inline block">
47                         @if(userCan('book-create-all') && userCan('bookshelf-update', $shelf))
48                             <a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item text-book">
49                                 <span class="icon">@icon('add')</span>
50                                 <span>{{ trans('entities.books_create') }}</span>
51                             </a>
52                         @endif
53                         @if(userCan('bookshelf-update', $shelf))
54                             <a href="{{ $shelf->getUrl('/edit') }}" class="icon-list-item text-bookshelf">
55                                 <span class="icon">@icon('edit')</span>
56                                 <span>{{ trans('entities.shelves_edit_and_assign') }}</span>
57                             </a>
58                         @endif
59                     </div>
60                 </div>
61             @endif
62         </div>
63     </main>
64
65 @stop
66
67 @section('left')
68
69     @if($shelf->tags->count() > 0)
70         <div id="tags" class="mb-xl">
71             @include('components.tag-list', ['entity' => $shelf])
72         </div>
73     @endif
74
75     <div id="details" class="mb-xl">
76         <h5>{{ trans('common.details') }}</h5>
77         <div class="text-small text-muted blended-links">
78             @include('partials.entity-meta', ['entity' => $shelf])
79             @if($shelf->restricted)
80                 <div class="active-restriction">
81                     @if(userCan('restrictions-manage', $shelf))
82                         <a href="{{ $shelf->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.shelves_permissions_active') }}</a>
83                     @else
84                         @icon('lock'){{ trans('entities.shelves_permissions_active') }}
85                     @endif
86                 </div>
87             @endif
88         </div>
89     </div>
90
91     @if(count($activity) > 0)
92         <div class="mb-xl">
93             <h5>{{ trans('entities.recent_activity') }}</h5>
94             @include('partials.activity-list', ['activity' => $activity])
95         </div>
96     @endif
97 @stop
98
99 @section('right')
100     <div class="actions mb-xl">
101         <h5>{{ trans('common.actions') }}</h5>
102         <div class="icon-list text-primary">
103
104             @if(userCan('book-create-all') && userCan('bookshelf-update', $shelf))
105                 <a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item">
106                     <span class="icon">@icon('add')</span>
107                     <span>{{ trans('entities.books_new_action') }}</span>
108                 </a>
109             @endif
110
111             @include('partials.view-toggle', ['view' => $view, 'type' => 'shelf'])
112
113             <hr class="primary-background">
114
115             @if(userCan('bookshelf-update', $shelf))
116                 <a href="{{ $shelf->getUrl('/edit') }}" class="icon-list-item">
117                     <span>@icon('edit')</span>
118                     <span>{{ trans('common.edit') }}</span>
119                 </a>
120             @endif
121
122             @if(userCan('restrictions-manage', $shelf))
123                 <a href="{{ $shelf->getUrl('/permissions') }}" class="icon-list-item">
124                     <span>@icon('lock')</span>
125                     <span>{{ trans('entities.permissions') }}</span>
126                 </a>
127             @endif
128
129             @if(userCan('bookshelf-delete', $shelf))
130                 <a href="{{ $shelf->getUrl('/delete') }}" class="icon-list-item">
131                     <span>@icon('delete')</span>
132                     <span>{{ trans('common.delete') }}</span>
133                 </a>
134             @endif
135
136             @if(signedInUser())
137                 <hr class="primary-background">
138                 @include('partials.entity-favourite-action', ['entity' => $shelf])
139             @endif
140
141         </div>
142     </div>
143 @stop
144
145
146
147