X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Fplugins%2Fadmin%2Fdepartments%2Fclass_departmentManagement.inc;h=79ec8eb4fbe3a89167fe106d6700f61c8f83b53d;hb=f4a6588f33b5886afaa20db8b01517b8eafbafed;hp=2239e5a964fb02f819ed479b9f7430dbe585c276;hpb=0c1fce28a7e39ee7c367eeda663f7e0b0a1f48f1;p=gosa.git diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index 2239e5a96..79ec8eb4f 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -22,14 +22,14 @@ class departmentManagement extends management { - var $plHeadline = "Departments"; - var $plDescription = "Manage Departments"; + var $plHeadline = "Directory structure"; + var $plDescription = "Manage organizations, organizational units, localities, countries and more"; var $plIcon = "plugins/departments/images/plugin.png"; // Tab definition protected $tabClass = "deptabs"; protected $tabType = "DEPTABS"; - protected $aclCategory = "departement"; + protected $aclCategory = "department"; protected $aclPlugin = "generic"; protected $objectName = "department"; @@ -44,6 +44,7 @@ class departmentManagement extends management } else { $filter = new filter(get_template_path("dep-filter.xml", true)); } + $filter->setObjectStorage(array('')); // Build headpage $headpage = new listing(get_template_path("dep-list.xml", true)); @@ -52,10 +53,10 @@ class departmentManagement extends management $this->setFilter($filter); // Add copy&paste and snapshot handler. - if ($this->config->boolValueIsTrue("main", "copyPaste")){ + if ($this->config->boolValueIsTrue("core", "copyPaste")){ $this->cpHandler = new CopyPasteHandler($this->config); } - if($this->config->get_cfg_value("enableSnapshots") == "true"){ + if($this->config->get_cfg_value("core","enableSnapshots") == "true"){ $this->snapHandler = new SnapshotHandler($this->config); } @@ -113,21 +114,28 @@ class departmentManagement extends management $str = management::saveChanges(); if(!empty($str)) return($str); + $plugname = (isset($this->last_tabObject->base_name))? $this->last_tabObject->base_name : ''; + + $this->refreshDeps(); + if(isset($this->last_tabObject->by_object[$plugname]) && + is_object($this->last_tabObject->by_object[$plugname]) && + $this->last_tabObject->by_object[$plugname]->must_be_tagged()){ + $smarty = get_smarty(); + $smarty->assign("src","?plug=".$_GET['plug']."&TagDepartment&no_output_compression"); + $smarty->assign("message",_("As soon as the tag operation has finished, you can scroll down to end of the page and press the 'Continue' button to continue with the department management dialog.")); + return($smarty->fetch(get_template_path("dep_iframe.tpl",TRUE))); + } + } + + function refreshDeps() + { global $config; $config->get_departments(); $config->make_idepartments(); $this->config = $config; $headpage = $this->getHeadpage(); $headpage->refreshBasesList(); - - $plugname = $this->last_tabObject->base_name; - if($this->last_tabObject->by_object[$plugname]->must_be_tagged()){ - $smarty = get_smarty(); - $smarty->assign("src","?plug=".$_GET['plug']."&TagDepartment&no_output_compression"); - $smarty->assign("message",_("As soon as the tag operation has finished, you can scroll down to end of the page and press the 'Continue' button to continue with the department management dialog.")); - return($smarty->fetch(get_template_path("dep_iframe.tpl",TRUE))); - } } @@ -151,13 +159,21 @@ class departmentManagement extends management static function filterDepLabel($row,$dn,$params,$ou,$pid,$base) { $ou = $ou[0]; - if($dn == $base){ + if(LDAP::convert($dn) == $base){ $ou ="."; } $dn= LDAP::fix(func_get_arg(1)); return("$ou"); } + + // Finally remove departments and update departmnet browsers + function removeEntryConfirmed($action="",$target=array(),$all=array(),$altTabClass="", + $altTabType="",$altAclCategory="", $aclPlugin="") + { + management::removeEntryConfirmed($action,$target,$all, $altTabClass,$altTabType,$altAclCategory); + $this->refreshDeps(); + } /*! \brief Returns information about all container types that GOsa con handle. @return Array Informations about departments supported by GOsa.