Internal optimisations and additional flags for Photo/Video

This commit is contained in:
Deon George
2020-01-05 00:28:00 +11:00
parent 93364ab53a
commit 1ffc2d994e
19 changed files with 402 additions and 279 deletions

View File

@@ -21,12 +21,13 @@
<form action="{{ $return }}" method="POST">
{{ csrf_field() }}
<input type="hidden" name="type" value="{{ $type }}">
@include('catalog.widgets.duplicates')
<div class="pb-2"><button class="btn btn-sm btn-danger">Confirm Delete</button></div>
<input type="hidden" name="pagenext" value="{{ $catalog->hasMorePages() ? $catalog->currentPage()+1 : NULL }}">
<input type="hidden" name="page" value="{{ $catalog->hasMorePages() ? $catalog->currentPage()+1 : NULL }}">
</form>
@else
NONE!

View File

@@ -21,10 +21,13 @@
<form action="{{ $return }}" method="POST">
{{ csrf_field() }}
<input type="hidden" name="type" value="{{ $type }}">
@include('catalog.widgets.duplicates')
<div class="pb-2"><button class="btn btn-sm btn-primary">Update</button></div>
<input type="hidden" name="page" value="{{ $catalog->currentPage() }}">
</form>
@else
NONE!

View File

@@ -6,7 +6,15 @@
</tr>
</thead>
@php
// Remember what we have rendered
$rendered = collect();
@endphp
@foreach ($catalog as $o)
@if($rendered->search($o->id)) @continue @endif
@php($rendered->push($o->id))
<tbody>
<tr>
<td>
@@ -14,7 +22,7 @@
@include($o->type.'.widgets.thumbnail',['o'=>$o])
</td>
@if (! ($d=$o->duplicates()->get())->count())
@if (! ($d=$o->myduplicates()->get())->count())
<td>
No other duplicates found?
</td>
@@ -22,6 +30,8 @@
@else
@foreach($d as $item)
@if($rendered->search($item->id)) @continue @endif
@php($rendered->push($item->id))
<td>
<input type="hidden" name="items[]" value="{{ $item->id }}">
@include($item->type.'.widgets.thumbnail',['o'=>$item])