Expanded chapters interface and improved book/page deletion

This commit is contained in:
Dan Brown
2015-07-28 20:57:13 +01:00
parent b9df3c647a
commit fd1a0dceb2
19 changed files with 282 additions and 141 deletions

View File

@ -0,0 +1,23 @@
@extends('base')
@section('content')
<div class="page-content">
<h1>Delete Chapter</h1>
<p>This will delete the chapter with the name '{{$chapter->name}}', All pages will be removed
and added directly to the book.</p>
<p class="text-neg">Are you sure you want to delete this chapter?</p>
<form action="{{$chapter->getUrl()}}" method="POST">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="DELETE">
<button type="submit" class="button neg">Confirm</button>
<a href="{{$chapter->getUrl()}}" class="button">Cancel</a>
</form>
</div>
@stop
@section('bottom')
@include('pages/image-manager')
@stop

View File

@ -0,0 +1,13 @@
@extends('base')
@section('content')
<div class="page-content">
<h1>Edit Chapter</h1>
<form action="{{$chapter->getUrl()}}" method="POST">
<input type="hidden" name="_method" value="PUT">
@include('chapters/form', ['model' => $chapter])
</form>
</div>
@stop

View File

@ -0,0 +1,38 @@
@extends('base')
@section('content')
<div class="row faded-small">
<div class="col-md-6"></div>
<div class="col-md-6 faded">
<div class="action-buttons">
<a href="{{$chapter->getUrl() . '/edit'}}" ><i class="fa fa-pencil"></i>Edit</a>
<a href="{{$chapter->getUrl() . '/delete'}}"><i class="fa fa-trash"></i>Delete</a>
</div>
</div>
</div>
<div class="page-content">
<h1>{{ $chapter->name }}</h1>
<p class="text-muted">{{ $chapter->description }}</p>
@if(count($chapter->pages) > 0)
<h4 class="text-muted">Pages</h4>
<div class="page-list">
@foreach($chapter->pages as $page)
<div >
<h3>
<a href="{{ $page->getUrl() }}">
<i class="fa fa-file"></i>
{{ $page->name }}
</a>
</h3>
</div>
<hr>
@endforeach
</div>
@endif
</div>
@stop