diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index d3612f5..5807b91 100644 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -1,7 +1,7 @@ [ { "id": 1000101001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 0, "name": "Admin", @@ -15,11 +15,11 @@ "children": [ { "id": 1000102001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "General", - "uri": "{/lang}/backend/admin/settings/general?{?}", + "uri": "{/prefix}admin/settings/general?{?}", "target": "self", "icon": null, "order": 1, @@ -30,11 +30,11 @@ }, { "id": 1000103001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "Groups", - "uri": "{/lang}/backend/admin/group/list?{?}", + "uri": "{/prefix}admin/group/list?{?}", "target": "self", "icon": null, "order": 2, @@ -44,11 +44,11 @@ "children": [ { "id": 1000103103, - "pid": "/backend/admin/group", + "pid": "/admin/group", "type": 3, "subtype": 1, "name": "List", - "uri": "{/lang}/backend/admin/group/list?{?}", + "uri": "{/prefix}admin/group/list?{?}", "target": "self", "icon": null, "order": 1, @@ -59,11 +59,11 @@ }, { "id": 1000103104, - "pid": "/backend/admin/group", + "pid": "/admin/group", "type": 3, "subtype": 1, "name": "Create", - "uri": "{/lang}/backend/admin/group/create?{?}", + "uri": "{/prefix}admin/group/create?{?}", "target": "self", "icon": null, "order": 5, @@ -76,11 +76,11 @@ }, { "id": 1000104001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "Accounts", - "uri": "{/lang}/backend/admin/account/list?{?}", + "uri": "{/prefix}admin/account/list?{?}", "target": "self", "icon": null, "order": 3, @@ -90,11 +90,11 @@ "children": [ { "id": 1000104101, - "pid": "/backend/admin/account", + "pid": "/admin/account", "type": 3, "subtype": 1, "name": "List", - "uri": "{/lang}/backend/admin/account/list?{?}", + "uri": "{/prefix}admin/account/list?{?}", "target": "self", "icon": null, "order": 1, @@ -105,11 +105,11 @@ }, { "id": 1000104202, - "pid": "/backend/admin/account", + "pid": "/admin/account", "type": 3, "subtype": 1, "name": "Create", - "uri": "{/lang}/backend/admin/account/create?{?}", + "uri": "{/prefix}admin/account/create?{?}", "target": "self", "icon": null, "order": 5, @@ -122,11 +122,11 @@ }, { "id": 1000105001, - "pid": "/backend", + "pid": "/", "type": 2, "subtype": 1, "name": "Modules", - "uri": "{/lang}/backend/admin/module/list?{?}", + "uri": "{/prefix}admin/module/list?{?}", "target": "self", "icon": null, "order": 4, @@ -136,11 +136,11 @@ "children": [ { "id": 1000105101, - "pid": "/backend/admin/module", + "pid": "/admin/module", "type": 3, "subtype": 1, "name": "Settings", - "uri": "{/lang}/backend/admin/module/setting?{?}", + "uri": "{/prefix}admin/module/setting?{?}", "target": "self", "icon": null, "order": 4, diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index 3c82ce0..76db069 100644 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType; use phpOMS\Router\RouteVerb; return [ - '^.*/api/admin/settings.*$' => [ + '^.*/admin/settings.*$' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiSettingsSet', 'verb' => RouteVerb::SET, @@ -27,7 +27,7 @@ return [ ], ], - '^.*/api/admin/group$' => [ + '^.*/admin/group$' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiGroupCreate', 'verb' => RouteVerb::PUT, @@ -67,7 +67,7 @@ return [ ], // todo: the order of find and account is bad but needed for now. otherwise the admin/account.* also matches and we match two routes = bad - '^.*/api/admin/find/account.*$' => [ + '^.*/admin/find/account.*$' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiAccountFind', 'verb' => RouteVerb::GET, @@ -78,7 +78,7 @@ return [ ], ], ], - '^.*/api/admin/find/group.*$' => [ + '^.*/admin/find/group.*$' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiGroupFind', 'verb' => RouteVerb::GET, @@ -90,7 +90,7 @@ return [ ], ], - '^.*/api/admin/account$' => [ + '^.*/admin/account$' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiAccountCreate', 'verb' => RouteVerb::PUT, @@ -129,7 +129,7 @@ return [ ], ], - '^.*/api/admin/module/status.*$' => [ + '^.*/admin/module/status.*$' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiModuleStatusUpdate', 'verb' => RouteVerb::SET, @@ -141,7 +141,7 @@ return [ ], ], - '^.*/api/admin/group/account.*$' => [ + '^.*/admin/group/account.*$' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiAddAccountToGroup', 'verb' => RouteVerb::PUT, @@ -152,7 +152,7 @@ return [ ], ], ], - '^.*/api/admin/account/group.*$' => [ + '^.*/admin/account/group.*$' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiAddGroupToAccount', 'verb' => RouteVerb::PUT, @@ -164,7 +164,7 @@ return [ ], ], - '^.*/api/admin/group/permission.*$' => [ + '^.*/admin/group/permission.*$' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiAddGroupPermission', 'verb' => RouteVerb::PUT, @@ -175,7 +175,7 @@ return [ ], ], ], - '^.*/api/admin/account/permission.*$' => [ + '^.*/admin/account/permission.*$' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiAddAccountPermission', 'verb' => RouteVerb::PUT, @@ -186,7 +186,7 @@ return [ ], ], ], - '^.*/api/admin/module/reinit.*$' => [ + '^.*/admin/module/reinit.*$' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiReInit', 'verb' => RouteVerb::GET, diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index d2159b1..ea340b1 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/admin/settings/general.*$' => [ + '^.*/admin/settings/general.*$' => [ [ 'dest' => '\Modules\Admin\Controller\BackendController:viewSettingsGeneral', 'verb' => RouteVerb::GET, @@ -17,7 +17,7 @@ return [ ], ], ], - '^.*/backend/admin/account/list.*$' => [ + '^.*/admin/account/list.*$' => [ [ 'dest' => '\Modules\Admin\Controller\BackendController:viewAccountList', 'verb' => RouteVerb::GET, @@ -28,7 +28,7 @@ return [ ], ], ], - '^.*/backend/admin/account/settings.*$' => [ + '^.*/admin/account/settings.*$' => [ [ 'dest' => '\Modules\Admin\Controller\BackendController:viewAccountSettings', 'verb' => RouteVerb::GET, @@ -39,7 +39,7 @@ return [ ], ], ], - '^.*/backend/admin/account/create.*$' => [ + '^.*/admin/account/create.*$' => [ [ 'dest' => '\Modules\Admin\Controller\BackendController:viewAccountCreate', 'verb' => RouteVerb::GET, @@ -50,7 +50,7 @@ return [ ], ], ], - '^.*/backend/admin/group/list.*$' => [ + '^.*/admin/group/list.*$' => [ [ 'dest' => '\Modules\Admin\Controller\BackendController:viewGroupList', 'verb' => RouteVerb::GET, @@ -61,7 +61,7 @@ return [ ], ], ], - '^.*/backend/admin/group/settings.*$' => [ + '^.*/admin/group/settings.*$' => [ [ 'dest' => '\Modules\Admin\Controller\BackendController:viewGroupSettings', 'verb' => RouteVerb::GET, @@ -72,7 +72,7 @@ return [ ], ], ], - '^.*/backend/admin/group/create.*$' => [ + '^.*/admin/group/create.*$' => [ [ 'dest' => '\Modules\Admin\Controller\BackendController:viewGroupCreate', 'verb' => RouteVerb::GET, @@ -83,7 +83,7 @@ return [ ], ], ], - '^.*/backend/admin/module/list.*$' => [ + '^.*/admin/module/list.*$' => [ [ 'dest' => '\Modules\Admin\Controller\BackendController:viewModuleList', 'verb' => RouteVerb::GET, @@ -94,7 +94,7 @@ return [ ], ], ], - '^.*/backend/admin/module/settings\?.*$' => [ + '^.*/admin/module/settings\?.*$' => [ [ 'dest' => '\Modules\Admin\Controller\BackendController:viewModuleProfile', 'verb' => RouteVerb::GET, diff --git a/Controller/ApiController.php b/Controller/ApiController.php index b1e3bdc..1c9b6f5 100644 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -91,7 +91,7 @@ final class ApiController extends Controller */ public function apiSettingsSet(RequestAbstract $request, ResponseAbstract $response, $data = null) : void { - $data = empty($request->getData('settings')) ? $request->getLike('(settings_)(.*)') : \json_decode((string) $request->getData('settings'), true); + $data = empty($request->getData('settings')) ? $request->getLike('(settings_)(.*)') : $request->getDataJson('settings'); $this->updateModel($request, $data, $data, function() use($data) : void { $this->app->appSettings->set($data, true); diff --git a/Theme/Backend/Components/GroupTagSelector/group-selector.tpl.php b/Theme/Backend/Components/GroupTagSelector/group-selector.tpl.php index 54e7f7d..d6a4291 100644 --- a/Theme/Backend/Components/GroupTagSelector/group-selector.tpl.php +++ b/Theme/Backend/Components/GroupTagSelector/group-selector.tpl.php @@ -5,9 +5,9 @@ { "key": 1, "listener": "click", "action": [ {"key": 1, "type": "dom.popup", "selector": "#group-selector-tpl", "aniIn": "fadeIn", "id": "printHtml($this->getId()); ?>"}, - {"key": 2, "type": "message.request", "uri": "", "method": "GET", "request_type": "json"}, + {"key": 2, "type": "message.request", "uri": "", "method": "GET", "request_type": "json"}, {"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}, - {"key": 4, "type": "message.request", "uri": "", "method": "GET", "request_type": "json"}, + {"key": 4, "type": "message.request", "uri": "", "method": "GET", "request_type": "json"}, {"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1} ] } diff --git a/Theme/Backend/accounts-create.tpl.php b/Theme/Backend/accounts-create.tpl.php index 64a0335..24cae40 100644 --- a/Theme/Backend/accounts-create.tpl.php +++ b/Theme/Backend/accounts-create.tpl.php @@ -21,7 +21,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('Account'); ?>

-
+ getData('list:elements') as $key => $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()); $color = 'darkred'; if ($value->getStatus() === AccountStatus::ACTIVE) { $color = 'green'; } elseif ($value->getStatus() === AccountStatus::INACTIVE) { $color = 'darkblue'; } diff --git a/Theme/Backend/accounts-single.tpl.php b/Theme/Backend/accounts-single.tpl.php index cbdd80d..c682d7e 100644 --- a/Theme/Backend/accounts-single.tpl.php +++ b/Theme/Backend/accounts-single.tpl.php @@ -28,7 +28,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('Account'); ?>

- +
diff --git a/Theme/Backend/accounts-list.tpl.php b/Theme/Backend/accounts-list.tpl.php index 093a091..2127ff0 100644 --- a/Theme/Backend/accounts-list.tpl.php +++ b/Theme/Backend/accounts-list.tpl.php @@ -34,7 +34,7 @@ echo $this->getData('nav')->render(); ?>
getGroups(); foreach ($groups as $key => $value) : $c++; - $url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/admin/group/settings?{?}&id=' . $value->getId()); ?> + $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
@@ -114,7 +114,7 @@ echo $this->getData('nav')->render(); ?> getHtml('Name') ?>
printHtml($value->getId()); ?> @@ -128,7 +128,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('Groups'); ?>

- +
@@ -184,7 +184,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('Permissions'); ?>

- +
diff --git a/Theme/Backend/groups-create.tpl.php b/Theme/Backend/groups-create.tpl.php index 4a4f571..ea7e979 100644 --- a/Theme/Backend/groups-create.tpl.php +++ b/Theme/Backend/groups-create.tpl.php @@ -21,7 +21,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('Group'); ?>

- + getData('list:elements') as $key => $value) : $c++; - $url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/admin/group/settings?{?}&id=' . $value->getId()); + $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); $color = 'darkred'; if ($value->getStatus() === \phpOMS\Account\GroupStatus::ACTIVE) { $color = 'green'; } elseif ($value->getStatus() === \phpOMS\Account\GroupStatus::INACTIVE) { $color = 'darkblue'; } diff --git a/Theme/Backend/groups-single.tpl.php b/Theme/Backend/groups-single.tpl.php index 5de7171..ef54391 100644 --- a/Theme/Backend/groups-single.tpl.php +++ b/Theme/Backend/groups-single.tpl.php @@ -35,7 +35,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('Group'); ?>

- + @@ -71,7 +71,7 @@ echo $this->getData('nav')->render(); ?> $value) : $c++; ?>
diff --git a/Theme/Backend/groups-list.tpl.php b/Theme/Backend/groups-list.tpl.php index 6eccc90..87dfc7a 100644 --- a/Theme/Backend/groups-list.tpl.php +++ b/Theme/Backend/groups-list.tpl.php @@ -30,7 +30,7 @@ echo $this->getData('nav')->render(); ?>
- getName1(); ?> + getName1(); ?>
getHtml('Empty', 0, 0); ?> @@ -81,7 +81,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('Accounts'); ?>

- + getData('accGrpSelector')->render('iAccount', 'group', true); ?> @@ -132,7 +132,7 @@ echo $this->getData('nav')->render(); ?>

getHtml('Permissions'); ?>

- + $module) : ++$count; - $url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/admin/module/settings?{?}&id=' . $module['name']['internal']); + $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/module/settings?{?}&id=' . $module['name']['internal']); if (isset($active[$module['name']['internal']])) { $status = ModuleStatus::ACTIVE; } elseif (isset($installed[$module['name']['internal']])) { $status = ModuleStatus::INACTIVE; } else { $status = ModuleStatus::AVAILABLE; } diff --git a/Theme/Backend/modules-single.tpl.php b/Theme/Backend/modules-single.tpl.php index f054ea9..f30f87a 100644 --- a/Theme/Backend/modules-single.tpl.php +++ b/Theme/Backend/modules-single.tpl.php @@ -54,18 +54,18 @@ if ($nav !== null) {
diff --git a/Theme/Backend/modules-list.tpl.php b/Theme/Backend/modules-list.tpl.php index bcb4ccf..e022f0d 100644 --- a/Theme/Backend/modules-list.tpl.php +++ b/Theme/Backend/modules-list.tpl.php @@ -37,7 +37,7 @@ $installed = $this->app->moduleManager->getInstalledModules();
- +
-
+
-
+
@@ -73,12 +73,12 @@ if ($nav !== null) {
-
+
-
+
diff --git a/Theme/Backend/settings-general.tpl.php b/Theme/Backend/settings-general.tpl.php index 6216b13..94acef6 100644 --- a/Theme/Backend/settings-general.tpl.php +++ b/Theme/Backend/settings-general.tpl.php @@ -46,7 +46,7 @@ $temperatures = \phpOMS\Utils\Converter\TemperatureType::getConstants();

getHtml('Settings'); ?>

-
+
@@ -62,7 +62,7 @@ $temperatures = \phpOMS\Utils\Converter\TemperatureType::getConstants();

getHtml('Security'); ?>

- +
@@ -96,7 +96,7 @@ $temperatures = \phpOMS\Utils\Converter\TemperatureType::getConstants();

getHtml('Logging'); ?>

- +
@@ -121,7 +121,7 @@ $temperatures = \phpOMS\Utils\Converter\TemperatureType::getConstants();

getHtml('Localization'); ?>

- +
diff --git a/info.json b/info.json index 7c356e3..481c1af 100644 --- a/info.json +++ b/info.json @@ -23,7 +23,7 @@ "load": [ { "pid": [ - "/backend/admin" + "/admin" ], "type": 4, "for": "Content", @@ -32,7 +32,7 @@ }, { "pid": [ - "/backend" + "/" ], "type": 5, "from": "Admin", @@ -41,7 +41,7 @@ }, { "pid": [ - "/backend/admin" + "/admin" ], "type": 5, "for": "Content",