Created photo thumbnail view
This commit is contained in:
parent
80a76559e5
commit
8c453d7b0e
@ -260,6 +260,19 @@ abstract class Catalog extends Model
|
|||||||
return $this->HTMLCheckbox('remove',$this->id,$this->remove);
|
return $this->HTMLCheckbox('remove',$this->id,$this->remove);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the object type
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getTypeAttribute(): string
|
||||||
|
{
|
||||||
|
switch(get_class($this)) {
|
||||||
|
case 'App\Models\Photo': return 'photo';
|
||||||
|
case 'App\Models\Video': return 'video';
|
||||||
|
default: return 'unknown';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display the GPS coordinates
|
* Display the GPS coordinates
|
||||||
*/
|
*/
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<input type="hidden" name="items[]" value="{{ $o->id }}">
|
<input type="hidden" name="items[]" value="{{ $o->id }}">
|
||||||
@include('photo.widgets.thumbnail',['o'=>$o])
|
@include($o->type.'.widgets.thumbnail',['o'=>$o])
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@if (! ($d=$o->duplicates()->get())->count())
|
@if (! ($d=$o->duplicates()->get())->count())
|
||||||
@ -24,7 +24,7 @@
|
|||||||
@foreach($d as $item)
|
@foreach($d as $item)
|
||||||
<td>
|
<td>
|
||||||
<input type="hidden" name="items[]" value="{{ $item->id }}">
|
<input type="hidden" name="items[]" value="{{ $item->id }}">
|
||||||
@include('photo.widgets.thumbnail',['o'=>$item])
|
@include($item->type.'.widgets.thumbnail',['o'=>$item])
|
||||||
</td>
|
</td>
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
|
42
resources/views/video/widgets/thumbnail.blade.php
Normal file
42
resources/views/video/widgets/thumbnail.blade.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php $data = [
|
||||||
|
'ID'=>['id','idlink'],
|
||||||
|
'Signature'=>['signature','signature'],
|
||||||
|
'File Signature'=>['file_signature','file_signature'],
|
||||||
|
'Date Created'=>['date_created','date_created'],
|
||||||
|
'Filename'=>['filename','filename'],
|
||||||
|
'Filesize'=>['filesize','filesize'],
|
||||||
|
'Dimensions'=>['height','dimensions'],
|
||||||
|
'Length'=>['length','length'],
|
||||||
|
'Duplicate'=>['duplicate','duplicatecheckbox'],
|
||||||
|
'Flagged'=>['flag','flagcheckbox'],
|
||||||
|
'Delete'=>['remove','removecheckbox'],
|
||||||
|
];?>
|
||||||
|
|
||||||
|
<div class="card card-widget">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="user-block">
|
||||||
|
<i class="float-left fa fa-2x fa-camera"></i><span class="username"><a href="#">#{{ $o->id }} - {{ \Illuminate\Support\Str::limit($o->filename,12).\Illuminate\Support\Str::substr($o->filename,-16) }}</a></span>
|
||||||
|
<span class="description">{{ $o->date_created ? $o->date_created->toDateTimeString() : '-' }} [{{ $o->device() }}]</span>
|
||||||
|
</div>
|
||||||
|
<!-- /.user-block -->
|
||||||
|
<div class="card-tools">
|
||||||
|
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||||
|
<button type="button" class="btn btn-tool" data-card-widget="remove"><i class="fa fa-times"></i></button>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-tools -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- /.card-body -->
|
||||||
|
<div class="card-body">
|
||||||
|
<a href="{{ url('p/view',$o->id) }}" target="{{ $o->id }}">{!! $o->getHtmlImageURL() !!}</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- /.card-body -->
|
||||||
|
<div class="card-footer card-comments">
|
||||||
|
<table class="table table-striped table-sm table-hover">
|
||||||
|
@foreach($data as $k=>$v)
|
||||||
|
<tr><th>{{$k}}</th><td>{!! $o->{$v[1]} !!}</td></tr>
|
||||||
|
@endforeach
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user