]> BookStack Code Mirror - bookstack/blobdiff - resources/views/shelves/show.blade.php
Merge branch 'create-content-meta-tags' of https://github.com/james-geiger/BookStack...
[bookstack] / resources / views / shelves / show.blade.php
index 01e9e6629a55f4f66ccd8b9aae3b9ab7c085d9da..1205e8320f9e9618c732393edca32f119a397af4 100644 (file)
     </div>
 
     <main class="card content-wrap">
-        <h1 class="break-text">{{$shelf->name}}</h1>
+
+        <div class="flex-container-row wrap v-center">
+            <h1 class="flex fit-content break-text">{{ $shelf->name }}</h1>
+            <div class="flex"></div>
+            <div class="flex fit-content text-m-right my-m ml-m">
+                @include('partials.sort', ['options' => [
+                    'default' => trans('common.sort_default'),
+                    'name' => trans('common.sort_name'),
+                    'created_at' => trans('common.sort_created_at'),
+                    'updated_at' => trans('common.sort_updated_at'),
+                ], '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->visibleBooks) > 0)
+            @if(count($sortedVisibleShelfBooks) > 0)
                 @if($view === 'list')
                     <div class="entity-list">
-                        @foreach($shelf->visibleBooks as $book)
+                        @foreach($sortedVisibleShelfBooks 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])
+                        @foreach($sortedVisibleShelfBooks as $book)
+                            @include('partials.entity-grid-item', ['entity' => $book])
                         @endforeach
                     </div>
                 @endif
                 </a>
             @endif
 
+            @if(signedInUser())
+                <hr class="primary-background">
+                @include('partials.entity-favourite-action', ['entity' => $shelf])
+            @endif
+
         </div>
     </div>
 @stop