Compare commits

...

2 Commits

7 changed files with 13 additions and 17 deletions

View File

@ -32,7 +32,7 @@ class CatalogMove implements ShouldQueue,ShouldBeUnique
public function middleware(): array public function middleware(): array
{ {
return [new WithoutOverlapping($this->o->id)]; return [new WithoutOverlapping($this->o::config.'|'.$this->o->id)];
} }
/** /**
@ -43,12 +43,12 @@ class CatalogMove implements ShouldQueue,ShouldBeUnique
*/ */
public function handle() public function handle()
{ {
$from = $this->o->file_name_rel(TRUE); $from = $this->o->file_name_rel();
$to = $this->o->file_name_rel(FALSE); $to = $this->o->file_name_rel(FALSE);
Log::info(sprintf('%s: Moving [%s|%s] from [%s] to [%s]', Log::info(sprintf('%s: Moving [%s|%s] from [%s] to [%s]',
__METHOD__, __METHOD__,
$this->o->objecttype(), $this->o::config,
$this->o->id, $this->o->id,
$from, $from,
$to, $to,

View File

@ -32,7 +32,7 @@ class CatalogScan implements ShouldQueue, ShouldBeUnique
public function middleware(): array public function middleware(): array
{ {
return [new WithoutOverlapping($this->o->id)]; return [new WithoutOverlapping($this->o::config.'|'.$this->o->id)];
} }
/** /**

View File

@ -530,14 +530,6 @@ abstract class Catalog extends Model
->first(); ->first();
} }
/**
* Return my class shortname
*/
public function objectType(): string
{
return (new \ReflectionClass($this))->getShortName();
}
/** /**
* Get the id of the previous record * Get the id of the previous record
*/ */

View File

@ -0,0 +1,4 @@
.thumbnail {
width: auto !important;
height: 20em !important;
}

View File

@ -17,7 +17,7 @@
<tr> <tr>
<td> <td>
<input type="hidden" name="items[]" value="{{ $o->id }}"> <input type="hidden" name="items[]" value="{{ $o->id }}">
@include($o::config.'.widgets.thumbnail',['o'=>$o,'reference'=>$o->newInstance()]) @include($o::config.'.widgets.thumbnail',['o'=>$o,'reference'=>$o->newInstance(),'css'=>'thumbnail'])
</td> </td>
@if (! ($d=$o->myduplicates()->get())->count()) @if (! ($d=$o->myduplicates()->get())->count())
@ -32,7 +32,7 @@
@php($rendered->push($item)) @php($rendered->push($item))
<td> <td>
<input type="hidden" name="items[]" value="{{ $item->id }}"> <input type="hidden" name="items[]" value="{{ $item->id }}">
@include($item::config.'.widgets.thumbnail',['o'=>$item,'reference'=>$o]) @include($item::config.'.widgets.thumbnail',['o'=>$item,'reference'=>$o,'css'=>'thumbnail'])
</td> </td>
@endforeach @endforeach
@endif @endif

View File

@ -1,3 +1,3 @@
<a href="{{ url('p/view',$id) }}" target="{{ $id }}"> <a href="{{ url('p/view',$id) }}" target="{{ $id }}">
<img class="pb-3 w-100" src="{{ url('p/thumbnail',$id) }}"> <img @class(['pb-3','w-100',$css]) src="{{ url('p/thumbnail',$id) }}">
</a> </a>

View File

@ -25,7 +25,7 @@
</div> </div>
<div class="card-body"> <div class="card-body">
<x-photo.thumbnail :id="$o->id"/> <x-photo.thumbnail :id="$o->id" :css="$css ?? NULL"/>
</div> </div>
<div class="card-footer card-comments"> <div class="card-footer card-comments">
@ -33,7 +33,7 @@
<tr><th>ID</th><td><x-info :id="$o->id"/></td></tr> <tr><th>ID</th><td><x-info :id="$o->id"/></td></tr>
@foreach($data as $k=>$v) @foreach($data as $k=>$v)
<tr @class(['bg-success'=>($reference->exists && $reference->{$v[1]} === $o->{$v[1]})])> <tr @class(['bg-success'=>($reference->exists && ((string)$reference->{$v[1]} === (string)$o->{$v[1]}))])>
<th>{{$k}}</th> <th>{{$k}}</th>
<td>{!! $o->{$v[1]} !!}</td> <td>{!! $o->{$v[1]} !!}</td>
</tr> </tr>