mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-13 07:48:41 +00:00
Optimize media-single layout
This commit is contained in:
parent
0e3395c894
commit
6115119dde
|
|
@ -33,8 +33,13 @@ echo $this->getData('nav')->render();
|
|||
<tr><td>Created at<td><?= htmlspecialchars($media->getCreatedAt()->format('Y-m-d'), ENT_COMPAT, 'utf-8'); ?>
|
||||
<tr><td>Created by<td><?= htmlspecialchars($media->getCreatedBy()->getName1(), ENT_COMPAT, 'utf-8'); ?>
|
||||
<tr><td>Description<td><?= htmlspecialchars($media->getDescription(), ENT_COMPAT, 'utf-8'); ?>
|
||||
<tr><td colspan="2">Content
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<div class="inner">
|
||||
<?php if(\phpOMS\System\File\FileUtils::getExtensionType($media->getExtension()) === \phpOMS\System\File\ExtensionType::IMAGE) : ?>
|
||||
<div class="h-overflow"><img src="<?= htmlspecialchars($this->request->getUri()->getBase() . $media->getPath(), ENT_COMPAT, 'utf-8'); ?>"></div>
|
||||
<?php elseif($media->getExtension() === 'collection') : ?>
|
||||
|
|
@ -49,7 +54,7 @@ echo $this->getData('nav')->render();
|
|||
$output = file_get_contents(__DIR__ . '/../../../../' . $media->getPath());
|
||||
$output = str_replace(["\r\n", "\r"], "\n", $output);
|
||||
$output = explode("\n", $output);
|
||||
foreach($output as $line) : ?><span><?= $line; ?></span><?php endforeach; ?>
|
||||
foreach($output as $line) : ?><span><?= htmlspecialchars($line, ENT_COMPAT, 'utf-8'); ?></span><?php endforeach; ?>
|
||||
</pre>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user