From 9983fd416d8d20bc97d93b263192f3ea7549f6ab 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 | 28 ++++++++++++------------- Admin/Routes/Web/Backend.php | 12 +++++------ Theme/Backend/event-create.tpl.php | 2 +- Theme/Backend/promotion-create.tpl.php | 2 +- Theme/Backend/promotion-list.tpl.php | 2 +- Theme/Backend/promotion-profile.tpl.php | 2 +- info.json | 4 ++-- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 06c1fd7..08d6139 100644 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -1,11 +1,11 @@ [ { "id": 1001901001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 0, "name": "Marketing", - "uri": "{/lang}/backend/marketing/dashboard?{?}", + "uri": "{/prefix}marketing/dashboard?{?}", "target": "self", "icon": "fa fa-paint-brush", "order": 60, @@ -15,11 +15,11 @@ "children": [ { "id": 1001902001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "Promotions", - "uri": "{/lang}/backend/marketing/promotion/list?{?}", + "uri": "{/prefix}marketing/promotion/list?{?}", "target": "self", "icon": null, "order": 1, @@ -29,11 +29,11 @@ "children": [ { "id": 1001902101, - "pid": "/backend/marketing/promotion", + "pid": "/marketing/promotion", "type": 3, "subtype": 1, "name": "List", - "uri": "{/lang}/backend/marketing/promotion/list?{?}", + "uri": "{/prefix}marketing/promotion/list?{?}", "target": "self", "icon": null, "order": 1, @@ -44,11 +44,11 @@ }, { "id": 1001902201, - "pid": "/backend/marketing/promotion", + "pid": "/marketing/promotion", "type": 3, "subtype": 1, "name": "Create", - "uri": "{/lang}/backend/marketing/promotion/create?{?}", + "uri": "{/prefix}marketing/promotion/create?{?}", "target": "self", "icon": null, "order": 5, @@ -61,11 +61,11 @@ }, { "id": 1001903001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "Events", - "uri": "{/lang}/backend/marketing/event/list?{?}", + "uri": "{/prefix}marketing/event/list?{?}", "target": "self", "icon": null, "order": 5, @@ -75,11 +75,11 @@ "children": [ { "id": 1001903101, - "pid": "/backend/marketing/event", + "pid": "/marketing/event", "type": 3, "subtype": 1, "name": "List", - "uri": "{/lang}/backend/marketing/event/list?{?}", + "uri": "{/prefix}marketing/event/list?{?}", "target": "self", "icon": null, "order": 1, @@ -90,11 +90,11 @@ }, { "id": 1001903201, - "pid": "/backend/marketing/event", + "pid": "/marketing/event", "type": 3, "subtype": 1, "name": "Create", - "uri": "{/lang}/backend/marketing/event/create?{?}", + "uri": "{/prefix}marketing/event/create?{?}", "target": "self", "icon": null, "order": 5, diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index fa8a405..3c85c01 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/marketing/promotion/list.*$' => [ + '^.*/marketing/promotion/list.*$' => [ [ 'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingPromotionList', 'verb' => RouteVerb::GET, @@ -17,7 +17,7 @@ return [ ], ], ], - '^.*/backend/marketing/promotion/create.*$' => [ + '^.*/marketing/promotion/create.*$' => [ [ 'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingPromotionCreate', 'verb' => RouteVerb::GET, @@ -28,7 +28,7 @@ return [ ], ], ], - '^.*/backend/marketing/promotion/profile.*$' => [ + '^.*/marketing/promotion/profile.*$' => [ [ 'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingPromotionProfile', 'verb' => RouteVerb::GET, @@ -39,7 +39,7 @@ return [ ], ], ], - '^.*/backend/marketing/event/list.*$' => [ + '^.*/marketing/event/list.*$' => [ [ 'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingEventList', 'verb' => RouteVerb::GET, @@ -50,7 +50,7 @@ return [ ], ], ], - '^.*/backend/marketing/event/create.*$' => [ + '^.*/marketing/event/create.*$' => [ [ 'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingEventCreate', 'verb' => RouteVerb::GET, @@ -61,7 +61,7 @@ return [ ], ], ], - '^.*/backend/marketing/event/profile.*$' => [ + '^.*/marketing/event/profile.*$' => [ [ 'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingEventProfile', 'verb' => RouteVerb::GET, diff --git a/Theme/Backend/event-create.tpl.php b/Theme/Backend/event-create.tpl.php index 8e1ca23..4635a57 100644 --- a/Theme/Backend/event-create.tpl.php +++ b/Theme/Backend/event-create.tpl.php @@ -21,7 +21,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('Event'); ?>

-
+
diff --git a/Theme/Backend/promotion-create.tpl.php b/Theme/Backend/promotion-create.tpl.php index cae7aa2..5170d0a 100644 --- a/Theme/Backend/promotion-create.tpl.php +++ b/Theme/Backend/promotion-create.tpl.php @@ -21,7 +21,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('Promotion'); ?>

- + $value) : ++$count; - $url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/marketing/promotion/profile?{?}&id=' . $value->getId());?> + $url = \phpOMS\Uri\UriFactory::build('{/prefix}marketing/promotion/profile?{?}&id=' . $value->getId());?>
diff --git a/Theme/Backend/promotion-list.tpl.php b/Theme/Backend/promotion-list.tpl.php index 863914e..40a80b9 100644 --- a/Theme/Backend/promotion-list.tpl.php +++ b/Theme/Backend/promotion-list.tpl.php @@ -35,7 +35,7 @@ echo $this->getData('nav')->render(); ?>
printHtml($value->getName()); ?> printHtml($value->getStart()->format('Y-m-d')); ?> diff --git a/Theme/Backend/promotion-profile.tpl.php b/Theme/Backend/promotion-profile.tpl.php index 7ab7c5d..8a7c61f 100644 --- a/Theme/Backend/promotion-profile.tpl.php +++ b/Theme/Backend/promotion-profile.tpl.php @@ -20,7 +20,7 @@ echo $this->getData('nav')->render(); ?>

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

- +
diff --git a/info.json b/info.json index 20c9f82..438fd4e 100644 --- a/info.json +++ b/info.json @@ -25,7 +25,7 @@ "load": [ { "pid": [ - "/backend/marketing" + "/marketing" ], "type": 4, "for": 0, @@ -34,7 +34,7 @@ }, { "pid": [ - "/backend" + "/" ], "type": 5, "from": "Marketing",