2015-07-28 15:57:13 -04:00
|
|
|
@extends('base')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
<div class="row faded-small">
|
2015-07-30 17:27:35 -04:00
|
|
|
<div class="col-md-6 faded">
|
|
|
|
<div class="breadcrumbs padded-horizontal">
|
|
|
|
<a href="{{$book->getUrl()}}"><i class="zmdi zmdi-book"></i>{{ $book->name }}</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-07-28 15:57:13 -04:00
|
|
|
<div class="col-md-6 faded">
|
|
|
|
<div class="action-buttons">
|
2015-07-30 17:27:35 -04:00
|
|
|
<a href="{{$chapter->getUrl() . '/create-page'}}" class="text-pos"><i class="zmdi zmdi-plus"></i>New Page</a>
|
|
|
|
<a href="{{$chapter->getUrl() . '/edit'}}" class="text-primary"><i class="zmdi zmdi-edit"></i>Edit</a>
|
|
|
|
<a href="{{$chapter->getUrl() . '/delete'}}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a>
|
2015-07-28 15:57:13 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="page-content">
|
|
|
|
<h1>{{ $chapter->name }}</h1>
|
|
|
|
<p class="text-muted">{{ $chapter->description }}</p>
|
2015-07-30 17:27:35 -04:00
|
|
|
|
2015-07-28 15:57:13 -04:00
|
|
|
@if(count($chapter->pages) > 0)
|
|
|
|
<div class="page-list">
|
2015-07-30 17:27:35 -04:00
|
|
|
<hr>
|
2015-07-28 15:57:13 -04:00
|
|
|
@foreach($chapter->pages as $page)
|
|
|
|
<div >
|
|
|
|
<h3>
|
|
|
|
<a href="{{ $page->getUrl() }}">
|
2015-07-30 17:27:35 -04:00
|
|
|
<i class="zmdi zmdi-file-text"></i>{{ $page->name }}
|
2015-07-28 15:57:13 -04:00
|
|
|
</a>
|
|
|
|
</h3>
|
2015-07-30 17:27:35 -04:00
|
|
|
<p class="text-muted">
|
|
|
|
{{$page->getExcerpt()}}
|
|
|
|
</p>
|
2015-07-28 15:57:13 -04:00
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
2015-07-30 17:27:35 -04:00
|
|
|
@else
|
|
|
|
<p class="text-muted">No pages are in this chapter</p>
|
2015-07-28 15:57:13 -04:00
|
|
|
@endif
|
2015-08-08 16:28:50 -04:00
|
|
|
|
|
|
|
<p class="text-muted small">
|
|
|
|
Created {{$chapter->created_at->diffForHumans()}} @if($chapter->createdBy) by {{$chapter->createdBy->name}} @endif
|
|
|
|
<br>
|
|
|
|
Last Updated {{$chapter->updated_at->diffForHumans()}} @if($chapter->createdBy) by {{$chapter->updatedBy->name}} @endif
|
|
|
|
</p>
|
2015-07-28 15:57:13 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
@stop
|