From: hickert Date: Fri, 2 Nov 2007 13:46:43 +0000 (+0000) Subject: Added menu to departments X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=23fd2f467d1f970cafac0c73765f19d7418ff5e8;p=gosa.git Added menu to departments git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7718 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc index c4a1176fe..2055e6cfa 100644 --- a/plugins/admin/departments/class_departmentManagement.inc +++ b/plugins/admin/departments/class_departmentManagement.inc @@ -98,6 +98,16 @@ class departmentManagement extends plugin } } + /* Create options */ + if(isset($_POST['menu_action']) && $_POST['menu_action'] == "dep_new"){ + $s_action = "new"; + } + + /* handle remove from layers menu */ + if(isset($_POST['menu_action']) && preg_match("/^remvove_multiple/",$_POST['menu_action'])){ + $s_action = "del_multiple"; + } + /*************** Create a new department diff --git a/plugins/admin/departments/class_divListDepartment.inc b/plugins/admin/departments/class_divListDepartment.inc index 675c5b0a8..43171c777 100755 --- a/plugins/admin/departments/class_divListDepartment.inc +++ b/plugins/admin/departments/class_divListDepartment.inc @@ -121,25 +121,28 @@ class divListDepartment extends MultiSelectWindow /* Add default header */ $listhead = MultiSelectWindow::get_default_header(); - if(preg_match("/c/",$acl)){ - $listhead .= "  ". - "   "; - } - - $listhead .= "  ". " "._("Base")." ". "  "; - /* Multiple options */ - $listhead .= "  "; + /* Create Layers menu */ + $s = ".|"._("Actions")."|\n"; + $s .= "..|". + " "._("Create")."|\n"; + + /* Append create options */ + if(preg_match("/c/",$acl)) { + $s.= "...|". + " "._("Department")."|dep_new|\n"; + } + $s.= "..|---|\n"; + $s.= "..|". + " "._("Remove")."|"."remvove_multiple|\n"; - $listhead .="";; + $this->SetDropDownHeaderMenu($s); $this->SetListHeader($listhead); }