photo/resources/views/catalog/widgets/list.blade.php

42 lines
992 B
PHP
Raw Normal View History

<table class="table table-light">
2019-12-15 00:30:29 +00:00
<thead>
<tr>
<th class="w-50">Remove</th>
<th class="w-50">Source</th>
</tr>
</thead>
<!-- Remember what we have rendered -->
@php($rendered = collect())
<tbody>
2019-12-15 00:30:29 +00:00
@foreach ($catalog as $o)
@continue($rendered->contains($o->id))
@php($rendered->push($o->id))
2019-12-15 00:30:29 +00:00
<tr>
<td>
<input type="hidden" name="items[]" value="{{ $o->id }}">
@include($o::config.'.widgets.thumbnail',['o'=>$o,'reference'=>$o->newInstance(),'css'=>'thumbnail'])
2019-12-15 00:30:29 +00:00
</td>
@if (! ($d=$o->myduplicates()->get())->count())
2019-12-15 00:30:29 +00:00
<td>
No other duplicates found?
</td>
@continue
@else
@foreach($d as $item)
@continue($rendered->contains($item->id))
@php($rendered->push($item->id))
2019-12-15 00:30:29 +00:00
<td>
<input type="hidden" name="items[]" value="{{ $item->id }}">
@include($item::config.'.widgets.thumbnail',['o'=>$item,'reference'=>$o,'css'=>'thumbnail'])
2019-12-15 00:30:29 +00:00
</td>
@endforeach
@endif
</tr>
@endforeach
</tbody>
2019-12-15 00:30:29 +00:00
</table>