X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/582158f70e6c63980cce17d408a0cc435a0d985f..refs/pull/3406/head:/resources/views/books/show.blade.php diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php index 9f021b2b0..5263bc810 100644 --- a/resources/views/books/show.blade.php +++ b/resources/views/books/show.blade.php @@ -1,144 +1,169 @@ -@extends('sidebar-layout') +@extends('layouts.tri') -@section('toolbar') -
- @include('books._breadcrumbs', ['book' => $book]) +@section('container-attrs') + component="entity-search" + option:entity-search:entity-id="{{ $book->id }}" + option:entity-search:entity-type="book" +@stop + +@push('social-meta') + + @if($book->cover) + + @endif +@endpush + +@section('body') + +
+ @include('entities.breadcrumbs', ['crumbs' => [ + $book, + ]])
-
-
- -
@icon('export'){{ trans('entities.export') }}
- -
- @if(userCan('page-create', $book)) - @icon('add'){{ trans('entities.pages_new') }} - @endif - @if(userCan('chapter-create', $book)) - @icon('add'){{ trans('entities.chapters_new') }} - @endif - @if(userCan('book-update', $book) || userCan('restrictions-manage', $book) || userCan('book-delete', $book)) - +
@endif
-
-@stop -@section('sidebar') + @include('entities.search-results') + -
-
- -
-
+@stop - @if($book->restricted) -
-

@icon('permission') {{ trans('entities.permissions') }}

-
-

+@section('right') +

+
{{ trans('common.details') }}
+ - @endif - -
-

@icon('info') {{ trans('common.details') }}

-
- @include('partials.entity-meta', ['entity' => $book]) +
+ @endif
- @if($book->tags->count() > 0) -
-

@icon('tag') {{ trans('entities.book_tags') }}

-
- @include('components.tag-list', ['entity' => $book]) -
-
- @endif +
+
{{ trans('common.actions') }}
+
- @if(count($activity) > 0) -
-

@icon('time') {{ trans('entities.recent_activity') }}

- @include('partials/activity-list', ['activity' => $activity]) + @if(userCan('page-create', $book)) + + @icon('add') + {{ trans('entities.pages_new') }} + + @endif + @if(userCan('chapter-create', $book)) + + @icon('add') + {{ trans('entities.chapters_new') }} + + @endif + +
+ + @if(userCan('book-update', $book)) + + @icon('edit') + {{ trans('common.edit') }} + + + @icon('sort') + {{ trans('common.sort') }} + + @endif + @if(userCan('book-create-all')) + + @icon('copy') + {{ trans('common.copy') }} + + @endif + @if(userCan('restrictions-manage', $book)) + + @icon('lock') + {{ trans('entities.permissions') }} + + @endif + @if(userCan('book-delete', $book)) + + @icon('delete') + {{ trans('common.delete') }} + + @endif + +
+ + @if(signedInUser()) + @include('entities.favourite-action', ['entity' => $book]) + @endif + @if(userCan('content-export')) + @include('entities.export-menu', ['entity' => $book]) + @endif
- @endif -@stop +
-@section('container-attrs') - id="entity-dashboard" - entity-id="{{ $book->id }}" - entity-type="book" @stop -@section('body') +@section('left') -
-

{{$book->name}}

-
-

{!! nl2br(e($book->description)) !!}

- @if(count($bookChildren) > 0) -
-
- @foreach($bookChildren as $childElement) - @if($childElement->isA('chapter')) - @include('chapters/list-item', ['chapter' => $childElement]) - @else - @include('pages/list-item', ['page' => $childElement]) - @endif -
- @endforeach -
- @else -
-

{{ trans('entities.books_empty_contents') }}

- @if(userCan('page-create', $book)) - @icon('page'){{ trans('entities.books_empty_create_page') }} - @endif - @if(userCan('page-create', $book) && userCan('chapter-create', $book)) -   -{{ trans('entities.books_empty_or') }}-    - @endif - @if(userCan('chapter-create', $book)) - @icon('chapter'){{ trans('entities.books_empty_add_chapter') }} - @endif -
- @endif + @include('entities.search-form', ['label' => trans('entities.books_search_this')]) + @if($book->tags->count() > 0) +
+ @include('entities.tag-list', ['entity' => $book])
-
-

{{ trans('entities.search_results') }} @icon('close'){{ trans('entities.search_clear') }}

-
- @include('partials/loading-icon') -
-
+ @endif + + @if(count($bookParentShelves) > 0) +
+
{{ trans('entities.shelves_long') }}
+ @include('entities.list', ['entities' => $bookParentShelves, 'style' => 'compact'])
-
+ @endif + @if(count($activity) > 0) +
+
{{ trans('entities.recent_activity') }}
+ @include('common.activity-list', ['activity' => $activity]) +
+ @endif @stop +