X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Faddons%2Fgotomasses%2Fclass_gotomasses.inc;h=4a58ca9c8db74179e8499b15c506f28239f3e579;hb=c90e32c493a5d7bd5496418b19a0f2b796dd8c06;hp=72e6bab044b2dcf8d841652a3075fe61b2af67a4;hpb=df50b0dab91558f569170b9bae0663200de076d7;p=gosa.git diff --git a/plugins/addons/gotomasses/class_gotomasses.inc b/plugins/addons/gotomasses/class_gotomasses.inc index 72e6bab04..4a58ca9c8 100644 --- a/plugins/addons/gotomasses/class_gotomasses.inc +++ b/plugins/addons/gotomasses/class_gotomasses.inc @@ -18,7 +18,7 @@ class gotomasses extends plugin var $current =false; var $dialog = FALSE; var $ids_to_remove = array(); - + var $divlist = NULL; function gotomasses(&$config, $dn= NULL) { @@ -31,7 +31,6 @@ class gotomasses extends plugin if(!empty($file)){ $this->data_file = $file; } - $this->load_gotomasses_data(); } @@ -176,73 +175,9 @@ class gotomasses extends plugin * Handle Divlist ************/ - $plug = $_GET['plug']; - $divlist = new MultiSelectWindow($this->config,"GotoMasses","gotomassses"); - $divlist->SetSummary(_("List of system deployment tasks")); - $divlist->SetHeadpageMode(); - $divlist->EnableCloseButton(FALSE); - $divlist->EnableSaveButton(FALSE); - $divlist->SetInformation(_("This menu allows you to add, remove and change the properties of system deployment tasks.")); - - /* Display add button if allowed */ - $header = "
"; - if($this->acl_is_createable()){ - $header .= " "; - } - - /* Display add button if allowed */ - if($this->acl_is_removeable()){ - $header .= " "; - } - $header .= "
"; - - /* Get Permissions */ - $ui = get_userinfo(); - $acls = $this->getacl(""); - foreach($ui->get_module_departments("gotomasses") as $dep){ - $acls .= $ui->get_category_permissions($dep,"gotomasses"); - } - - /* Create divlist */ - $divlist->SetListHeader($header); - - /* Toggle all selected / deselected */ - $chk = ""; - - /* set Page header */ - $divlist->AddHeader(array("string"=> $chk, "attach"=>"style='width:20px;'")); - - $divlist->AddHeader(array("string"=>""._("Target")."")); - $divlist->AddHeader(array("string"=>""._("Schedule")."", - "attach"=>"style='width:100px;'")); - $divlist->AddHeader(array("string"=>""._("Type")."", - "attach"=>"style='width:80px;'")); - $divlist->AddHeader(array("string"=>_("Action"), - "attach"=>"style='border-right:0px;width:40px;'")); - - /* Create edit link */ - $edit_link = "
%str%
"; - - if(!empty($acls)){ - foreach($this->tasks as $key => $task){ - $action = ""; - if($this->acl_is_removeable()){ - $action.= ""; - } - /* Create each field */ - $field0 = array("string" => "" , - "attach" => "style='width:20px;'"); - - $field1 = array("string" => preg_replace(array("/%key%/","/%str%/"),array($key,$this->target_to_string($task)),$edit_link)); - $field2 = array("string" => $this->time_to_string($task),"attach" => "style='width:100px;'"); - $field3 = array("string" => $this->action_to_string($task),"attach" => "style='width:80px;'"); - $field4 = array("string" => $action,"attach" => "style='text-align:right;width:40px;border-right:0px;'"); - $divlist->AddElement(array($field0,$field1,$field2,$field3,$field4)); - } - } - - return($divlist->Draw()); + $list = new divListMasses($this->config,$this); + $list->SetEntries($this->tasks); + return($list->Draw()); }