Fixed pagination on change of display type.

This commit is contained in:
Nilesh Deepak 2017-07-06 10:05:11 +05:30
parent 16a09e8ff6
commit c5f11e4516

View File

@ -22,16 +22,19 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-12 col-md-9"> <div class="col-xs-12 col-sm-12 col-md-9">
<h1>{{ trans('entities.books') }}</h1> <h1>{{ trans('entities.books') }}</h1>
{!! $books->render() !!}
@if(count($books) > 0) @if(count($books) > 0)
@if($books_display=='grid') @if($books_display=='grid')
@foreach($books as $book) @foreach($books as $book)
@include('books/grid-item', ['book' => $book]) @include('books/grid-item', ['book' => $book])
@endforeach @endforeach
<div class="col-xs-12">
{!! $books->render() !!}
</div>
@else @else
@foreach($books as $book) @foreach($books as $book)
@include('books/list-item', ['book' => $book]) @include('books/list-item', ['book' => $book])
@endforeach @endforeach
{!! $books->render() !!}
@endif @endif
@else @else
<p class="text-muted">{{ trans('entities.books_empty') }}</p> <p class="text-muted">{{ trans('entities.books_empty') }}</p>
@ -58,7 +61,6 @@
@endif @endif
</div> </div>
</div> </div>
{!! $books->render() !!}
</div> </div>
</div> </div>