From 639868667689b3176a41318f57f21de8cb62d46c Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 26 Feb 2008 14:26:37 +0000 Subject: [PATCH] Updated gotmasses git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9129 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../addons/gotomasses/class_gotomasses.inc | 49 +++++-------------- 1 file changed, 12 insertions(+), 37 deletions(-) diff --git a/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc b/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc index d7043005a..47d78b40f 100644 --- a/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc +++ b/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc @@ -44,17 +44,15 @@ class gotomasses extends plugin $s_entry = $s_action = ""; $arr = array( "/^stop_/" => "stop", - "/^stop_all/" => "stop_all", "/^start_/" => "start", - "/^start_all/" => "start_all", "/^prio_up_/" => "prio_up", "/^prio_down_/" => "prio_down", "/^edit_task_/" => "edit", "/^remove_task_/" => "remove", - "/^new_task_/" => "new_task", - "/^remove_multiple_task_/" => "remove_multiple"); + "/^new_task_/" => "new_task");; + foreach($arr as $regex => $action){ foreach($_POST as $name => $value){ @@ -247,6 +245,15 @@ class gotomasses extends plugin foreach($this->events['BY_CLASS'] as $name => $event){ $s.= "...|".$event['MenuImage']." ".$event['s_Menu_Name']."|add_event_".$name."\n"; } + if($this->acl_is_removeable()){ + $s.= "..|---|\n"; + $s.= "..| "._("Remove")."|remove_multiple\n"; + } + if(preg_match("/w/",$this->getacl(""))){ + $s.= "..|---|\n"; + $s.= "..| "._("Start all")."|start_all\n"; + $s.= "..| "._("Stop all")."|stop_all\n"; + } $divlist->SetDropDownHeaderMenu($s); @@ -261,19 +268,8 @@ class gotomasses extends plugin if($this->sort_by == "Schedule"){ $sort_img_3 = $sort_img; } else { $sort_img_3 = "" ;} if($this->sort_by == "Action"){ $sort_img_4 = $sort_img; } else { $sort_img_4 = "" ;} - /* Display add button if allowed */ - $header = "
"; - if($this->acl_is_removeable()){ - $header .= " "; - } - if(preg_match("/w/",$this->getacl(""))){ - $header .= " "; - $header .= " "; - } - $header .= "
"; - /* Create divlist */ - $divlist->SetListHeader($header); + $divlist->SetListHeader(""); $plug = $_GET['plug']; $chk = "config->get_ldap_link(); - $ldap->cd($this->config->current['BASE']); - $ldap->search("(&(objectClass=gosaGroupOfNames)(cn=*))",array("cn")); - while($attrs = $ldap->fetch()){ - $ret[$attrs['cn'][0]] = $attrs['cn'][0]; - } - return($ret); - } - - function save() { // We do not save anything here. @@ -552,13 +534,6 @@ class gotomasses extends plugin "plSection" => array("addon"), "plCategory" => array("gotomasses" => array("objectClass" => "none", "description" => _("System mass deployment"))), "plProvidedAcls" => array("Comment" => _("Description"), - "Action" => _("Action"), - "Day" => _("Day"), - "Minute" => _("Minute"), - "Hour" => _("Hour"), - "Month" => _("Month"), - "Weekday" => _("Week day"), - "Target" => _("Target")) )); } } -- 2.30.2