@extends('base') @section('content')
@if($currentUser->can('page-create')) New Page @endif @if($currentUser->can('chapter-create')) New Chapter @endif @if($currentUser->can('book-update')) Edit Sort @endif @if($currentUser->can('book-delete')) Delete @endif

{{$book->name}}

{{$book->description}}


@if(count($book->children()) > 0) @foreach($book->children() as $childElement)

{{ $childElement->name }}

{{$childElement->getExcerpt()}}

@if($childElement->isA('chapter') && count($childElement->pages) > 0)

{{ count($childElement->pages) }} Pages

@foreach($childElement->pages as $page)

{{$page->name}}

@endforeach
@endif

@endforeach @else

No pages or chapters have been created for this book.

Create a new page   -or-    Add a chapter


@endif

Created {{$book->created_at->diffForHumans()}} @if($book->createdBy) by {{$book->createdBy->name}} @endif
Last Updated {{$book->updated_at->diffForHumans()}} @if($book->createdBy) by {{$book->updatedBy->name}} @endif

Search Results Clear Search

{{--

Search This Book

--}}

Recent Activity

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