From d81c5928c16a1a39efb98a49cf024228a3529f70 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/qa-dashboard.tpl.php | 2 +- Theme/Backend/qa-question.tpl.php | 2 +- Theme/Backend/qa-tag-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 0bcf0a4..4a52aa3 100644 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -1,11 +1,11 @@ [ { "id": 1006001001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "QA", - "uri": "{/lang}/backend/qa/dashboard?{?}", + "uri": "{/prefix}qa/dashboard?{?}", "target": "self", "icon": null, "order": 50, @@ -15,11 +15,11 @@ "children": [ { "id": 1006002001, - "pid": "/backend/qa", + "pid": "/qa", "type": 3, "subtype": 1, "name": "QA", - "uri": "{/lang}/backend/qa/dashboard?{?}", + "uri": "{/prefix}qa/dashboard?{?}", "target": "self", "icon": null, "order": 1, @@ -30,11 +30,11 @@ }, { "id": 1006003001, - "pid": "/backend/qa", + "pid": "/qa", "type": 3, "subtype": 1, "name": "Create", - "uri": "{/lang}/backend/qa/question/create?{?}", + "uri": "{/prefix}qa/question/create?{?}", "target": "self", "icon": null, "order": 5, @@ -45,11 +45,11 @@ }, { "id": 1006004001, - "pid": "/backend/qa", + "pid": "/qa", "type": 3, "subtype": 1, "name": "Badges", - "uri": "{/lang}/backend/qa/badge/list?{?}", + "uri": "{/prefix}qa/badge/list?{?}", "target": "self", "icon": null, "order": 10, diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 4a6d503..1965274 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/qa.*$' => [ + '^.*/qa.*$' => [ [ 'dest' => '\Modules\QA\Controller\BackendController:setUpBackend', 'verb' => RouteVerb::GET, @@ -17,7 +17,7 @@ return [ ], ], ], - '^.*/backend/qa/dashboard.*$' => [ + '^.*/qa/dashboard.*$' => [ [ 'dest' => '\Modules\QA\Controller\BackendController:viewQADashboard', 'verb' => RouteVerb::GET, @@ -28,7 +28,7 @@ return [ ], ], ], - '^.*/backend/qa/question.*$' => [ + '^.*/qa/question.*$' => [ [ 'dest' => '\Modules\QA\Controller\BackendController:viewQADoc', 'verb' => RouteVerb::GET, @@ -39,7 +39,7 @@ return [ ], ], ], - '^.*/backend/qa/question/create.*$' => [ + '^.*/qa/question/create.*$' => [ [ 'dest' => '\Modules\QA\Controller\BackendController:viewQAQuestionCreate', 'verb' => RouteVerb::GET, diff --git a/Theme/Backend/qa-dashboard.tpl.php b/Theme/Backend/qa-dashboard.tpl.php index 39d885c..beb5004 100644 --- a/Theme/Backend/qa-dashboard.tpl.php +++ b/Theme/Backend/qa-dashboard.tpl.php @@ -12,7 +12,7 @@ echo $this->getData('nav')->render(); ?> printHtml(count($question->getAnswers())); ?>
- printHtml($question->getName()); ?> + printHtml($question->getName()); ?>
diff --git a/Theme/Backend/qa-question.tpl.php b/Theme/Backend/qa-question.tpl.php index e562784..50fd6a7 100644 --- a/Theme/Backend/qa-question.tpl.php +++ b/Theme/Backend/qa-question.tpl.php @@ -13,7 +13,7 @@ echo $this->getData('nav')->render(); printHtml($question->getQuestion()); ?>
- <?= $this->getHtml('AccountImage', 0, 0); ?> + <?= $this->getHtml('AccountImage', 0, 0); ?>
diff --git a/Theme/Backend/qa-tag-list.tpl.php b/Theme/Backend/qa-tag-list.tpl.php index eed3888..89b9d46 100644 --- a/Theme/Backend/qa-tag-list.tpl.php +++ b/Theme/Backend/qa-tag-list.tpl.php @@ -32,7 +32,7 @@ echo $this->getData('nav')->render(); $value) : $c++; - $url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/admin/account/settings?{?}&id=' . $value->getId()); ?> + $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/account/settings?{?}&id=' . $value->getId()); ?> printHtml($value->getId()); ?> printHtml($value->getName()); ?> diff --git a/info.json b/info.json index 74f6232..36ec3e2 100644 --- a/info.json +++ b/info.json @@ -27,7 +27,7 @@ "load": [ { "pid": [ - "/backend/qa" + "/qa" ], "type": 4, "for": 0, @@ -36,7 +36,7 @@ }, { "pid": [ - "/backend" + "/" ], "type": 5, "from": "QA",