]> BookStack Code Mirror - bookstack/blobdiff - resources/views/shelves/show.blade.php
Improve sorting Shelf Books
[bookstack] / resources / views / shelves / show.blade.php
index 3f87ad25299ef44a53ecac59c315c21a8cb7f41c..a7a55a4270bddd0ca91f69a66845e2a6a5b88472 100644 (file)
                     'name' => trans('common.sort_name'),
                     'created_at' => trans('common.sort_created_at'),
                     'updated_at' => trans('common.sort_updated_at'),
-                ], 'order' => $order, 'sort' => $sort, 'type' => 'books'])
+                ], 'order' => $order, 'sort' => $sort, 'type' => 'shelf_books'])
             </div>
         </div>
 
         <div class="book-content">
             <p class="text-muted">{!! nl2br(e($shelf->description)) !!}</p>
-            @if(count($shelf->visibleBooksByCustomSorting($sort, $order)) > 0)
+            @if(count($sortedVisibleShelfBooks) > 0)
                 @if($view === 'list')
                     <div class="entity-list">
-                        @foreach($shelf->visibleBooksByCustomSorting($sort, $order) as $book)
+                        @foreach($sortedVisibleShelfBooks as $book)
                             @include('books.list-item', ['book' => $book])
                         @endforeach
                     </div>
                 @else
                     <div class="grid third">
-                        @foreach($shelf->visibleBooksByCustomSorting($sort, $order) as $key => $book)
+                        @foreach($sortedVisibleShelfBooks as $key => $book)
                             @include('partials.entity-grid-item', ['entity' => $book])
                         @endforeach
                     </div>