mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
26 lines
1.2 KiB
HTML
26 lines
1.2 KiB
HTML
<div class="icon-container <?= $itemType ?>">
|
|
<div class="icon-wrapper"><i class="<?= $this->itemTypeToIconClass($item, $itemType) ?>"></i></div>
|
|
|
|
<?php if ($itemType == Cms\Classes\MediaLibraryItem::FILE_TYPE_IMAGE):
|
|
$thumbnailPath = $this->thumbnailExists($thumbnailParams, $item->path, $item->lastModified);
|
|
?>
|
|
<div>
|
|
<?php if (!$thumbnailPath): ?>
|
|
<div class="image-placeholder"
|
|
data-width="<?= $thumbnailParams['width'] ?>"
|
|
data-height="<?= $thumbnailParams['height'] ?>"
|
|
data-path="<?= e($item->path) ?>"
|
|
data-last-modified="<?= $item->lastModified ?>"
|
|
id="<?= $this->getPlaceholderId($item) ?>"
|
|
>
|
|
<div class="icon-wrapper"><i class="<?= $this->itemTypeToIconClass($item, $itemType) ?>"></i></div>
|
|
</div>
|
|
<?php else: ?>
|
|
<?= $this->makePartial('thumbnail-image', [
|
|
'isError' => $this->thumbnailIsError($thumbnailPath),
|
|
'imageUrl' => $this->getThumbnailImageUrl($thumbnailPath)
|
|
]) ?>
|
|
<?php endif ?>
|
|
</div>
|
|
<?php endif ?>
|
|
</div> |