diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index f45d690..b91d721 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -19,7 +19,7 @@ "type": 2, "subtype": 1, "name": "Organigram", - "uri": "{/prefix}organization/organigram?{?}", + "uri": "{/lang}/{/app}/organization/organigram?{?}", "target": "self", "icon": null, "order": 1, @@ -38,7 +38,7 @@ "type": 2, "subtype": 1, "name": "Units", - "uri": "{/prefix}organization/unit/list", + "uri": "{/lang}/{/app}/organization/unit/list", "target": "self", "icon": null, "order": 5, @@ -52,7 +52,7 @@ "type": 3, "subtype": 1, "name": "List", - "uri": "{/prefix}organization/unit/list", + "uri": "{/lang}/{/app}/organization/unit/list", "target": "self", "icon": null, "order": 5, @@ -67,7 +67,7 @@ "type": 3, "subtype": 1, "name": "Create", - "uri": "{/prefix}organization/unit/create?{?}", + "uri": "{/lang}/{/app}/organization/unit/create?{?}", "target": "self", "icon": null, "order": 25, @@ -84,7 +84,7 @@ "type": 2, "subtype": 1, "name": "Departments", - "uri": "{/prefix}organization/department/list", + "uri": "{/lang}/{/app}/organization/department/list", "target": "self", "icon": null, "order": 10, @@ -98,7 +98,7 @@ "type": 3, "subtype": 1, "name": "List", - "uri": "{/prefix}organization/department/list", + "uri": "{/lang}/{/app}/organization/department/list", "target": "self", "icon": null, "order": 5, @@ -113,7 +113,7 @@ "type": 3, "subtype": 1, "name": "Create", - "uri": "{/prefix}organization/department/create?{?}", + "uri": "{/lang}/{/app}/organization/department/create?{?}", "target": "self", "icon": null, "order": 25, @@ -130,7 +130,7 @@ "type": 2, "subtype": 1, "name": "Positions", - "uri": "{/prefix}organization/position/list", + "uri": "{/lang}/{/app}/organization/position/list", "target": "self", "icon": null, "order": 20, @@ -144,7 +144,7 @@ "type": 3, "subtype": 1, "name": "List", - "uri": "{/prefix}organization/position/list", + "uri": "{/lang}/{/app}/organization/position/list", "target": "self", "icon": null, "order": 5, @@ -159,7 +159,7 @@ "type": 3, "subtype": 1, "name": "Create", - "uri": "{/prefix}organization/position/create?{?}", + "uri": "{/lang}/{/app}/organization/position/create?{?}", "target": "self", "icon": null, "order": 25, diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 007bfcf..18b23e4 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -406,7 +406,7 @@ final class ApiController extends Controller if ($this->app->appSettings->get(null, SettingsEnum::GROUP_GENERATE_AUTOMATICALLY_POSITION)->content === '1') { $newRequest = new HttpRequest(); $newRequest->header->account = $request->header->account; - $newRequest->setData('name', 'org:pos:' . \strtolower($position->name)); + $newRequest->setData('name', 'org:pos:' . \str_replace(' ', '_', \strtolower($position->name))); $newRequest->setData('status', GroupStatus::ACTIVE); $this->app->moduleManager->get('Admin')->apiGroupCreate($newRequest, $response, $data); } diff --git a/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php b/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php index 01b33d2..8f7ffe8 100755 --- a/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php +++ b/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php @@ -5,9 +5,9 @@ { "key": 1, "listener": "click", "action": [ {"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "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"}, "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"}, "position": -1} ] } diff --git a/Theme/Backend/Components/PositionTagSelector/position-selector.tpl.php b/Theme/Backend/Components/PositionTagSelector/position-selector.tpl.php index 8255927..174a679 100755 --- a/Theme/Backend/Components/PositionTagSelector/position-selector.tpl.php +++ b/Theme/Backend/Components/PositionTagSelector/position-selector.tpl.php @@ -5,9 +5,9 @@ { "key": 1, "listener": "click", "action": [ {"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "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"}, "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"}, "position": -1} ] } diff --git a/Theme/Backend/department-list.tpl.php b/Theme/Backend/department-list.tpl.php index 81872dc..c77c49c 100755 --- a/Theme/Backend/department-list.tpl.php +++ b/Theme/Backend/department-list.tpl.php @@ -90,12 +90,12 @@ echo $this->getData('nav')->render(); ?> $value) : ++$c; - $url = UriFactory::build('organization/department/profile?{?}&id=' . $value->getId()); ?> + $url = UriFactory::build('{/lang}/{/app}/organization/department/profile?{?}&id=' . $value->getId()); ?> getId(); ?> printHtml($value->name); ?> - printHtml($value->parent->name); ?> - printHtml($value->unit->name); ?> + printHtml($value->parent->name); ?> + printHtml($value->unit->name); ?> diff --git a/Theme/Backend/position-list.tpl.php b/Theme/Backend/position-list.tpl.php index 6391773..32196b6 100755 --- a/Theme/Backend/position-list.tpl.php +++ b/Theme/Backend/position-list.tpl.php @@ -20,8 +20,8 @@ use phpOMS\Uri\UriFactory; */ $positions = $this->getData('positions') ?? []; -$previous = empty($positions) ? 'organization/position/list' : 'organization/position/list?{?}&id=' . \reset($positions)->getId() . '&ptype=p'; -$next = empty($positions) ? 'organization/position/list' : 'organization/position/list?{?}&id=' . \end($positions)->getId() . '&ptype=n'; +$previous = empty($positions) ? 'organization/position/list' : '{/lang}/{/app}/organization/position/list?{?}&id=' . \reset($positions)->getId() . '&ptype=p'; +$next = empty($positions) ? 'organization/position/list' : '{/lang}/{/app}/organization/position/list?{?}&id=' . \end($positions)->getId() . '&ptype=n'; echo $this->getData('nav')->render(); ?> @@ -87,8 +87,8 @@ echo $this->getData('nav')->render(); ?> getId(); ?> printHtml($value->name); ?> - printHtml($value->parent->name); ?> - printHtml($value->department->name); ?> + printHtml($value->parent->name); ?> + printHtml($value->department->name); ?> getHtml('Empty', '0', '0'); ?> diff --git a/Theme/Backend/unit-list.tpl.php b/Theme/Backend/unit-list.tpl.php index c4fd39b..cb73990 100755 --- a/Theme/Backend/unit-list.tpl.php +++ b/Theme/Backend/unit-list.tpl.php @@ -21,8 +21,8 @@ use phpOMS\Uri\UriFactory; */ $units = $this->getData('units') ?? []; -$previous = empty($units) ? 'organization/unit/list' : 'organization/unit/list?{?}&id=' . \reset($units)->getId() . '&ptype=p'; -$next = empty($units) ? 'organization/unit/list' : 'organization/unit/list?{?}&id=' . \end($units)->getId() . '&ptype=n'; +$previous = empty($units) ? 'organization/unit/list' : '{/lang}/{/app}/organization/unit/list?{?}&id=' . \reset($units)->getId() . '&ptype=p'; +$next = empty($units) ? 'organization/unit/list' : '{/lang}/{/app}/organization/unit/list?{?}&id=' . \end($units)->getId() . '&ptype=n'; echo $this->getData('nav')->render(); ?> @@ -84,14 +84,14 @@ echo $this->getData('nav')->render(); ?> $value) : - $url = UriFactory::build('organization/unit/profile?{?}&id=' . $value->getId()); ?> + $url = UriFactory::build('{/lang}/{/app}/organization/unit/profile?{?}&id=' . $value->getId()); ?> getId(); ?> <?= $this->getHtml('IMG_alt_profile'); ?> + UriFactory::build('{/lang}/{/app}/' . $value->image->getPath()); ?>"> printHtml($value->name); ?> - printHtml($value->parent->name); ?> + printHtml($value->parent->name); ?> diff --git a/Theme/Backend/unit-profile.tpl.php b/Theme/Backend/unit-profile.tpl.php index 3365c24..a61b497 100755 --- a/Theme/Backend/unit-profile.tpl.php +++ b/Theme/Backend/unit-profile.tpl.php @@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?> src="image instanceof NullMedia ? UriFactory::build('Web/Backend/img/user_default_' . \mt_rand(1, 6) .'.png') : - UriFactory::build('' . $unit->image->getPath()); ?>" + UriFactory::build('{/lang}/{/app}/' . $unit->image->getPath()); ?>" width="40x"> diff --git a/info.json b/info.json index bec9090..c5965e0 100755 --- a/info.json +++ b/info.json @@ -12,7 +12,7 @@ }, "creator": { "name": "Karaka", - "website": "www.spl1nes.com" + "website": "jingga.app" }, "description": "The business module.", "directory": "Organization",