summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ceeec2d)
raw | patch | inline | side by side (parent: ceeec2d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Apr 2008 09:22:28 +0000 (09:22 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Apr 2008 09:22:28 +0000 (09:22 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10107 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/sudo/class_divListSudo.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/sudo/class_divListSudo.inc b/gosa-core/plugins/admin/sudo/class_divListSudo.inc
index a52c22f19491a5b40c8c3184024cd981257edd5b..29de823902920318b47c1693b01979e6023731fb 100644 (file)
/* Dynamic action col, depending on snapshot icons */
$action_col_size = 80;
- if($this->parent->snapshotEnabled()){
- $action_col_size += 38;
- }
/* Toggle all selected / deselected */
$chk = "<input type='checkbox' id='select_all' name='select_all'
$this->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 */
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 */
$s .= "..|<img src='images/list_new.png' alt='' border='0' class='center'>".
" "._("Create")."|\n";
-
/* Append create options */
if(preg_match("/c/",$acl)) {
$s.= "...|<input class='center' type='image' src='images/list_new_sudo.png' alt=''> "._("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.= "..|<img src='images/editcopy.png' alt='' border='0' class='center'>".
-# " "._("Copy")."|"."multiple_copy_systems|\n";
-# $s.= "..|<img src='images/editcut.png' alt='' border='0' class='center'>".
-# " "._("Cut")."|"."multiple_cut_systems|\n";
-#
-# if($this->parent->CopyPasteHandler->entries_queued()){
-# $img = "<img border='0' class='center' src='images/editpaste.png' alt=''>";
-# $s.="..|".$img." "._("Paste")."|editPaste|\n";
-# }else{
-# $img = "<img border='0' class='center' src='images/cant_editpaste.png' alt=''>";
-# $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.= "..|<img src='images/edittrash.png' alt='' border='0' class='center'>".
+ " "._("Remove")."|"."remove_multiple|\n";
+ }
$this->SetDropDownHeaderMenu($s);
-
$this->SetListHeader($listhead);
}
+
function execute()
{
$this->ClearElementsList();
$this->GenHeader();
}
+
function setEntries($list)
{
/* Prepare links */
}
$display = $val['cn'][0].$desc;
-
- $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
+ $field1 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
"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 = "<img class='center' src='images/select_groups.png'
- title='".$num_grp_str."' alt='".$num_grp_str."'> ".$num_grps." ";
- $str.= "<img class='center' src='images/folder.png'
- title='".$num_dep_str."' alt='".$num_dep_str."'> ".$num_deps." ";
-
+ $num_grps = count($groups);
+ $num_grp_str = _("Number of listed roles");
+ $str = "<img class='center' src='images/select_sudo.png'
+ title='".$num_grp_str."' alt='".$num_grp_str."'> ".$num_grps." ";
$this->set_List_Bottom_Info($str);
-
}
function Save()