diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 6298c70..ea64463 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -17,6 +17,7 @@ namespace Modules\Organization\Controller; use Modules\Organization\Models\Department; use Modules\Organization\Models\DepartmentMapper; use Modules\Organization\Models\Position; +use Modules\Organization\Models\NullPosition; use Modules\Organization\Models\PositionMapper; use Modules\Organization\Models\Unit; use Modules\Organization\Models\UnitMapper; @@ -168,7 +169,7 @@ final class BackendController extends Controller $parent = $component->parent->getId(); if (!($component instanceof Position) // parent could be in different department then ignore - || $component->parent->department->getId() === $component->department->getId() + || (!($component->parent instanceof NullPosition) && $component->parent->department->getId() === $component->department->getId()) ) { if (!isset($tree[$ref][$parent])) { $tree[$ref][$parent] = ['obj' => null, 'children' => [], 'index' => 0]; diff --git a/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php b/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php index 2f0e895..fc52f4a 100755 --- a/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php +++ b/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php @@ -1,10 +1,10 @@
| ID | Name | ||||||||||||||||||||||||||||||||||||
| @@ -38,8 +38,8 @@ - |
| ID | Name | ||||||||||||||||||||||||||||||||
| @@ -38,8 +38,8 @@ - |
| ID | Name | ||||||||||||||||||||||||||||
| @@ -38,8 +38,8 @@ - | |||||||||||||||||||||||||||||
| = $this->printHtml($value->getId()); ?> + | = $value->getId(); ?> | = $this->printHtml($value->name); ?> | = $this->printHtml($value->parent->name); ?> | = $this->printHtml($value->unit->name); ?>
diff --git a/Theme/Backend/organigram.tpl.php b/Theme/Backend/organigram.tpl.php
index b7539a9..e6c7e82 100755
--- a/Theme/Backend/organigram.tpl.php
+++ b/Theme/Backend/organigram.tpl.php
@@ -33,7 +33,7 @@ $unitRoot = $unitTree[null][0]['children'];
getId(); ?>
- = $unitEle['obj']->getName(); ?> = $unitEle['obj']->name; ?>
- = $depEle['obj']->getName(); ?>
+ = $depEle['obj']->name; ?>
@@ -64,7 +64,7 @@ $unitRoot = $unitTree[null][0]['children'];
}
$c = 0; while (!empty($posEle)) { ?>
- = $this->getData('department-selector')->render('iDepartment', 'department', false); ?>
|
|
| = $this->getData('editor')->render('position-editor'); ?>
| = $this->getData('editor')->getData('text')->render('position-editor', 'description', 'fPositionCreate'); ?>
diff --git a/Theme/Backend/position-list.tpl.php b/Theme/Backend/position-list.tpl.php
index f65fb87..2504d4e 100755
--- a/Theme/Backend/position-list.tpl.php
+++ b/Theme/Backend/position-list.tpl.php
@@ -40,7 +40,7 @@ echo $this->getData('nav')->render(); ?>
$value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/position/profile?{?}&id=' . $value->getId()); ?>
| = $this->printHtml($value->getId()); ?>
+ | = $value->getId(); ?>
| = $this->printHtml($value->name); ?>
| = $this->printHtml($value->parent->name); ?>
| = $this->printHtml($value->department->name); ?>
diff --git a/Theme/Backend/unit-create.tpl.php b/Theme/Backend/unit-create.tpl.php
index 8f53e27..c5b8f5e 100755
--- a/Theme/Backend/unit-create.tpl.php
+++ b/Theme/Backend/unit-create.tpl.php
@@ -34,8 +34,8 @@ echo $this->getData('nav')->render(); ?>
| = $this->getData('unit-selector')->render('iParent', 'parent', false); ?>
|
|
| = $this->getData('editor')->render('unit-editor'); ?>
| = $this->getData('editor')->getData('text')->render('unit-editor', 'description', 'fUnitCreate'); ?>
diff --git a/Theme/Backend/unit-list.tpl.php b/Theme/Backend/unit-list.tpl.php
index 54fd308..85ec648 100755
--- a/Theme/Backend/unit-list.tpl.php
+++ b/Theme/Backend/unit-list.tpl.php
@@ -41,7 +41,7 @@ echo $this->getData('nav')->render(); ?>
$value) :
$url = UriFactory::build('{/prefix}organization/unit/profile?{?}&id=' . $value->getId()); ?>
| = $this->printHtml($value->getId()); ?>
+ | = $value->getId(); ?>
|
diff --git a/Theme/Backend/unit-profile.tpl.php b/Theme/Backend/unit-profile.tpl.php
index da9d7f9..bb005bc 100755
--- a/Theme/Backend/unit-profile.tpl.php
+++ b/Theme/Backend/unit-profile.tpl.php
@@ -53,8 +53,8 @@ echo $this->getData('nav')->render(); ?>
= $this->getData('unit-selector')->render('iParent', 'parent', false); ?>
|
|
| = $this->getData('editor')->render('unit-editor'); ?>
| = $this->getData('editor')->getData('text')->render(
| |