From e4c0255dfb51bd262592cdcf6256bfaacf9da95e Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 11 Feb 2019 11:38:15 +0100 Subject: [PATCH] Fix absolute path to relative paths --- Admin/Install/Navigation.install.json | 10 +++++----- Controller/BackendController.php | 4 ++-- Theme/Backend/Components/Media/list.tpl.php | 2 +- Theme/Backend/media-create.tpl.php | 2 +- Theme/Backend/media-list.tpl.php | 2 +- Theme/Backend/media-single.tpl.php | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index c15b83b..e556467 100644 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -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, diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 938af31..04cdd68 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -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'); } /** diff --git a/Theme/Backend/Components/Media/list.tpl.php b/Theme/Backend/Components/Media/list.tpl.php index 54d4e16..e785f43 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('/{/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 7393f67..649aac5 100644 --- a/Theme/Backend/media-create.tpl.php +++ b/Theme/Backend/media-create.tpl.php @@ -20,7 +20,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('Upload') ?>

-
+ diff --git a/Theme/Backend/media-single.tpl.php b/Theme/Backend/media-single.tpl.php index 232aa64..5ba9340 100644 --- a/Theme/Backend/media-single.tpl.php +++ b/Theme/Backend/media-single.tpl.php @@ -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())); ?> @@ -76,7 +76,7 @@ echo $this->getData('nav')->render(); dirPathFunction($media, $this->request->getData('sub') ?? ''); ?> $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')); ?>
diff --git a/Theme/Backend/media-list.tpl.php b/Theme/Backend/media-list.tpl.php index 820298e..f6c1fb7 100644 --- a/Theme/Backend/media-list.tpl.php +++ b/Theme/Backend/media-list.tpl.php @@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?> $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())); ?>