]> BookStack Code Mirror - bookstack/blob - resources/views/shelves/list.blade.php
Made shelf listing more unique & efficient
[bookstack] / resources / views / shelves / list.blade.php
1
2 <div class="content-wrap card">
3     {{--TODO - Create unique list item--}}
4
5     <div class="grid half v-center">
6         <h1 class="list-heading">{{ trans('entities.shelves') }}</h1>
7         <div class="text-right">
8             @include('partials.sort', ['options' => $sortOptions, 'order' => $order, 'sort' => $sort, 'type' => 'bookshelves'])
9         </div>
10     </div>
11
12     @if(count($shelves) > 0)
13         @if($view === 'list')
14             <div class="entity-list">
15                 @foreach($shelves as $index => $shelf)
16                     @if ($index !== 0)
17                         <hr class="my-m">
18                     @endif
19                     @include('shelves.list-item', ['shelf' => $shelf])
20                 @endforeach
21             </div>
22         @else
23             <div class="grid third">
24                 @foreach($shelves as $key => $shelf)
25                     @include('shelves.grid-item', ['shelf' => $shelf])
26                 @endforeach
27             </div>
28         @endif
29         <div>
30             {!! $shelves->render() !!}
31         </div>
32     @else
33         <p class="text-muted">{{ trans('entities.shelves_empty') }}</p>
34         @if(userCan('bookshelf-create-all'))
35             <a href="{{ baseUrl("/create-shelf") }}" class="button outline">@icon('edit'){{ trans('entities.create_now') }}</a>
36         @endif
37     @endif
38
39 </div>