]> BookStack Code Mirror - bookstack/blobdiff - resources/views/books/show.blade.php
Skip intermediate login page with single provider
[bookstack] / resources / views / books / show.blade.php
index def198bddac2450b34958534cd4572da01ee0ba5..5263bc8101007d6196a1f9bff34dc462d490e7e0 100644 (file)
@@ -1,4 +1,4 @@
-@extends('tri-layout')
+@extends('layouts.tri')
 
 @section('container-attrs')
     component="entity-search"
@@ -6,10 +6,17 @@
     option:entity-search:entity-type="book"
 @stop
 
+@push('social-meta')
+    <meta property="og:description" content="{{ Str::limit($book->description, 100, '...') }}">
+    @if($book->cover)
+        <meta property="og:image" content="{{ $book->getBookCover() }}">
+    @endif
+@endpush
+
 @section('body')
 
     <div class="mb-s">
-        @include('partials.breadcrumbs', ['crumbs' => [
+        @include('entities.breadcrumbs', ['crumbs' => [
             $book,
         ]])
     </div>
@@ -22,9 +29,9 @@
                 <div class="entity-list book-contents">
                     @foreach($bookChildren as $childElement)
                         @if($childElement->isA('chapter'))
-                            @include('chapters.list-item', ['chapter' => $childElement])
+                            @include('chapters.parts.list-item', ['chapter' => $childElement])
                         @else
-                            @include('pages.list-item', ['page' => $childElement])
+                            @include('pages.parts.list-item', ['page' => $childElement])
                         @endif
                     @endforeach
                 </div>
@@ -52,7 +59,7 @@
             @endif
         </div>
 
-        @include('partials.entity-search-results')
+        @include('entities.search-results')
     </main>
 
 @stop
@@ -61,7 +68,7 @@
     <div class="mb-xl">
         <h5>{{ trans('common.details') }}</h5>
         <div class="text-small text-muted blended-links">
-            @include('partials.entity-meta', ['entity' => $book])
+            @include('entities.meta', ['entity' => $book])
             @if($book->restricted)
                 <div class="active-restriction">
                     @if(userCan('restrictions-manage', $book))
                     <span>{{ trans('common.sort') }}</span>
                 </a>
             @endif
+            @if(userCan('book-create-all'))
+                <a href="{{ $book->getUrl('/copy') }}" class="icon-list-item">
+                    <span>@icon('copy')</span>
+                    <span>{{ trans('common.copy') }}</span>
+                </a>
+            @endif
             @if(userCan('restrictions-manage', $book))
                 <a href="{{ $book->getUrl('/permissions') }}" class="icon-list-item">
                     <span>@icon('lock')</span>
 
             <hr class="primary-background">
 
-            @include('partials.entity-export-menu', ['entity' => $book])
+            @if(signedInUser())
+                @include('entities.favourite-action', ['entity' => $book])
+            @endif
+            @if(userCan('content-export'))
+                @include('entities.export-menu', ['entity' => $book])
+            @endif
         </div>
     </div>
 
 
 @section('left')
 
-    @include('partials.entity-search-form', ['label' => trans('entities.books_search_this')])
+    @include('entities.search-form', ['label' => trans('entities.books_search_this')])
 
     @if($book->tags->count() > 0)
         <div class="mb-xl">
-            @include('components.tag-list', ['entity' => $book])
+            @include('entities.tag-list', ['entity' => $book])
         </div>
     @endif
 
     @if(count($bookParentShelves) > 0)
         <div class="actions mb-xl">
             <h5>{{ trans('entities.shelves_long') }}</h5>
-            @include('partials.entity-list', ['entities' => $bookParentShelves, 'style' => 'compact'])
+            @include('entities.list', ['entities' => $bookParentShelves, 'style' => 'compact'])
         </div>
     @endif
 
     @if(count($activity) > 0)
         <div class="mb-xl">
             <h5>{{ trans('entities.recent_activity') }}</h5>
-            @include('partials.activity-list', ['activity' => $activity])
+            @include('common.activity-list', ['activity' => $activity])
         </div>
     @endif
 @stop