1 @extends('sidebar-layout')
5 <div class="action-buttons text-left">
6 <form action="{{ baseUrl("/settings/users/{$currentUser->id}/switch-book-view") }}" method="POST" class="inline">
8 {!! method_field('PATCH') !!}
9 <input type="hidden" value="{{ $booksViewType === 'list'? 'grid' : 'list' }}" name="book_view_type">
10 @if ($booksViewType === 'list')
11 <button type="submit" class="text-pos text-button">@icon('grid'){{ trans('common.grid_view') }}</button>
13 <button type="submit" class="text-pos text-button">@icon('list'){{ trans('common.list_view') }}</button>
18 <div class="col-xs-6 faded">
19 <div class="action-buttons">
20 @if($currentUser->can('book-create-all'))
21 <a href="{{ baseUrl("/books/create") }}" class="text-pos text-button">@icon('add'){{ trans('entities.books_create') }}</a>
29 <div id="recents" class="card">
30 <h3>@icon('view') {{ trans('entities.recently_viewed') }}</h3>
31 @include('partials/entity-list', ['entities' => $recents, 'style' => 'compact'])
35 <div id="popular" class="card">
36 <h3>@icon('popular') {{ trans('entities.books_popular') }}</h3>
37 @if(count($popular) > 0)
38 @include('partials/entity-list', ['entities' => $popular, 'style' => 'compact'])
40 <div class="body text-muted">{{ trans('entities.books_popular_empty') }}</div>
44 <div id="new" class="card">
45 <h3>@icon('star-circle') {{ trans('entities.books_new') }}</h3>
46 @if(count($popular) > 0)
47 @include('partials/entity-list', ['entities' => $new, 'style' => 'compact'])
49 <div class="body text-muted">{{ trans('entities.books_new_empty') }}</div>
55 @if($booksViewType === 'list')
56 <div class="container small" ng-non-bindable>
58 <div class="container" ng-non-bindable>
60 <h1>{{ trans('entities.books') }}</h1>
61 @if(count($books) > 0)
62 @if($booksViewType === 'list')
63 @foreach($books as $book)
64 @include('books/list-item', ['book' => $book])
67 {!! $books->render() !!}
69 <div class="grid third">
70 @foreach($books as $key => $book)
71 @include('books/grid-item', ['book' => $book])
75 {!! $books->render() !!}
79 <p class="text-muted">{{ trans('entities.books_empty') }}</p>
80 @if(userCan('books-create-all'))
81 <a href="{{ baseUrl("/books/create") }}" class="text-pos">@icon('edit'){{ trans('entities.create_one_now') }}</a>