-
+@section('sidebar')
+ @if($recents)
+
+
{{ trans('entities.recently_viewed') }}
+ @include('partials/entity-list', ['entities' => $recents, 'style' => 'compact'])
+ @endif
+
+
+
{{ trans('entities.books_popular') }}
+ @if(count($popular) > 0)
+ @include('partials/entity-list', ['entities' => $popular, 'style' => 'compact'])
+ @else
+
{{ trans('entities.books_popular_empty') }}
+ @endif
+
+
{{ trans('entities.books_new') }}
+ @if(count($popular) > 0)
+ @include('partials/entity-list', ['entities' => $new, 'style' => 'compact'])
+ @else
+
{{ trans('entities.books_new_empty') }}
+ @endif
+
+@stop
-
-
-
-
{{ trans('entities.books') }}
- @if(count($books) > 0)
- @foreach($books as $book)
- @include('books/list-item', ['book' => $book])
-
+@section('body')
+ @if($booksViewType === 'list')
+
+ @else
+
+ @endif
+
{{ trans('entities.books') }}
+ @if(count($books) > 0)
+ @if($booksViewType === 'list')
+ @foreach($books as $book)
+ @include('books/list-item', ['book' => $book])
+
+ @endforeach
+ {!! $books->render() !!}
+ @else
+
+ @foreach($books as $key => $book)
+ @include('books/grid-item', ['book' => $book])
@endforeach
+
-
-
- @if($recents)
-
-
{{ trans('entities.recently_viewed') }}
- @include('partials/entity-list', ['entities' => $recents])
- @endif
-
-
-
-
{{ trans('entities.books_popular') }}
- @if(count($popular) > 0)
- @include('partials/entity-list', ['entities' => $popular])
- @else
-
{{ trans('entities.books_popular_empty') }}
- @endif
-
-
+
+ @endif
+ @else
+
{{ trans('entities.books_empty') }}
+ @if(userCan('books-create-all'))
+
{{ trans('entities.create_one_now') }}
+ @endif
+ @endif
-
@stop
\ No newline at end of file