From ea402015ba15ade6e5f2d5cd4aea97a6ce33dffc 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 | 22 +++++++++++----------- Admin/Routes/Web/Backend.php | 8 ++++---- Theme/Backend/department-list.tpl.php | 2 +- Theme/Backend/planning-dashboard.tpl.php | 2 +- Theme/Backend/staff-list.tpl.php | 2 +- info.json | 4 ++-- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index e66a43c..aea5c87 100644 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -1,7 +1,7 @@ [ { "id": 1002401001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 0, "name": "HumanResourceManagement", @@ -15,11 +15,11 @@ "children": [ { "id": 1002402001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "Employees", - "uri": "{/lang}/backend/hr/staff/list?{?}", + "uri": "{/prefix}hr/staff/list?{?}", "target": "self", "icon": null, "order": 1, @@ -29,11 +29,11 @@ "children": [ { "id": 1002402101, - "pid": "/backend/hr/staff", + "pid": "/hr/staff", "type": 3, "subtype": 1, "name": "List", - "uri": "{/lang}/backend/hr/staff/list?{?}", + "uri": "{/prefix}hr/staff/list?{?}", "target": "self", "icon": null, "order": 1, @@ -45,11 +45,11 @@ }, { "id": 1002402201, - "pid": "/backend/hr/staff", + "pid": "/hr/staff", "type": 3, "subtype": 1, "name": "Create", - "uri": "{/lang}/backend/hr/staff/create?{?}", + "uri": "{/prefix}hr/staff/create?{?}", "target": "self", "icon": null, "order": 5, @@ -63,11 +63,11 @@ }, { "id": 1002403001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "Departments", - "uri": "{/lang}/backend/hr/department/list?{?}", + "uri": "{/prefix}hr/department/list?{?}", "target": "self", "icon": null, "order": 1, @@ -77,11 +77,11 @@ "children": [ { "id": 1002403101, - "pid": "/backend/hr/department", + "pid": "/hr/department", "type": 3, "subtype": 1, "name": "List", - "uri": "{/lang}/backend/hr/department/list?{?}", + "uri": "{/prefix}hr/department/list?{?}", "target": "self", "icon": null, "order": 1, diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index db1d2e2..41028e0 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/hr/staff/list.*$' => [ + '^.*/hr/staff/list.*$' => [ [ 'dest' => '\Modules\HumanResourceManagement\Controller\BackendController:viewHrStaffList', 'verb' => RouteVerb::GET, @@ -17,7 +17,7 @@ return [ ], ], ], - '^.*/backend/hr/staff/profile.*$' => [ + '^.*/hr/staff/profile.*$' => [ [ 'dest' => '\Modules\HumanResourceManagement\Controller\BackendController:viewHrStaffProfile', 'verb' => RouteVerb::GET, @@ -28,7 +28,7 @@ return [ ], ], ], - '^.*/backend/hr/staff/create.*$' => [ + '^.*/hr/staff/create.*$' => [ [ 'dest' => '\Modules\HumanResourceManagement\Controller\BackendController:viewHrStaffCreate', 'verb' => RouteVerb::GET, @@ -39,7 +39,7 @@ return [ ], ], ], - '^.*/backend/hr/department/list.*$' => [ + '^.*/hr/department/list.*$' => [ [ 'dest' => '\Modules\HumanResourceManagement\Controller\BackendController:viewHrDepartmentList', 'verb' => RouteVerb::GET, diff --git a/Theme/Backend/department-list.tpl.php b/Theme/Backend/department-list.tpl.php index 8d06c03..6e2c764 100644 --- a/Theme/Backend/department-list.tpl.php +++ b/Theme/Backend/department-list.tpl.php @@ -40,7 +40,7 @@ echo $this->getData('nav')->render(); ?> $value) : $c++; - $url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/hr/department/single?{?}&id=' . $value->getId()); ?> + $url = \phpOMS\Uri\UriFactory::build('{/prefix}hr/department/single?{?}&id=' . $value->getId()); ?> printHtml($value->getId()); ?> printHtml($value->getName()); ?> diff --git a/Theme/Backend/planning-dashboard.tpl.php b/Theme/Backend/planning-dashboard.tpl.php index d23ff03..5067e06 100644 --- a/Theme/Backend/planning-dashboard.tpl.php +++ b/Theme/Backend/planning-dashboard.tpl.php @@ -25,7 +25,7 @@
- printHtml($this->app->accountManager->get($request->getHeader()->getAccount())->getL11n()->lang[0]['More'] ); ?>
diff --git a/Theme/Backend/staff-list.tpl.php b/Theme/Backend/staff-list.tpl.php index cae6d80..df97df6 100644 --- a/Theme/Backend/staff-list.tpl.php +++ b/Theme/Backend/staff-list.tpl.php @@ -42,7 +42,7 @@ echo $this->getData('nav')->render(); ?> $value) : $c++; - $url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/hr/staff/profile?{?}&id=' . $value->getId()); ?> + $url = \phpOMS\Uri\UriFactory::build('{/prefix}hr/staff/profile?{?}&id=' . $value->getId()); ?> printHtml($value->getId()); ?> printHtml($value->getAccount()->getName1()); ?> diff --git a/info.json b/info.json index c8d320e..e648cec 100644 --- a/info.json +++ b/info.json @@ -26,7 +26,7 @@ "load": [ { "pid": [ - "/backend/hr" + "/hr" ], "type": 4, "for": 0, @@ -35,7 +35,7 @@ }, { "pid": [ - "/backend" + "/" ], "type": 5, "from": "HumanResourceManagement",