1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Allow toggling between grid and list view in shelf view (shelves.show)

This commit is contained in:
jakob
2019-10-30 11:23:42 +01:00
parent 189a598d56
commit 6cd26e23a8
2 changed files with 17 additions and 5 deletions

View File

@@ -13,11 +13,19 @@
<div class="book-content">
<p class="text-muted">{!! nl2br(e($shelf->description)) !!}</p>
@if(count($shelf->visibleBooks) > 0)
<div class="entity-list">
@foreach($shelf->visibleBooks as $book)
@include('books.list-item', ['book' => $book])
@endforeach
</div>
@if($view === 'list')
<div class="entity-list">
@foreach($shelf->visibleBooks as $book)
@include('books.list-item', ['book' => $book])
@endforeach
</div>
@else
<div class="grid third">
@foreach($shelf->visibleBooks as $key => $book)
@include('books.grid-item', ['book' => $book])
@endforeach
</div>
@endif
@else
<div class="mt-xl">
<hr>
@@ -87,6 +95,8 @@
</a>
@endif
@include('partials.view-toggle', ['view' => $view, 'type' => 'book'])
<hr class="primary-background">
@if(userCan('bookshelf-update', $shelf))