@extends('base') @section('content')
@if(userCan('page-create', $book)) {{ trans('entities.pages_new') }} @endif @if(userCan('chapter-create', $book)) {{ trans('entities.chapters_new') }} @endif @if(userCan('book-update', $book)) {{ trans('entities.edit') }} @endif @if(userCan('book-update', $book) || userCan('restrictions-manage', $book) || userCan('book-delete', $book)) @endif

{{$book->name}}

{{$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') }}

{{ trans('entities.books_empty_create_page') }}   -{{ trans('entities.books_empty_or') }}-    {{ trans('entities.books_empty_add_chapter') }}


@endif @include('partials.entity-meta', ['entity' => $book])

{{ trans('entities.search_results') }} {{ trans('entities.search_clear') }}

@include('partials/loading-icon')
@if($book->restricted)

@if(userCan('restrictions-manage', $book)) {{ trans('entities.books_permissions_active') }} @else {{ trans('entities.books_permissions_active') }} @endif

@endif

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

@include('partials/activity-list', ['activity' => Activity::entityActivity($book, 20, 0)])
@stop