]> BookStack Code Mirror - bookstack/blob - resources/views/books/index.blade.php
Merge branch 'master' into patch-5
[bookstack] / resources / views / books / index.blade.php
1 @extends('tri-layout')
2
3 @section('container-classes', 'mt-xl')
4
5 @section('body')
6     @include('books.list', ['books' => $books, 'view' => $view])
7 @stop
8
9 @section('left')
10     @if($recents)
11         <div id="recents" class="mb-xl">
12             <h5>{{ trans('entities.recently_viewed') }}</h5>
13             @include('partials.entity-list', ['entities' => $recents, 'style' => 'compact'])
14         </div>
15     @endif
16
17     <div id="popular" class="mb-xl">
18         <h5>{{ trans('entities.books_popular') }}</h5>
19         @if(count($popular) > 0)
20             @include('partials.entity-list', ['entities' => $popular, 'style' => 'compact'])
21         @else
22             <div class="body text-muted">{{ trans('entities.books_popular_empty') }}</div>
23         @endif
24     </div>
25
26     <div id="new" class="mb-xl">
27         <h5>{{ trans('entities.books_new') }}</h5>
28         @if(count($popular) > 0)
29             @include('partials.entity-list', ['entities' => $new, 'style' => 'compact'])
30         @else
31             <div class="body text-muted">{{ trans('entities.books_new_empty') }}</div>
32         @endif
33     </div>
34 @stop
35
36 @section('right')
37
38     <div class="actions mb-xl">
39         <h5>{{ trans('common.actions') }}</h5>
40         <div class="icon-list text-primary">
41             @if($currentUser->can('book-create-all'))
42                 <a href="{{ baseUrl("/create-book") }}" class="icon-list-item">
43                     <span>@icon('add')</span>
44                     <span>{{ trans('entities.books_create') }}</span>
45                 </a>
46             @endif
47
48             @include('partials.view-toggle', ['view' => $view, 'type' => 'book'])
49         </div>
50     </div>
51
52 @stop