mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-01-26 07:48:41 +00:00
Fix absolute path to relative paths
This commit is contained in:
parent
afc2285249
commit
e4c0255dfb
|
|
@ -5,7 +5,7 @@
|
|||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Media",
|
||||
"uri": "/{/lang}/backend/media/list?{?}",
|
||||
"uri": "{/lang}/backend/media/list?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 20,
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "List",
|
||||
"uri": "/{/lang}/backend/media/list?{?}",
|
||||
"uri": "{/lang}/backend/media/list?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
"type": 3,
|
||||
"subtype": 5,
|
||||
"name": "Create",
|
||||
"uri": "/{/lang}/backend/media/create?{?}",
|
||||
"uri": "{/lang}/backend/media/create?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 5,
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
"type": 2,
|
||||
"subtype": 2,
|
||||
"name": "Media",
|
||||
"uri": "/{/lang}/backend/profile/single/media?{?}",
|
||||
"uri": "{/lang}/backend/profile/single/media?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 3,
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Media",
|
||||
"uri": "/{/lang}/backend/admin/account/single/media?{?}",
|
||||
"uri": "{/lang}/backend/admin/account/single/media?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 3,
|
||||
|
|
|
|||
|
|
@ -98,8 +98,8 @@ final class BackendController extends Controller
|
|||
{
|
||||
/** @var \phpOMS\Model\Html\Head $head */
|
||||
$head = $response->get('Content')->getData('head');
|
||||
$head->addAsset(AssetType::JSLATE, '/Modules/Media/Models/Upload.js');
|
||||
$head->addAsset(AssetType::JSLATE, '/Modules/Media/Controller.js');
|
||||
$head->addAsset(AssetType::JSLATE, 'Modules/Media/Models/Upload.js');
|
||||
$head->addAsset(AssetType::JSLATE, 'Modules/Media/Controller.js');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<tfoot>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach ($this->media as $key => $value) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $value->getId());
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/media/single?{?}&id=' . $value->getId());
|
||||
|
||||
$icon = '';
|
||||
$extensionType = \phpOMS\System\File\FileUtils::getExtensionType($value->getExtension());
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Upload') ?></h1></header>
|
||||
<div class="inner">
|
||||
<form method="POST" id="media-uploader" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/media'); ?>">
|
||||
<form method="POST" id="media-uploader" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/media'); ?>">
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
|
||||
<tr><td><input type="text" id="iName" name="name" placeholder="">
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php $count = 0;
|
||||
foreach ($media as $key => $value) :
|
||||
$count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $value->getId());
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/media/single?{?}&id=' . $value->getId());
|
||||
$icon = $fileIconFunction(\phpOMS\System\File\FileUtils::getExtensionType($value->getExtension()));
|
||||
?>
|
||||
<tr data-href="<?= $url; ?>">
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ echo $this->getData('nav')->render();
|
|||
|| $media->getPath() === ''
|
||||
) :
|
||||
foreach ($media as $key => $value) :
|
||||
$url = UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $value->getId());
|
||||
$url = UriFactory::build('{/lang}/backend/media/single?{?}&id=' . $value->getId());
|
||||
$icon = $fileIconFunction(FileUtils::getExtensionType($value->getExtension()));
|
||||
?>
|
||||
<tr data-href="<?= $url; ?>">
|
||||
|
|
@ -76,7 +76,7 @@ echo $this->getData('nav')->render();
|
|||
<?php endforeach; else : $path = $this->dirPathFunction($media, $this->request->getData('sub') ?? ''); ?>
|
||||
<?php $list = \phpOMS\System\File\Local\Directory::list($path);
|
||||
foreach ($list as $key => $value) :
|
||||
$url = UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $media->getId() . '&sub=' . \substr($value, \strlen($media->getPath())));
|
||||
$url = UriFactory::build('{/lang}/backend/media/single?{?}&id=' . $media->getId() . '&sub=' . \substr($value, \strlen($media->getPath())));
|
||||
$icon = $this->fileIconFunction(FileUtils::getExtensionType(!\is_dir($value) ? File::extension($value) : 'collection'));
|
||||
?>
|
||||
<tr data-href="<?= $url; ?>">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user