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 text-button"><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 text-button"><i class="zmdi zmdi-plus"></i> New Chapter</a>
16 @if($currentUser->can('book-update'))
17 <a href="{{$book->getEditUrl()}}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>Edit</a>
18 <a href="{{ $book->getUrl() }}/sort" class="text-primary text-button"><i class="zmdi zmdi-sort"></i>Sort</a>
20 @if($currentUser->can('book-delete'))
21 <a href="{{ $book->getUrl() }}/delete" class="text-neg text-button"><i class="zmdi zmdi-delete"></i>Delete</a>
30 <div class="container" id="book-dashboard">
32 <div class="col-md-7">
34 <h1>{{$book->name}}</h1>
35 <div class="book-content anim fadeIn" v-if="!searching">
36 <p class="text-muted">{{$book->description}}</p>
38 <div class="page-list">
40 @if(count($book->children()) > 0)
41 @foreach($book->children() as $childElement)
42 @if($childElement->isA('chapter'))
43 @include('chapters/list-item', ['chapter' => $childElement])
45 @include('pages/list-item', ['page' => $childElement])
50 <p class="text-muted">No pages or chapters have been created for this book.</p>
52 <a href="{{$book->getUrl() . '/page/create'}}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
53 <em class="text-muted">-or-</em>
54 <a href="{{$book->getUrl() . '/chapter/create'}}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>Add a chapter</a>
58 <p class="text-muted small">
59 Created {{$book->created_at->diffForHumans()}} @if($book->createdBy) by {{$book->createdBy->name}} @endif
61 Last Updated {{$book->updated_at->diffForHumans()}} @if($book->createdBy) by {{$book->updatedBy->name}} @endif
65 <div class="search-results" v-if="searching">
66 <h3 class="text-muted">Search Results <a v-if="searching" v-on:click="clearSearch" class="text-small"><i class="zmdi zmdi-close"></i>Clear Search</a></h3>
67 <div v-if="!searchResults">
68 @include('partials/loading-icon')
70 <div v-html="searchResults"></div>
76 <div class="col-md-4 col-md-offset-1">
77 <div class="margin-top large"></div>
78 <div class="search-box">
79 <form v-on:submit="searchBook" v-on:input="checkSearchForm" v-el:form action="/search/book/{{ $book->id }}">
81 <input v-model="searchTerm" type="text" name="term" placeholder="Search This Book">
82 <button type="submit"><i class="zmdi zmdi-search"></i></button>
83 <button v-if="searching" v-on:click="clearSearch" type="button"><i class="zmdi zmdi-close"></i></button>
86 <div class="activity anim fadeIn">
87 <h3>Recent Activity</h3>
88 @include('partials/activity-list', ['activity' => Activity::entityActivity($book, 20, 0)])