Build new versioned files
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Tyler
2020-12-27 04:43:58 -05:00
parent 8a20f552da
commit e9ea25ad38
7 changed files with 102 additions and 56314 deletions

9
resources/js/app.js vendored
View File

@ -121,7 +121,7 @@ $(document).ready(function(e) {
e.preventDefault();
var $this = $(this),
$row = $this.closest('tr');
$row = $this.closest('tr, .action-container');
bootbox.confirm('Are you sure?', function(result) {
if (!result) {
@ -130,8 +130,11 @@ $(document).ready(function(e) {
axios.delete($row.data('url')).then(function(res) {
if (res.data.success) {
$row.remove();
if ($row.hasClass('action-container')) {
window.location = '/';
} else {
$row.remove();
}
}
});
})

View File

@ -1,7 +1,14 @@
@extends('layouts.main')
@section('content')
<h3>{{ $book->name }}</h3>
<h3>
{{ $book->name }}
<div class="action-container float-right" data-url="{{ route('books.show', $book->id) }}">
<button class="remove-item btn btn-danger">
Remove
</button>
</div>
</h3>
<h5>By: {{ $book->authors->pluck('name')->join(', ') }}</h5>
<br />
@if ($thumbnail = $book->attachment('thumbnail'))
@ -22,4 +29,5 @@
{{ $book->description }}
</p>
@endif
@endsection