mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-17 09:48:41 +00:00
re-format
This commit is contained in:
parent
2afa4d03a7
commit
67be381416
|
|
@ -20,7 +20,7 @@ use \phpOMS\Uri\UriFactory;
|
||||||
include __DIR__ . '/template-functions.php';
|
include __DIR__ . '/template-functions.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \Modules\Media\Views\MediaView $this
|
||||||
* @var \Modules\Media\Models\Media $media
|
* @var \Modules\Media\Models\Media $media
|
||||||
*/
|
*/
|
||||||
$media = $this->getData('media');
|
$media = $this->getData('media');
|
||||||
|
|
@ -79,8 +79,8 @@ echo $this->getData('nav')->render();
|
||||||
<?php endforeach; else : $path = $this->dirPathFunction($media, $this->request->getData('sub') ?? ''); ?>
|
<?php endforeach; else : $path = $this->dirPathFunction($media, $this->request->getData('sub') ?? ''); ?>
|
||||||
<?php $list = \phpOMS\System\File\Local\Directory::list($path);
|
<?php $list = \phpOMS\System\File\Local\Directory::list($path);
|
||||||
foreach ($list as $key => $value) :
|
foreach ($list as $key => $value) :
|
||||||
$url = UriFactory::build('{/prefix}media/single?{?}&id=' . $media->getId() . '&sub=' . \substr($value, \strlen($media->getPath())));
|
$url = UriFactory::build('{/prefix}media/single?{?}&id=' . $media->getId() . '&sub=' . \substr($value, \strlen($media->getPath())));
|
||||||
$icon = $this->fileIconFunction(FileUtils::getExtensionType(!\is_dir($value) ? File::extension($value) : 'collection'));
|
$icon = $fileIconFunction(FileUtils::getExtensionType(!\is_dir($value) ? File::extension($value) : 'collection'));
|
||||||
?>
|
?>
|
||||||
<tr data-href="<?= $url; ?>">
|
<tr data-href="<?= $url; ?>">
|
||||||
<td><a href="<?= $url; ?>"><i class="fa fa-<?= $this->printHtml($icon); ?>"></i></a>
|
<td><a href="<?= $url; ?>"><i class="fa fa-<?= $this->printHtml($icon); ?>"></i></a>
|
||||||
|
|
@ -125,9 +125,9 @@ echo $this->getData('nav')->render();
|
||||||
<textarea class="textContent" data-tpl-text="/media/content" data-tpl-value="/media/content" data-marker="tpl" name="content"></textarea>
|
<textarea class="textContent" data-tpl-text="/media/content" data-tpl-value="/media/content" data-marker="tpl" name="content"></textarea>
|
||||||
</template>
|
</template>
|
||||||
<pre class="textContent" data-tpl-text="/media/content" data-tpl-value="/media/content"><?= $this->printHtml(
|
<pre class="textContent" data-tpl-text="/media/content" data-tpl-value="/media/content"><?= $this->printHtml(
|
||||||
$this->getFileContent(
|
$this->getFileContent(
|
||||||
$media->isAbsolute() ? $path : __DIR__ . '/../../../../' . \ltrim($path, '/')
|
$media->isAbsolute() ? $path : __DIR__ . '/../../../../' . \ltrim($path, '/')
|
||||||
)
|
)
|
||||||
); ?></pre>
|
); ?></pre>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user