From ad62a620830d9a25438018300e60b88c5ff66e9e 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/checklist-list.tpl.php | 2 +- Theme/Backend/checklist-template-create.tpl.php | 2 +- Theme/Backend/checklist-template-list.tpl.php | 2 +- info.json | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 625877c..287e503 100644 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -1,11 +1,11 @@ [ { "id": 1003601001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "Checklist", - "uri": "{/lang}/backend/checklist/list?{?}", + "uri": "{/prefix}checklist/list?{?}", "target": "self", "icon": null, "order": 65, @@ -15,11 +15,11 @@ "children": [ { "id": 1003602001, - "pid": "/backend/checklist", + "pid": "/checklist", "type": 3, "subtype": 1, "name": "List", - "uri": "{/lang}/backend/checklist/list?{?}", + "uri": "{/prefix}checklist/list?{?}", "target": "self", "icon": null, "order": 1, @@ -30,11 +30,11 @@ }, { "id": 1003603001, - "pid": "/backend/checklist", + "pid": "/checklist", "type": 3, "subtype": 5, "name": "Templates", - "uri": "{/lang}/backend/checklist/template/list?{?}", + "uri": "{/prefix}checklist/template/list?{?}", "target": "self", "icon": null, "order": 5, @@ -45,11 +45,11 @@ }, { "id": 1003604001, - "pid": "/backend/checklist", + "pid": "/checklist", "type": 3, "subtype": 5, "name": "CreateTemplate", - "uri": "{/lang}/backend/checklist/template/create?{?}", + "uri": "{/prefix}checklist/template/create?{?}", "target": "self", "icon": null, "order": 15, diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 71ac68d..0416e4e 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/checklist/list.*$' => [ + '^.*/checklist/list.*$' => [ [ 'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistList', 'verb' => RouteVerb::GET, @@ -17,7 +17,7 @@ return [ ], ], ], - '^.*/backend/checklist/template/list.*$' => [ + '^.*/checklist/template/list.*$' => [ [ 'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateList', 'verb' => RouteVerb::GET, @@ -28,7 +28,7 @@ return [ ], ], ], - '^.*/backend/checklist/template/create.*$' => [ + '^.*/checklist/template/create.*$' => [ [ 'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateCreate', 'verb' => RouteVerb::GET, @@ -39,7 +39,7 @@ return [ ], ], ], - '^.*/backend/checklist/template/view.*$' => [ + '^.*/checklist/template/view.*$' => [ [ 'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateView', 'verb' => RouteVerb::GET, diff --git a/Theme/Backend/checklist-list.tpl.php b/Theme/Backend/checklist-list.tpl.php index b8314a4..7ebf743 100644 --- a/Theme/Backend/checklist-list.tpl.php +++ b/Theme/Backend/checklist-list.tpl.php @@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?> $value) : $c++; - $url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/checklist/single?{?}&id=' . $value->getId()); ?> + $url = \phpOMS\Uri\UriFactory::build('{/prefix}checklist/single?{?}&id=' . $value->getId()); ?> printHtml($value->getId()); ?> printHtml($value->getName()); ?> diff --git a/Theme/Backend/checklist-template-create.tpl.php b/Theme/Backend/checklist-template-create.tpl.php index a09eecb..de8aebf 100644 --- a/Theme/Backend/checklist-template-create.tpl.php +++ b/Theme/Backend/checklist-template-create.tpl.php @@ -21,7 +21,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('General') ?>

-
+ $value) : $c++; - $url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/checklist/single?{?}&id=' . $value->getId()); ?> + $url = \phpOMS\Uri\UriFactory::build('{/prefix}checklist/single?{?}&id=' . $value->getId()); ?>
diff --git a/Theme/Backend/checklist-template-list.tpl.php b/Theme/Backend/checklist-template-list.tpl.php index 9d4038cf..b9dd7eb 100644 --- a/Theme/Backend/checklist-template-list.tpl.php +++ b/Theme/Backend/checklist-template-list.tpl.php @@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
printHtml($value->getId()); ?> printHtml($value->getName()); ?> diff --git a/info.json b/info.json index 909ad75..0d776c9 100644 --- a/info.json +++ b/info.json @@ -27,7 +27,7 @@ "load": [ { "pid": [ - "/backend/checklist" + "/checklist" ], "type": 4, "for": "Content", @@ -36,7 +36,7 @@ }, { "pid": [ - "/backend" + "/" ], "type": 5, "from": "Checklist",