@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}}


@foreach($book->children() as $childElement)

@if(is_a($childElement, 'Oxbow\Chapter')) @else @endif {{ $childElement->name }}

{{$childElement->getExcerpt()}}

@if(is_a($childElement, 'Oxbow\Chapter') && count($childElement->pages) > 0)
@foreach($childElement->pages as $page)

{{$page->name}}

@endforeach
@endif

@endforeach

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


Recent Activity

@include('partials/activity-list', ['activity' => $book->recentActivity()])
@stop