From a24de29172c76a53aa972712f58df2493d33074f 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 | 16 ++++++++-------- Admin/Routes/Web/Backend.php | 8 ++++---- Theme/Backend/production-list.tpl.php | 2 +- info.json | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 788d977..9ceb6f1 100644 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -1,11 +1,11 @@ [ { "id": 1004301001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 0, "name": "Production", - "uri": "{/lang}/backend/production/dashboard?{?}", + "uri": "{/prefix}production/dashboard?{?}", "target": "self", "icon": "fa fa-fire", "order": 70, @@ -15,11 +15,11 @@ "children": [ { "id": 1004303001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "Production", - "uri": "{/lang}/backend/production/list?{?}", + "uri": "{/prefix}production/list?{?}", "target": "self", "icon": null, "order": 5, @@ -29,11 +29,11 @@ "children": [ { "id": 1004303101, - "pid": "/backend/production", + "pid": "/production", "type": 3, "subtype": 1, "name": "List", - "uri": "{/lang}/backend/production/list?{?}", + "uri": "{/prefix}production/list?{?}", "target": "self", "icon": null, "order": 5, @@ -44,11 +44,11 @@ }, { "id": 1004303201, - "pid": "/backend/production", + "pid": "/production", "type": 3, "subtype": 1, "name": "Create", - "uri": "{/lang}/backend/production/create?{?}", + "uri": "{/prefix}production/create?{?}", "target": "self", "icon": null, "order": 10, diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 086a9d6..5307e2f 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/production/list.*$' => [ + '^.*/production/list.*$' => [ [ 'dest' => '\Modules\Production\Controller\BackendController:viewProductionList', 'verb' => RouteVerb::GET, @@ -17,7 +17,7 @@ return [ ], ], ], - '^.*/backend/production/create.*$' => [ + '^.*/production/create.*$' => [ [ 'dest' => '\Modules\Production\Controller\BackendController:viewProductionCreate', 'verb' => RouteVerb::GET, @@ -28,7 +28,7 @@ return [ ], ], ], - '^.*/backend/production/process/list.*$' => [ + '^.*/production/process/list.*$' => [ [ 'dest' => '\Modules\Production\Controller\BackendController:viewProductionProcessList', 'verb' => RouteVerb::GET, @@ -39,7 +39,7 @@ return [ ], ], ], - '^.*/backend/production/process/create.*$' => [ + '^.*/production/process/create.*$' => [ [ 'dest' => '\Modules\Production\Controller\BackendController:viewProductionProcessCreate', 'verb' => RouteVerb::GET, diff --git a/Theme/Backend/production-list.tpl.php b/Theme/Backend/production-list.tpl.php index 29500cb..f963495 100644 --- a/Theme/Backend/production-list.tpl.php +++ b/Theme/Backend/production-list.tpl.php @@ -42,7 +42,7 @@ echo $this->getData('nav')->render(); ?> $value) : $c++; - $url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/business/department/profile?{?}&id=' . $value->getId()); ?> + $url = \phpOMS\Uri\UriFactory::build('{/prefix}business/department/profile?{?}&id=' . $value->getId()); ?> printHtml($value->getId()); ?> printHtml($value->getName()); ?> diff --git a/info.json b/info.json index c03ff75..057e1e9 100644 --- a/info.json +++ b/info.json @@ -25,7 +25,7 @@ "load": [ { "pid": [ - "/backend/production" + "/production" ], "type": 4, "for": 0, @@ -34,7 +34,7 @@ }, { "pid": [ - "/backend" + "/" ], "type": 5, "from": "Production",