From: hickert Date: Wed, 25 Jun 2008 08:04:34 +0000 (+0000) Subject: Updated department Management X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6a269e2bba1b917746e1fc7b2deb543ab259d118;p=gosa.git Updated department Management -Updated listing of entries. images source, alt tags etc. -Disabled alias and referal git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11433 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index 0ef47749b..5061b9838 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -53,7 +53,7 @@ class departmentManagement extends plugin function execute() { global $config; - + /* Call parent execute */ plugin::execute(); @@ -632,34 +632,35 @@ class departmentManagement extends plugin $types['organizationalUnit']['TAB'] = "DEPTABS"; $types['organizationalUnit']['ATTR'] = "ou"; $types['organizationalUnit']['OC'] = "organizationalUnit"; - $types['organizationalUnit']['IMG'] = "plugins/departments/images/department.png"; - $types['organizationalUnit']['IMG_FULL']= "plugins/departments/images/department.png"; + $types['organizationalUnit']['IMG'] = "images/lists/folder.png";//plugins/departments/images/department.png"; + $types['organizationalUnit']['IMG_FULL']= "images/lists/folder-full.png";//:wplugins/departments/images/department.png"; $types['organizationalUnit']['TITLE'] = _("Department"); $types['organizationalUnit']['TPL'] = "generic.tpl"; - /* Alias - */ - $types['alias']['ACL'] = "alias"; - $types['alias']['CLASS'] = "alias"; - $types['alias']['TAB'] = "ALIASTABS"; - $types['alias']['ATTR'] = "???"; - $types['alias']['OC'] = "???"; - $types['alias']['IMG'] = "plugins/departments/images/alias.png"; - $types['alias']['IMG_FULL']= "plugins/departments/images/alias.png"; - $types['alias']['TITLE'] = _("Alias"); - $types['alias']['TPL'] = "alias.tpl"; - - /* Referal - */ - $types['referal']['ACL'] = "referal"; - $types['referal']['CLASS'] = "referal"; - $types['referal']['TAB'] = "REFERALTABS"; - $types['referal']['ATTR'] = "???"; - $types['referal']['OC'] = "???"; - $types['referal']['IMG'] = "plugins/departments/images/referal.png"; - $types['referal']['IMG_FULL']= "plugins/departments/images/referal.png"; - $types['referal']['TITLE'] = _("Referal"); - $types['referal']['TPL'] = "referal.tpl"; + +# /* Alias +# */ +# $types['alias']['ACL'] = "alias"; +# $types['alias']['CLASS'] = "alias"; +# $types['alias']['TAB'] = "ALIASTABS"; +# $types['alias']['ATTR'] = "???"; +# $types['alias']['OC'] = "???"; +# $types['alias']['IMG'] = "plugins/departments/images/department_alias.png"; +# $types['alias']['IMG_FULL']= "plugins/departments/images/department_alias.png"; +# $types['alias']['TITLE'] = _("Alias"); +# $types['alias']['TPL'] = "alias.tpl"; +# +# /* Referal +# */ +# $types['referal']['ACL'] = "referal"; +# $types['referal']['CLASS'] = "referal"; +# $types['referal']['TAB'] = "REFERALTABS"; +# $types['referal']['ATTR'] = "???"; +# $types['referal']['OC'] = "???"; +# $types['referal']['IMG'] = "plugins/departments/images/department_referal.png"; +# $types['referal']['IMG_FULL']= "plugins/departments/images/department_referal.png"; +# $types['referal']['TITLE'] = _("Referal"); +# $types['referal']['TPL'] = "referal.tpl"; return($types); } diff --git a/gosa-core/plugins/admin/departments/class_divListDepartment.inc b/gosa-core/plugins/admin/departments/class_divListDepartment.inc index 8a8a868a2..ce26e767b 100644 --- a/gosa-core/plugins/admin/departments/class_divListDepartment.inc +++ b/gosa-core/plugins/admin/departments/class_divListDepartment.inc @@ -55,8 +55,6 @@ class divListDepartment extends MultiSelectWindow $this->EnableCloseButton(false); $this->EnableSaveButton (false); - - /* Toggle all selected / deselected */ $chk = ""; @@ -151,43 +149,18 @@ class divListDepartment extends MultiSelectWindow $s .= "..|". " "._("Create")."|\n"; - if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase ,"department/department"))) { - $s.= "...|". - " "._("Department")." (ou)|dep_new_ou|\n"; - - } - - if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase ,"department/organization"))) { - $s.= "...|". - " "._("Organization")." (o)|dep_new_o|\n"; - } - - if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase ,"department/country"))) { - $s.= "...|". - " "._("Country")." (c)"."|dep_new_c|\n"; - } - - if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase ,"department/locality"))) { - $s.= "...|". - " "._("Locality")." (l)|dep_new_l|\n"; - } - - if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase ,"department/dcObject"))) { - $s.= "...|". - " "._("Domain component")." (l)|dep_new_dc|\n"; + /* Add all createable department types + */ + $types = $this->parent->get_support_departments(); + foreach($types as $type){ + if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase ,"department/".$type['ACL']))){ + $s.= "...|". + " ".$type['TITLE']." (".$type['ATTR'].")|dep_new_".$type['ATTR']."|\n"; + } } - -# if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase ,"department/alias"))) { -# $s.= "...|". -# " "._("Alias")."|dep_new_alias|\n"; -# } -# -# if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase ,"department/referal"))) { -# $s.= "...|". -# " "._("Referal")."|dep_new_referal|\n"; -# } - + /* Add remove action + */ $s.= "..|---|\n"; $s.= "..|". " "._("Remove")."|"."remove_multiple|\n"; @@ -281,9 +254,11 @@ class divListDepartment extends MultiSelectWindow /* Create image */ if($sub_folders){ - $img = ""; + $img = "".$dep_data["; }else{ - $img = ""; + $img = "".$dep_data["; } /* Append data to the listing