]> BookStack Code Mirror - bookstack/blob - resources/views/books/list.blade.php
Updated books listing to three column layout design
[bookstack] / resources / views / books / list.blade.php
1
2 <div class="content-wrap card {{ $booksViewType === 'list' ? 'thin' : '' }}">
3     <h1 class="list-heading">{{ trans('entities.books') }}</h1>
4     @if(count($books) > 0)
5         @if($booksViewType === 'list')
6             <div class="entity-list">
7                 @foreach($books as $book)
8                     <a href="{{ $book->getUrl() }}" class="book entity-list-item" data-entity-type="book" data-entity-id="{{$book->id}}">
9                         <div class="entity-list-item-image bg-book" style="background-image: url('{{ $book->getBookCover() }}')">
10                         </div>
11                         <div class="content">
12                             <h4 class="entity-list-item-name break-text">{{ $book->name }}</h4>
13                             <div class="entity-item-snippet">
14                                 <p class="text-muted break-text">{{ $book->getExcerpt() }}</p>
15                             </div>
16                         </div>
17                     </a>
18                 @endforeach
19                 {!! $books->render() !!}
20             </div>
21         @else
22              <div class="grid third">
23                 @foreach($books as $key => $book)
24                     @include('books.grid-item', ['book' => $book])
25                 @endforeach
26              </div>
27             <div>
28                 {!! $books->render() !!}
29             </div>
30         @endif
31     @else
32         <p class="text-muted">{{ trans('entities.books_empty') }}</p>
33         @if(userCan('books-create-all'))
34             <a href="{{ baseUrl("/create-book") }}" class="text-pos">@icon('edit'){{ trans('entities.create_now') }}</a>
35         @endif
36     @endif
37 </div>