diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 6d37d4c..993804f 100644 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -5,7 +5,7 @@ "type": 2, "subtype": 1, "name": "Media", - "uri": "{/base}/{/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": "{/base}/{/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": "{/base}/{/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": "{/base}/{/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": "{/base}/{/lang}/backend/admin/account/single/media?{?}", + "uri": "/{/lang}/backend/admin/account/single/media?{?}", "target": "self", "icon": null, "order": 3, diff --git a/Controller.php b/Controller.php index d133606..28cb785 100644 --- a/Controller.php +++ b/Controller.php @@ -106,8 +106,8 @@ class Controller extends ModuleAbstract implements WebInterface { /** @var Head $head */ $head = $response->get('Content')->getData('head'); - $head->addAsset(AssetType::JSLATE, $request->getUri()->getBase() . 'Modules/Media/Models/Upload.js'); - $head->addAsset(AssetType::JSLATE, $request->getUri()->getBase() . 'Modules/Media/Controller.js'); + $head->addAsset(AssetType::JSLATE, '/Modules/Media/Models/Upload.js'); + $head->addAsset(AssetType::JSLATE, '/Modules/Media/Controller.js'); } /** diff --git a/Models/FileUploaderTrait.php b/Models/FileUploaderTrait.php index b4bb276..e2996bb 100644 --- a/Models/FileUploaderTrait.php +++ b/Models/FileUploaderTrait.php @@ -42,6 +42,6 @@ trait FileUploaderTrait public function setUpFileUploader(RequestAbstract $request, ResponseAbstract $response, $data = null) { $head = $response->getHead(); - $head->addAsset(AssetType::JS, $request->getUri()->getBase() . 'Modules/Media/ModuleMedia.js'); + $head->addAsset(AssetType::JS, '/Modules/Media/ModuleMedia.js'); } } diff --git a/Theme/Backend/Components/Media/list.tpl.php b/Theme/Backend/Components/Media/list.tpl.php index 0c25ff6..65aad09 100644 --- a/Theme/Backend/Components/Media/list.tpl.php +++ b/Theme/Backend/Components/Media/list.tpl.php @@ -11,7 +11,7 @@ media as $key => $value) : $count++; - $url = \phpOMS\Uri\UriFactory::build('{/base}/{/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()); diff --git a/Theme/Backend/media-create.tpl.php b/Theme/Backend/media-create.tpl.php index 07807df..af3c623 100644 --- a/Theme/Backend/media-create.tpl.php +++ b/Theme/Backend/media-create.tpl.php @@ -21,7 +21,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('Upload') ?>

-
+ $value) : $count++; - $url = \phpOMS\Uri\UriFactory::build('{/base}/{/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()); diff --git a/Theme/Backend/media-single.tpl.php b/Theme/Backend/media-single.tpl.php index 883cf2a..7b8efda 100644 --- a/Theme/Backend/media-single.tpl.php +++ b/Theme/Backend/media-single.tpl.php @@ -63,7 +63,7 @@ echo $this->getData('nav')->render(); getPath())) : foreach ($media as $key => $value) : - $url = \phpOMS\Uri\UriFactory::build('{/base}/{/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()); @@ -102,7 +102,7 @@ echo $this->getData('nav')->render(); getPath() . $this->request->getData('sub')) && phpOMS\Utils\StringUtils::startsWith(str_replace('\\', '/', realpath($media->getPath() . $this->request->getData('sub'))), $media->getPath()) ? $media->getPath() . $this->request->getData('sub') : $media->getPath(); ?> $value) : - $url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/media/single?{?}&id=' . $media->getId() . '&sub=' . substr($value, strlen($media->getPath()))); + $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/media/single?{?}&id=' . $media->getId() . '&sub=' . substr($value, strlen($media->getPath()))); $icon = ''; $extensionType = \phpOMS\System\File\FileUtils::getExtensionType(!is_dir($value) ? \phpOMS\System\File\Local\File::extension($value) : 'collection');
diff --git a/Theme/Backend/media-list.tpl.php b/Theme/Backend/media-list.tpl.php index 06ab63d..cdf1f24 100644 --- a/Theme/Backend/media-list.tpl.php +++ b/Theme/Backend/media-list.tpl.php @@ -41,7 +41,7 @@ echo $this->getData('nav')->render(); ?> render(); ?>
getHtml('Created') ?>