diff --git a/app/Http/Controllers/PhotoController.php b/app/Http/Controllers/PhotoController.php index 7028742..c82e039 100644 --- a/app/Http/Controllers/PhotoController.php +++ b/app/Http/Controllers/PhotoController.php @@ -34,7 +34,10 @@ class PhotoController extends Controller public function deletes($id=NULL) { - return view('catalog.deletereview',['return'=>url('/p/deletes'),'catalog'=>is_null($id) ? Photo::where('remove',1)->paginate(50) : Photo::where('id',$id)->paginate(1)]); + return view('catalog.deletereview',[ + 'return'=>url('p/deletes'), + 'catalog'=>is_null($id) ? Photo::where('remove',1)->with('software.model.make')->paginate(10) : Photo::where('id',$id)->paginate(1) + ]); } public function deletesUpdate(Request $request) @@ -53,7 +56,7 @@ class PhotoController extends Controller public function duplicates($id=NULL) { return view('catalog.duplicatereview',[ - 'return'=>url('/p/duplicates'), + 'return'=>url('p/duplicates'), 'catalog'=>is_null($id) ? Photo::notRemove()->where('duplicate',1)->with('software.model.make')->paginate(10) : Photo::where('id',$id)->paginate(1) ]); } diff --git a/resources/views/catalog/deletereview.blade.php b/resources/views/catalog/deletereview.blade.php index fb46284..bc2420d 100644 --- a/resources/views/catalog/deletereview.blade.php +++ b/resources/views/catalog/deletereview.blade.php @@ -5,89 +5,31 @@ @endsection @section('contentheader_title') - Deletes + Review Pending Delete Items @endsection @section('contentheader_description') - # + {{ $catalog->count() }} to review @endsection @section('page_title') Deletes @endsection -['id','idlink'], - 'Signature'=>['signature','signature'], - 'File Signature'=>['file_signature','file_signature'], - 'Date Created'=>['date_created','datecreatedtext'], - 'Filename'=>['filename','filename'], - 'Filesize'=>['filesize','filesize'], - 'Is Duplicate'=>['duplicate','duplicatetext'], - 'Flagged'=>['flag','flagtext'], - 'Delete'=>['remove','removecheckbox'], -];?> +@section('main-content') +
+ @if ($catalog->count()) + {{ $catalog->links() }} -@section('content') +
+ {{ csrf_field() }} -
-
-
-
- Permanently Delete Items -
+ @include('catalog.widgets.duplicates') -
{{ $catalog->links() }}
+
-
- @if ($catalog->count()) - - - - - - - - @foreach ($catalog as $o) - - @php - $d=$o->list_duplicates(TRUE); $src=[]; - @endphp - - @foreach($d as $item) - @if($src AND $item->id == $src->id) @continue @endif - @php($diff=collect($src)->diffAssoc($item)) - - @endforeach - - @endforeach -
SourceRemove
- @if($d->where('duplicate',null)->count() > 1) - More than 1 source? - @elseif($d->count()) - @php($src = $d->first()) - {!! $src->view() !!} - - @foreach($data as $k=>$v) - - @endforeach -
{{$k}}{!! $src->{$v[1]} !!}
- @endif -
- {!! $item->view() !!} - - @foreach($data as $k=>$v) - - @endforeach -
{{$k}}{!! $item->{$v[1]} !!}
-
- - - {{ csrf_field() }} - - @else - NONE! - @endif -
-
-
+ + + @else + NONE! + @endif
@endsection \ No newline at end of file diff --git a/resources/views/catalog/duplicatereview.blade.php b/resources/views/catalog/duplicatereview.blade.php index 02ff3ad..3614ce5 100644 --- a/resources/views/catalog/duplicatereview.blade.php +++ b/resources/views/catalog/duplicatereview.blade.php @@ -22,50 +22,9 @@
{{ csrf_field() }} - - - - - - - + @include('catalog.widgets.duplicates') - @foreach ($catalog as $o) - - - - - @if (! ($d=$o->duplicates()->with('software.model.make')->get())->count()) - - @continue - - @else - @foreach($d as $item) - - @endforeach - @endif - - - @endforeach - - - - - - -
RemoveSource
- - @include('photo.widgets.thumbnail',['o'=>$o]) - - No other duplicates found? - - - @include('photo.widgets.thumbnail',['o'=>$item]) -
- - {{-- - - --}} +
@else NONE! diff --git a/resources/views/catalog/widgets/duplicates.blade.php b/resources/views/catalog/widgets/duplicates.blade.php new file mode 100644 index 0000000..46f48c3 --- /dev/null +++ b/resources/views/catalog/widgets/duplicates.blade.php @@ -0,0 +1,34 @@ + + + + + + + + + @foreach ($catalog as $o) + + + + + @if (! ($d=$o->duplicates()->get())->count()) + + @continue + + @else + @foreach($d as $item) + + @endforeach + @endif + + + @endforeach +
RemoveSource
+ + @include('photo.widgets.thumbnail',['o'=>$o]) + + No other duplicates found? + + + @include('photo.widgets.thumbnail',['o'=>$item]) +
\ No newline at end of file diff --git a/resources/views/photo/view.blade.php b/resources/views/photo/view.blade.php index 79feca9..e854110 100644 --- a/resources/views/photo/view.blade.php +++ b/resources/views/photo/view.blade.php @@ -5,10 +5,10 @@ @endsection @section('contentheader_title') - Photo #{{ $o->id }} @if($o->duplicate)@endif @if($o->remove)@endif + Photo #{{ $o->id }} @endsection @section('contentheader_description') - #{{ $o->id }} + @if($o->duplicate)@endif @if($o->remove)@endif @endsection @section('page_title') #{{ $o->id }} diff --git a/resources/views/photo/widgets/thumbnail.blade.php b/resources/views/photo/widgets/thumbnail.blade.php index 5d5b384..302e290 100644 --- a/resources/views/photo/widgets/thumbnail.blade.php +++ b/resources/views/photo/widgets/thumbnail.blade.php @@ -27,14 +27,12 @@
- {!! $o->getHtmlImageURL() !!} - -   + {!! $o->getHtmlImageURL() !!}