mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-06 02:24:33 +08:00
Expanded chapters interface and improved book/page deletion
This commit is contained in:
23
resources/views/chapters/delete.blade.php
Normal file
23
resources/views/chapters/delete.blade.php
Normal 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
|
13
resources/views/chapters/edit.blade.php
Normal file
13
resources/views/chapters/edit.blade.php
Normal 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
|
38
resources/views/chapters/show.blade.php
Normal file
38
resources/views/chapters/show.blade.php
Normal 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
|
Reference in New Issue
Block a user