2015-07-28 15:57:13 -04:00
|
|
|
@extends('base')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
2016-02-11 17:23:19 -05:00
|
|
|
<div class="faded-small toolbar" ng-non-bindable>
|
2015-08-31 06:43:28 -04:00
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-4 faded">
|
|
|
|
<div class="breadcrumbs">
|
2015-09-02 13:26:33 -04:00
|
|
|
<a href="{{$book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->name }}</a>
|
2015-08-31 06:43:28 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-8 faded">
|
|
|
|
<div class="action-buttons">
|
|
|
|
@if($currentUser->can('chapter-create'))
|
2015-09-02 13:26:33 -04:00
|
|
|
<a href="{{$chapter->getUrl() . '/create-page'}}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>New Page</a>
|
2015-08-31 06:43:28 -04:00
|
|
|
@endif
|
|
|
|
@if($currentUser->can('chapter-update'))
|
2015-09-02 13:26:33 -04:00
|
|
|
<a href="{{$chapter->getUrl() . '/edit'}}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>Edit</a>
|
2015-08-31 06:43:28 -04:00
|
|
|
@endif
|
|
|
|
@if($currentUser->can('chapter-delete'))
|
2015-09-02 13:26:33 -04:00
|
|
|
<a href="{{$chapter->getUrl() . '/delete'}}" class="text-neg text-button"><i class="zmdi zmdi-delete"></i>Delete</a>
|
2015-08-31 06:43:28 -04:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-07-28 15:57:13 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2015-12-30 16:38:20 -05:00
|
|
|
<div class="container" ng-non-bindable>
|
2015-08-31 06:43:28 -04:00
|
|
|
<div class="row">
|
2015-09-03 11:51:10 -04:00
|
|
|
<div class="col-md-8">
|
|
|
|
<h1>{{ $chapter->name }}</h1>
|
|
|
|
<p class="text-muted">{{ $chapter->description }}</p>
|
2015-08-31 06:43:28 -04:00
|
|
|
|
2015-09-03 11:51:10 -04:00
|
|
|
@if(count($chapter->pages) > 0)
|
|
|
|
<div class="page-list">
|
2015-08-31 12:59:45 -04:00
|
|
|
<hr>
|
2015-09-03 11:51:10 -04:00
|
|
|
@foreach($chapter->pages as $page)
|
2015-09-03 14:05:45 -04:00
|
|
|
@include('pages/list-item', ['page' => $page])
|
2015-09-03 11:51:10 -04:00
|
|
|
<hr>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
@else
|
|
|
|
<hr>
|
|
|
|
<p class="text-muted">No pages are currently in this chapter.</p>
|
|
|
|
<p>
|
|
|
|
<a href="{{$chapter->getUrl() . '/create-page'}}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
|
|
|
|
<em class="text-muted">-or-</em>
|
|
|
|
<a href="{{$book->getUrl() . '/sort'}}" class="text-book"><i class="zmdi zmdi-book"></i>Sort the current book</a>
|
2015-08-31 06:43:28 -04:00
|
|
|
</p>
|
2015-09-03 11:51:10 -04:00
|
|
|
<hr>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<p class="text-muted small">
|
|
|
|
Created {{$chapter->created_at->diffForHumans()}} @if($chapter->createdBy) by {{$chapter->createdBy->name}} @endif
|
|
|
|
<br>
|
2015-12-15 14:27:36 -05:00
|
|
|
Last Updated {{$chapter->updated_at->diffForHumans()}} @if($chapter->updatedBy) by {{$chapter->updatedBy->name}} @endif
|
2015-09-03 11:51:10 -04:00
|
|
|
</p>
|
2015-08-31 06:43:28 -04:00
|
|
|
</div>
|
2015-09-03 14:05:45 -04:00
|
|
|
<div class="col-md-3 col-md-offset-1">
|
2015-11-26 18:45:04 -05:00
|
|
|
@include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree])
|
2015-09-03 14:05:45 -04:00
|
|
|
</div>
|
2015-09-03 11:51:10 -04:00
|
|
|
</div>
|
2015-07-28 15:57:13 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2015-08-31 06:43:28 -04:00
|
|
|
|
|
|
|
|
2015-07-28 15:57:13 -04:00
|
|
|
@stop
|