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

@@ -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])