mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-15 08:48:42 +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\System\File\FileUtils;
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
use phpOMS\Utils\Converter\FileSizeType;
|
||||||
|
use phpOMS\Utils\Converter\Measurement;
|
||||||
|
|
||||||
include __DIR__ . '/template-functions.php';
|
include __DIR__ . '/template-functions.php';
|
||||||
|
|
||||||
|
|
@ -108,7 +110,9 @@ $next = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=
|
||||||
) : $value->getName()); ?>
|
) : $value->getName()); ?>
|
||||||
</a>
|
</a>
|
||||||
<td data-label="<?= $this->getHtml('Extension'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getExtension()); ?></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('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>
|
<td data-label="<?= $this->getHtml('Created'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?></a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user