mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-01-29 09:08:41 +00:00
hide size for collections and format sizes
This commit is contained in:
parent
a7bbc2b672
commit
6ef482aeaa
|
|
@ -14,6 +14,8 @@ declare(strict_types=1);
|
|||
|
||||
use phpOMS\System\File\FileUtils;
|
||||
use phpOMS\Uri\UriFactory;
|
||||
use phpOMS\Utils\Converter\FileSizeType;
|
||||
use phpOMS\Utils\Converter\Measurement;
|
||||
|
||||
include __DIR__ . '/template-functions.php';
|
||||
|
||||
|
|
@ -108,7 +110,9 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
|||
) : $value->getName()); ?>
|
||||
</a>
|
||||
<td data-label="<?= $this->getHtml('Extension'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getExtension()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Size'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getSize()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Size'); ?>"><a href="<?= $url; ?>"><?php
|
||||
$size = FileSizeType::autoFormat($value->getSize());
|
||||
echo $this->printHtml($value->getExtension() !== 'collection' ? \number_format($size[0], 1, '.', ','). $size[1] : ''); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Creator'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedBy()->getName1()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Created'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user