diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc
index 781744d20e6f32ec2410c47b7207baf7646a317d..84382e4e3be9cad97338a1f75d92eee08518eb74 100644 (file)
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";
} 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));
function editEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
{
$types= $this->get_support_departments();
- $type = $this->headpage->getType($target[0]);
+ $headpage = $this->getHeadpage();
+ $type = $headpage->getType($target[0]);
return(management::editEntry($action,$target,$all,$this->tabClass,$types[$type]['TAB'],$this->aclCategory));
}
// Overriden save handler - We've to take care about the department tagging here.
protected function saveChanges()
{
- management::saveChanges();
-
- global $config;
- $config->get_departments();
- $config->make_idepartments();
- $this->config = $config;
+ $str = management::saveChanges();
+ if(!empty($str)) return($str);
+ $this->refreshDeps();
$plugname = $this->last_tabObject->base_name;
if($this->last_tabObject->by_object[$plugname]->must_be_tagged()){
$smarty = get_smarty();
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();
+ }
// An action handler which enables to switch into deparmtment by clicking the names.
function openEntry($action,$entry)
{
- $this->headpage->setBase(array_pop($entry));
+ $headpage = $this->getHeadpage();
+ $headpage->setBase(array_pop($entry));
}
return("<a href='?plug=".$_GET['plug']."&PID=$pid&act=listing_open_$row' title='$dn'>$ou</a>");
}
+
+ // 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.