Added submit page navigation, and preserve list if used

This commit is contained in:
Deon George 2024-10-05 09:23:14 +10:00
parent f6d2a132a4
commit 9087c5189f
3 changed files with 10 additions and 6 deletions

View File

@ -38,7 +38,7 @@ trait Multimedia
return redirect()
->action(
[$this->controller($request->input('type')),'deletes'],
['page'=>$request->input('page')]
array_filter(['page'=>$request->input('page'),'list'=>$request->input('list')])
);
}
@ -50,7 +50,7 @@ trait Multimedia
return redirect()
->action(
[$this->controller($request->input('type')),'duplicates'],
['page'=>$request->input('page')]
array_filter(['page'=>$request->input('page'),'list'=>$request->input('list')])
);
}

View File

@ -24,12 +24,16 @@
<form action="{{ $return }}" method="POST">
@csrf
<input type="hidden" name="page" value="{{ $catalog->hasMorePages() ? $catalog->currentPage() : NULL }}">
<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-danger">Confirm Delete</button></div>
<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>
</form>
@else
NONE!

View File

@ -24,12 +24,12 @@
<form action="{{ $return }}" method="POST">
@csrf
<input type="hidden" name="page" value="{{ $catalog->hasMorePages() ? $catalog->currentPage()+1 : NULL }}">
<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-primary">Update</button></div>
<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!