From 6e66e4006df4c7237a1a424cb70a763ed47bb997 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 9 Mar 2019 23:21:29 +0100 Subject: [PATCH] Make app,localization in url optional+tld+subdomain --- Admin/Install/Navigation.install.json | 12 ++++++------ Admin/Routes/Web/Api.php | 2 +- Admin/Routes/Web/Backend.php | 6 +++--- Theme/Backend/editor-create.tpl.php | 2 +- Theme/Backend/editor-list.tpl.php | 2 +- Theme/Backend/editor-single.tpl.php | 2 +- info.json | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index c9771aa..0fb8ac4 100644 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -1,11 +1,11 @@ [ { "id": 1005301001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "Editor", - "uri": "{/lang}/backend/editor/list?{?}", + "uri": "{/prefix}editor/list?{?}", "target": "self", "icon": null, "order": 75, @@ -15,11 +15,11 @@ "children": [ { "id": 1005302001, - "pid": "/backend/editor", + "pid": "/editor", "type": 3, "subtype": 1, "name": "List", - "uri": "{/lang}/backend/editor/list?{?}", + "uri": "{/prefix}editor/list?{?}", "target": "self", "icon": null, "order": 1, @@ -30,11 +30,11 @@ }, { "id": 1005302101, - "pid": "/backend/editor", + "pid": "/editor", "type": 3, "subtype": 5, "name": "Create", - "uri": "{/lang}/backend/editor/create?{?}", + "uri": "{/prefix}editor/create?{?}", "target": "self", "icon": null, "order": 15, diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index 45a3e06..61d7728 100644 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType; use phpOMS\Router\RouteVerb; return [ - '^.*/api/editor.*$' => [ + '^.*/editor.*$' => [ [ 'dest' => '\Modules\Editor\Controller\ApiController:apiEditorCreate', 'verb' => RouteVerb::PUT, diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 18de8c4..e16952c 100644 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType; use phpOMS\Router\RouteVerb; return [ - '^.*/backend/editor/create.*$' => [ + '^.*/editor/create.*$' => [ [ 'dest' => '\Modules\Editor\Controller\BackendController:setUpEditorEditor', 'verb' => RouteVerb::GET, @@ -26,7 +26,7 @@ return [ ], ], ], - '^.*/backend/editor/list.*$' => [ + '^.*/editor/list.*$' => [ [ 'dest' => '\Modules\Editor\Controller\BackendController:viewEditorList', 'verb' => RouteVerb::GET, @@ -37,7 +37,7 @@ return [ ], ], ], - '^.*/backend/editor/single.*$' => [ + '^.*/editor/single.*$' => [ [ 'dest' => '\Modules\Editor\Controller\BackendController:viewEditorSingle', 'verb' => RouteVerb::GET, diff --git a/Theme/Backend/editor-create.tpl.php b/Theme/Backend/editor-create.tpl.php index e238220..8e49c0b 100644 --- a/Theme/Backend/editor-create.tpl.php +++ b/Theme/Backend/editor-create.tpl.php @@ -20,7 +20,7 @@ echo $this->getData('nav')->render(); ?>
-
+
diff --git a/Theme/Backend/editor-list.tpl.php b/Theme/Backend/editor-list.tpl.php index fc03330..1094b59 100644 --- a/Theme/Backend/editor-list.tpl.php +++ b/Theme/Backend/editor-list.tpl.php @@ -31,7 +31,7 @@ echo $this->getData('nav')->render(); ?> $value) : ++$count; - $url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/editor/single?{?}&id=' . $value->getId()); ?> + $url = \phpOMS\Uri\UriFactory::build('{/prefix}editor/single?{?}&id=' . $value->getId()); ?> printHtml($value->getTitle()); ?> printHtml($value->getCreatedBy()->getName1()); ?> diff --git a/Theme/Backend/editor-single.tpl.php b/Theme/Backend/editor-single.tpl.php index 6e8a9dd..3538032 100644 --- a/Theme/Backend/editor-single.tpl.php +++ b/Theme/Backend/editor-single.tpl.php @@ -20,7 +20,7 @@ echo $this->getData('nav')->render(); ?>
- +
diff --git a/info.json b/info.json index 3fcbdde..1f460e2 100644 --- a/info.json +++ b/info.json @@ -26,7 +26,7 @@ "load": [ { "pid": [ - "/backend/editor" + "/editor" ], "type": 4, "for": "Content", @@ -35,7 +35,7 @@ }, { "pid": [ - "/backend" + "/" ], "type": 5, "from": "Editor",