76 lines
1.9 KiB
PHP
76 lines
1.9 KiB
PHP
@extends('adminlte::layouts.app')
|
|
|
|
@section('htmlheader_title')
|
|
Duplicates
|
|
@endsection
|
|
|
|
@section('contentheader_title')
|
|
Review Duplicate Items
|
|
@endsection
|
|
@section('contentheader_description')
|
|
{{ $catalog->count() }} to review
|
|
@endsection
|
|
@section('page_title')
|
|
Duplicates
|
|
@endsection
|
|
|
|
@section('main-content')
|
|
<div class="col-12">
|
|
@if ($catalog->count())
|
|
<span class="pagination justify-content-center">
|
|
{{ $catalog->links() }}
|
|
</span>
|
|
|
|
<form action="{{ $return }}" method="POST">
|
|
@csrf
|
|
|
|
<input type="hidden" name="type" value="{{ $type }}">
|
|
<input type="hidden" name="list" value="{{ request()->get('list') }}">
|
|
|
|
@include('catalog.widgets.list')
|
|
|
|
<div class="pb-2"><button class="btn btn-sm btn-outline-primary" name="page" value="{{ $catalog->hasMorePages() ? $catalog->currentPage() : NULL }}">Update <small>[Same]</small></button> <button class="btn btn-sm btn-primary" name="page" value="{{ $catalog->hasMorePages() ? $catalog->currentPage()+1 : NULL }}">Update <small>[Advance]</small></button></div>
|
|
</form>
|
|
@else
|
|
NONE!
|
|
@endif
|
|
</div>
|
|
@endsection
|
|
|
|
@section('page-scripts')
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$('span.swap').on('click',function() {
|
|
var that = $(this);
|
|
var tr = that.closest('tr');
|
|
|
|
try {
|
|
['duplicate','remove'].forEach(function(item) {
|
|
var items = tr.find('input[name^="'+item+'\["]');
|
|
|
|
if (items.length !== 2) {
|
|
alert('cannot swap');
|
|
throw new Error('CANNOT SWAP');
|
|
}
|
|
|
|
var rotate = items[0].checked;
|
|
$(items[0]).prop('checked',items[1].checked);
|
|
$(items[1]).prop('checked',rotate);
|
|
|
|
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');
|
|
});
|
|
});
|
|
</script>
|
|
@append |