From: hickert Date: Wed, 2 Apr 2008 09:22:28 +0000 (+0000) Subject: Updated sudo divlist X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7c0000ed8862dce6a8b3590a51ee95fac6e7ebc1;p=gosa.git Updated sudo divlist git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10107 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/sudo/class_divListSudo.inc b/gosa-core/plugins/admin/sudo/class_divListSudo.inc index a52c22f19..29de82390 100644 --- a/gosa-core/plugins/admin/sudo/class_divListSudo.inc +++ b/gosa-core/plugins/admin/sudo/class_divListSudo.inc @@ -58,9 +58,6 @@ class divListSudo extends MultiSelectWindow /* Dynamic action col, depending on snapshot icons */ $action_col_size = 80; - if($this->parent->snapshotEnabled()){ - $action_col_size += 38; - } /* Toggle all selected / deselected */ $chk = "AddHeader(array("string"=> $chk, "attach"=>"style='width:20px;'")); $this->AddHeader(array("string"=>" ","attach"=>"style='width:20px;'")); $this->AddHeader(array("string"=>_("Name")." / "._("Department"))); - $this->AddHeader(array("string"=>_("Properties"),"attach"=>"style='width:136px;'")); $this->AddHeader(array("string"=>_("Actions"),"attach"=>"style='width:".$action_col_size."px;border-right:0px;'")); /* Add SubSearch checkbox */ @@ -88,7 +84,6 @@ class divListSudo extends MultiSelectWindow which are shown in the listbox on top of the listbox */ $base = $this->parent->base; - $acl = $this->ui->get_category_permissions($base,"sudo"); /* Add default header */ @@ -99,46 +94,30 @@ class divListSudo extends MultiSelectWindow $s .= "..|". " "._("Create")."|\n"; - /* Append create options */ if(preg_match("/c/",$acl)) { $s.= "...| "._("Role")."|new_role|\n"; } -# /* Add multiple copy & cut icons */ -# if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){ -# $s.= "..|---|\n"; -# $s.= "..|". -# " "._("Copy")."|"."multiple_copy_systems|\n"; -# $s.= "..|". -# " "._("Cut")."|"."multiple_cut_systems|\n"; -# -# if($this->parent->CopyPasteHandler->entries_queued()){ -# $img = ""; -# $s.="..|".$img." "._("Paste")."|editPaste|\n"; -# }else{ -# $img = ""; -# $s.="..|".$img." "._("Paste")."\n"; -# } -# } -# -# /* Add snapshot icons */ -# if(preg_match("/(c.*w|w.*c)/",$acl_all)){ -# $s .= "..|---|\n"; -# $s .= $this->get_snapshot_header(TRUE); -# } + /* Append multiple remove */ + if(preg_match("/d/",$acl)){ + $s.= "..|---|\n"; + $s.= "..|". + " "._("Remove")."|"."remove_multiple|\n"; + } $this->SetDropDownHeaderMenu($s); - $this->SetListHeader($listhead); } + function execute() { $this->ClearElementsList(); $this->GenHeader(); } + function setEntries($list) { /* Prepare links */ @@ -173,34 +152,24 @@ class divListSudo extends MultiSelectWindow } $display = $val['cn'][0].$desc; - - $field0 = array("string" => "" , + $field1 = array("string" => "" , "attach" => "style='width:20px;'"); - $field1 = array("string" => sprintf($userimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'"); - $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' ".$title); - $field3 = array("string" => preg_replace("/%KEY%/", $key, $posix." ".$enviro." ".$mail." ".$samba." ".$appl." ".$phone), "attach" => "style='width:136px;'"); - $field4 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"); - - $this->AddElement(array($field0,$field1,$field2,$field3,$field4)); + $field2 = array("string" => sprintf($userimg,$val['dn']), + "attach" => "style='text-align:center;width:20px;'"); + $field3 = array("string" => sprintf($editlink,$key,$display), + "attach" => "style='' ".$title); + $field4 = array("string" => preg_replace("/%KEY%/", $key, $actions), + "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"); + + $this->AddElement(array($field1,$field2,$field3,$field4)); } /* Create summary string for list footer */ - $num_deps=0; - if(!$this->SubSearch){ - $num_deps = count($this->Added_Departments); - } - $num_grps = count($groups); - - $num_grp_str = _("Number of listed groups"); - $num_dep_str = _("Number of listed departments"); - - $str = "".$num_grp_str." ".$num_grps."    "; - $str.= "".$num_dep_str." ".$num_deps."    "; - + $num_grps = count($groups); + $num_grp_str = _("Number of listed roles"); + $str = "".$num_grp_str." ".$num_grps." "; $this->set_List_Bottom_Info($str); - } function Save()