From 72269c5ed11f1c5943c9c5c3c9c5d7c26dc411c0 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/Backend.php | 6 +++--- Theme/Backend/projectmanagement-list.tpl.php | 2 +- Theme/Backend/projectmanagement-profile.tpl.php | 2 +- info.json | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 78f4fed..91d1a79 100644 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -1,11 +1,11 @@ [ { "id": 1001701001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "ProjectManagement", - "uri": "{/lang}/backend/projectmanagement/list?{?}", + "uri": "{/prefix}projectmanagement/list?{?}", "target": "self", "icon": null, "order": 60, @@ -15,11 +15,11 @@ "children": [ { "id": 1001702001, - "pid": "/backend/projectmanagement", + "pid": "/projectmanagement", "type": 3, "subtype": 1, "name": "List", - "uri": "{/lang}/backend/projectmanagement/list?{?}", + "uri": "{/prefix}projectmanagement/list?{?}", "target": "self", "icon": null, "order": 1, @@ -30,11 +30,11 @@ }, { "id": 1001703001, - "pid": "/backend/projectmanagement", + "pid": "/projectmanagement", "type": 3, "subtype": 1, "name": "Create", - "uri": "{/lang}/backend/projectmanagement/create?{?}", + "uri": "{/prefix}projectmanagement/create?{?}", "target": "self", "icon": null, "order": 5, diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index dbf6cc4..c73a843 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/projectmanagement/list.*$' => [ + '^.*/projectmanagement/list.*$' => [ [ 'dest' => '\Modules\ProjectManagement\Controller\BackendController:viewProjectManagementList', 'verb' => RouteVerb::GET, @@ -17,7 +17,7 @@ return [ ], ], ], - '^.*/backend/projectmanagement/create.*$' => [ + '^.*/projectmanagement/create.*$' => [ [ 'dest' => '\Modules\ProjectManagement\Controller\BackendController:viewProjectManagementCreate', 'verb' => RouteVerb::GET, @@ -28,7 +28,7 @@ return [ ], ], ], - '^.*/backend/projectmanagement/profile.*$' => [ + '^.*/projectmanagement/profile.*$' => [ [ 'dest' => '\Modules\ProjectManagement\Controller\BackendController:viewProjectManagementProfile', 'verb' => RouteVerb::GET, diff --git a/Theme/Backend/projectmanagement-list.tpl.php b/Theme/Backend/projectmanagement-list.tpl.php index cbd63c2..74ecdb8 100644 --- a/Theme/Backend/projectmanagement-list.tpl.php +++ b/Theme/Backend/projectmanagement-list.tpl.php @@ -35,7 +35,7 @@ echo $this->getData('nav')->render(); ?> $value) : ++$count; - $url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/projectmanagement/profile?{?}&id=' . $value->getId());?> + $url = \phpOMS\Uri\UriFactory::build('{/prefix}projectmanagement/profile?{?}&id=' . $value->getId());?> printHtml($value->getName()); ?> printHtml($value->getStart()->format('Y-m-d')); ?> diff --git a/Theme/Backend/projectmanagement-profile.tpl.php b/Theme/Backend/projectmanagement-profile.tpl.php index 1afbb3f..08afc7c 100644 --- a/Theme/Backend/projectmanagement-profile.tpl.php +++ b/Theme/Backend/projectmanagement-profile.tpl.php @@ -19,7 +19,7 @@ echo $this->getData('nav')->render(); ?>

printHtml($project->getName()); ?>

-
+
diff --git a/info.json b/info.json index 0ecb30b..b4b070c 100644 --- a/info.json +++ b/info.json @@ -28,7 +28,7 @@ "load": [ { "pid": [ - "/backend/projectmanagement" + "/projectmanagement" ], "type": 4, "for": "Content", @@ -37,7 +37,7 @@ }, { "pid": [ - "/backend" + "/" ], "type": 5, "from": "ProjectManagement",