2019-11-23 01:51:30 +00:00
|
|
|
@extends('adminlte::layouts.app')
|
|
|
|
|
|
|
|
@section('htmlheader_title')
|
|
|
|
Deletes
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('contentheader_title')
|
2019-12-15 00:30:29 +00:00
|
|
|
Review Pending Delete Items
|
2019-11-23 01:51:30 +00:00
|
|
|
@endsection
|
|
|
|
@section('contentheader_description')
|
2019-12-15 00:30:29 +00:00
|
|
|
{{ $catalog->count() }} to review
|
2019-11-23 01:51:30 +00:00
|
|
|
@endsection
|
|
|
|
@section('page_title')
|
|
|
|
Deletes
|
|
|
|
@endsection
|
2018-01-11 12:59:53 +00:00
|
|
|
|
2019-12-15 00:30:29 +00:00
|
|
|
@section('main-content')
|
|
|
|
<div class="col-12">
|
|
|
|
@if ($catalog->count())
|
2024-09-30 12:56:08 +00:00
|
|
|
<span class="pagination justify-content-center">
|
|
|
|
{{ $catalog->links() }}
|
|
|
|
</span>
|
2019-11-23 01:51:30 +00:00
|
|
|
|
2019-12-15 00:30:29 +00:00
|
|
|
<form action="{{ $return }}" method="POST">
|
2024-08-31 12:23:07 +00:00
|
|
|
@csrf
|
2024-09-30 12:56:08 +00:00
|
|
|
|
2020-01-04 13:28:00 +00:00
|
|
|
<input type="hidden" name="type" value="{{ $type }}">
|
2024-10-04 23:23:14 +00:00
|
|
|
<input type="hidden" name="list" value="{{ request()->get('list') }}">
|
2018-01-11 12:59:53 +00:00
|
|
|
|
2024-09-30 12:56:08 +00:00
|
|
|
@include('catalog.widgets.list')
|
2018-01-11 12:59:53 +00:00
|
|
|
|
2024-10-04 23:23:14 +00:00
|
|
|
<div class="pb-2">
|
|
|
|
<button class="btn btn-sm btn-outline-danger" name="page" value="{{ $catalog->hasMorePages() ? $catalog->currentPage() : NULL }}">Confirm Delete <small>[Same]</small></button>
|
|
|
|
<button class="btn btn-sm btn-danger" name="page" value="{{ $catalog->hasMorePages() ? $catalog->currentPage()+1 : NULL }}">Confirm Delete <small>[Advance]</small></button>
|
|
|
|
<button class="btn btn-sm btn-outline-danger" name="page" value="{{ $catalog->hasMorePages() ? 1 : NULL }}">Confirm Delete <small>[1st]</small></button>
|
|
|
|
</div>
|
2019-12-15 00:30:29 +00:00
|
|
|
</form>
|
|
|
|
@else
|
|
|
|
NONE!
|
|
|
|
@endif
|
2018-01-11 12:59:53 +00:00
|
|
|
</div>
|
2024-10-04 11:45:50 +00:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('page-scripts')
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('span.swap').on('click',function() {
|
|
|
|
var that = $(this);
|
|
|
|
var tr = that.closest('tr');
|
|
|
|
|
2024-10-04 12:21:59 +00:00
|
|
|
try {
|
|
|
|
['duplicate','remove'].forEach(function(item) {
|
|
|
|
var items = tr.find('input[name^="'+item+'\["]');
|
2024-10-04 11:45:50 +00:00
|
|
|
|
2024-10-04 12:21:59 +00:00
|
|
|
if (items.length !== 2) {
|
|
|
|
alert('cannot swap');
|
|
|
|
throw new Error('CANNOT SWAP');
|
|
|
|
}
|
2024-10-04 11:45:50 +00:00
|
|
|
|
2024-10-04 12:21:59 +00:00
|
|
|
var rotate = items[0].checked;
|
|
|
|
$(items[0]).prop('checked',items[1].checked);
|
|
|
|
$(items[1]).prop('checked',rotate);
|
2024-10-04 11:45:50 +00:00
|
|
|
|
2024-10-04 12:21:59 +00:00
|
|
|
that.removeData();
|
|
|
|
});
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
// NOOP
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$('span.scroll').on('click',function() {
|
|
|
|
var next = $(this).closest('div.card').closest('tr').next();
|
|
|
|
|
|
|
|
if (next.length)
|
|
|
|
$('html,body').animate({scrollTop: next.offset().top},'fast');
|
2024-10-04 11:45:50 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@append
|