2019-08-25 10:44:51 -04:00
|
|
|
<main class="content-wrap mt-m card">
|
2019-05-27 08:10:48 -04:00
|
|
|
<div class="grid half v-center no-row-gap">
|
2018-12-01 16:28:21 -05:00
|
|
|
<h1 class="list-heading">{{ trans('entities.books') }}</h1>
|
2019-05-27 08:10:48 -04:00
|
|
|
<div class="text-m-right my-m">
|
2022-10-30 11:16:06 -04:00
|
|
|
@include('common.sort', $listOptions->getSortControlData())
|
2018-12-01 16:28:21 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-09 23:35:18 -04:00
|
|
|
@if(count($books) > 0)
|
2018-12-07 13:33:32 -05:00
|
|
|
@if($view === 'list')
|
2018-12-01 11:29:57 -05:00
|
|
|
<div class="entity-list">
|
|
|
|
@foreach($books as $book)
|
2021-08-22 08:15:58 -04:00
|
|
|
@include('books.parts.list-item', ['book' => $book])
|
2018-12-01 11:29:57 -05:00
|
|
|
@endforeach
|
|
|
|
</div>
|
2018-05-09 23:35:18 -04:00
|
|
|
@else
|
2022-10-29 10:23:21 -04:00
|
|
|
<div class="grid third">
|
2018-05-09 23:35:18 -04:00
|
|
|
@foreach($books as $key => $book)
|
2021-08-22 08:15:58 -04:00
|
|
|
@include('entities.grid-item', ['entity' => $book])
|
2018-05-09 23:35:18 -04:00
|
|
|
@endforeach
|
2022-10-29 10:23:21 -04:00
|
|
|
</div>
|
2018-05-09 23:35:18 -04:00
|
|
|
@endif
|
2018-12-09 11:51:31 -05:00
|
|
|
<div>
|
|
|
|
{!! $books->render() !!}
|
|
|
|
</div>
|
2018-05-09 23:35:18 -04:00
|
|
|
@else
|
|
|
|
<p class="text-muted">{{ trans('entities.books_empty') }}</p>
|
|
|
|
@if(userCan('books-create-all'))
|
2019-08-04 09:26:39 -04:00
|
|
|
<a href="{{ url("/create-book") }}" class="text-pos">@icon('edit'){{ trans('entities.create_now') }}</a>
|
2018-05-09 23:35:18 -04:00
|
|
|
@endif
|
|
|
|
@endif
|
2019-08-25 10:44:51 -04:00
|
|
|
</main>
|