5 <div class="faded-small">
6 <div class="container">
8 <div class="col-md-12">
9 <div class="action-buttons faded">
10 @if($currentUser->can('page-create'))
11 <a href="{{$book->getUrl() . '/page/create'}}" class="text-pos"><i class="zmdi zmdi-plus"></i> New Page</a>
13 @if($currentUser->can('chapter-create'))
14 <a href="{{$book->getUrl() . '/chapter/create'}}" class="text-pos"><i class="zmdi zmdi-plus"></i> New Chapter</a>
16 @if($currentUser->can('book-update'))
17 <a href="{{$book->getEditUrl()}}" class="text-primary"><i class="zmdi zmdi-edit"></i>Edit</a>
18 <a href="{{ $book->getUrl() }}/sort" class="text-primary"><i class="zmdi zmdi-sort"></i>Sort</a>
20 @if($currentUser->can('book-delete'))
21 <a href="{{ $book->getUrl() }}/delete" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a>
30 <div class="container">
32 <div class="col-md-7">
34 <h1>{{$book->name}}</h1>
35 <p class="text-muted">{{$book->description}}</p>
37 <div class="page-list">
39 @if(count($book->children()) > 0)
40 @foreach($book->children() as $childElement)
41 <div class="book-child">
43 <a href="{{ $childElement->getUrl() }}" class="{{ $childElement->getName() }}">
44 <i class="zmdi {{ $childElement->isA('chapter') ? 'zmdi-collection-bookmark chapter-toggle':'zmdi-file-text'}}"></i>{{ $childElement->name }}
47 <p class="text-muted">
48 {{$childElement->getExcerpt()}}
51 @if($childElement->isA('chapter') && count($childElement->pages) > 0)
52 <div class="inset-list">
53 @foreach($childElement->pages as $page)
54 <h4><a href="{{$page->getUrl()}}"><i class="zmdi zmdi-file-text"></i>{{$page->name}}</a></h4>
62 <p class="text-muted">No pages or chapters have been created for this book.</p>
64 <a href="{{$book->getUrl() . '/page/create'}}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
65 <em class="text-muted">-or-</em>
66 <a href="{{$book->getUrl() . '/chapter/create'}}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>Add a chapter</a>
72 <p class="text-muted small">
73 Created {{$book->created_at->diffForHumans()}} @if($book->createdBy) by {{$book->createdBy->name}} @endif
75 Last Updated {{$book->updated_at->diffForHumans()}} @if($book->createdBy) by {{$book->updatedBy->name}} @endif
81 <div class="col-md-4 col-md-offset-1">
82 <div class="margin-top large"><br></div>
83 <h3>Recent Activity</h3>
84 @include('partials/activity-list', ['activity' => Activity::entityActivity($book, 20, 0)])
94 $('.chapter-toggle').click(function(e) {
96 $(this).closest('.book-child').find('.inset-list').slideToggle(180);