Updated photo viewing
This commit is contained in:
@@ -25,53 +25,47 @@
|
||||
<table class="table table-striped table-sm table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-50">Source</th>
|
||||
<th class="w-50">Remove</th>
|
||||
<th class="w-50">Source</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@php $c=0; @endphp
|
||||
@foreach ($catalog as $o)
|
||||
@php
|
||||
$d=$o->list_duplicates(TRUE); $src=[];
|
||||
@endphp
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
@if($d->where('duplicate',null)->count() > 1)
|
||||
More than 1 source?
|
||||
|
||||
@elseif($d->count())
|
||||
@php($src=$d->first())
|
||||
@include('photo.widgets.thumbnail',['o'=>$src])
|
||||
@endif
|
||||
</td>
|
||||
|
||||
@if ($d->count() == 1)
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
No other duplicates found?
|
||||
<input type="hidden" name="items[]" value="{{ $o->id }}">
|
||||
@include('photo.widgets.thumbnail',['o'=>$o])
|
||||
</td>
|
||||
@continue
|
||||
|
||||
@else
|
||||
@foreach($d as $item)
|
||||
@if($loop->first) @continue @endif
|
||||
@php($diff=collect($src)->diffAssoc($item))
|
||||
@if (! ($d=$o->duplicates()->with('software.model.make')->get())->count())
|
||||
<td>
|
||||
<input type="hidden" name="items[]" value="{{ $item->id }}">
|
||||
XX
|
||||
@include('photo.widgets.thumbnail',['o'=>$src])
|
||||
No other duplicates found?
|
||||
</td>
|
||||
@endforeach
|
||||
@endif
|
||||
</tr>
|
||||
</tbody>
|
||||
@continue
|
||||
|
||||
@else
|
||||
@foreach($d as $item)
|
||||
<td>
|
||||
<input type="hidden" name="items[]" value="{{ $item->id }}">
|
||||
@include('photo.widgets.thumbnail',['o'=>$item])
|
||||
</td>
|
||||
@endforeach
|
||||
@endif
|
||||
</tr>
|
||||
</tbody>
|
||||
@endforeach
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"><button class="btn btn-primary">Update</button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
{{--
|
||||
<input type="hidden" name="pagenext" value="{{ $catalog->hasMorePages() ? $catalog->currentPage()+1 : NULL }}">
|
||||
<button class="btn btn-primary">Update</button>
|
||||
--}}
|
||||
</form>
|
||||
@else
|
||||
NONE!
|
||||
|
Reference in New Issue
Block a user