UI
This commit is contained in:
parent
34b0d1f84f
commit
34638604c1
@ -26,7 +26,7 @@ class Study extends BaseModel implements HasMedia
|
||||
use InteractsWithMedia;
|
||||
|
||||
public const string MEDIA_COLLECTION = 'attachments';
|
||||
public const string FALLBACK_IMAGE = 'imgs/pdf.png';
|
||||
public const string FALLBACK_IMAGE = 'imgs/doc-pdf.png';
|
||||
|
||||
public function details(): HasOne
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Study;
|
||||
use App\Models\User;
|
||||
use App\Services\AuditTrail\ActivityLogger;
|
||||
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
||||
@ -105,10 +106,10 @@ function chomp(string $s, int $len, int $right = 6): string
|
||||
function thumb_url(Media $media): string
|
||||
{
|
||||
if ($media->mime_type === 'application/pdf') {
|
||||
return asset('imgs/pdf.png');
|
||||
return asset(Study::FALLBACK_IMAGE);
|
||||
}
|
||||
|
||||
return $media->getUrl('tn') ?? asset('imgs/pdf.png');
|
||||
return $media->getUrl('tn') ?? asset(Study::FALLBACK_IMAGE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in New Issue
Block a user