diff --git a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc
index 9db39af79ece08c935d962b5672fa5649ceb9445..924115d15b0fafb76ac53b631929f7146a41f75a 100644 (file)
*/
class divListSudo extends MultiSelectWindow
{
-
- /* Current base */
- private $departments = array();
-
/* Regex */
public $Regex = "*";
public $UserRegex = "*";
/* 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";
- $s.= "...|<input class='center' type='image' src='images/list_new_sudo.png' alt=''> "._("Default")."|new_default|\n";
+ $s.= "...|<input class='center' type='image' src='plugins/sudo/images/list_new_sudo.png' alt=''> "._("Role")."|new_role|\n";
+ $s.= "...|<input class='center' type='image' src='plugins/sudo/images/list_new_sudo.png' alt=''> "._("Default")."|new_default|\n";
}
/* Append multiple remove */
- if(preg_match("/d/",$acl)){
+ if(preg_match("/r/",$acl)){
$s.= "..|---|\n";
$s.= "..|<img src='images/lists/trash.png' alt='' border='0' class='center'>".
" "._("Remove")."|"."del_role|\n";
}
- if(is_object($this->parent->CopyPasteHandler) && preg_match("/r/",$acl_all)){
- $s.= "..|---|\n";
- $s.= "..|<img src='images/lists/copy.png' alt='' border='0' class='center'>".
- " "._("Copy")."|"."multiple_copy_systems|\n";
- }
-
- /* Copy & paste icons */
- if(is_object($this->parent->CopyPasteHandler) && $this->parent->CopyPasteHandler->entries_queued()){
- $img = "<img border='0' class='center' src='images/lists/paste.png' alt=''>";
- $s.="..|".$img." "._("Paste")."|editPaste|\n";
- }else{
- $img = "<img border='0' class='center' src='images/lists/paste-grey.png' alt=''>";
- $s.="..|".$img." "._("Paste")."\n";
- }
+ /* Add Copy & Paste header */
+ $s .= $this->parent->get_copypaste_header($this->selectedBase,$this->module);
/* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s .= "..|---|\n";
- $s .= $this->get_snapshot_header(TRUE);
- }
-
+ $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module);
+
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);
}
{
/* Prepare links */
$editlink = "<a href='?plug=".$_GET['plug']."&id=%s&act=edit_entry'>%s</a>";
- $userimg = "<img class='center' src='images/select_sudo.png' alt='Sudo' title='%s'>";
+ $userimg = "<img class='center' src='plugins/sudo/images/select_sudo.png' alt='Sudo' title='%s'>";
$ui = get_userinfo();
$action_col_size = 54;
$acl = $ui->get_permissions($val['dn'],"sudo/sudo");
$acl_all= $this->ui->get_category_permissions($val['dn'],"sudo");
- /* Add edit icon */
- $actions= "";
- if(preg_match("/r/",$acl_all) && $this->parent->CopyPasteHandler){
- $actions.= "<input class='center' type='image'
- src='images/lists/copy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
- }else{
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- }
+ /* Add copy & cut functionality */
+ $actions = $this->parent->get_copypaste_action($val['dn'],"sudo","sudo",TRUE,FALSE);
$actions.= "<input class='center' type='image'
src='images/lists/edit.png' alt='".msgPool::editButton()."' name='sudo_edit_%KEY%' title='"._("Edit this entry")."'>";
/* Add snapshot icon */
- if(preg_match("/(r.*w|w.*r)/",$acl_all)){
- $actions.= $this->GetSnapShotActions($val['dn']);
- }else{
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
- }
-
+ $actions.= $this->parent->get_snapshot_action($val['dn'],$this->module);
if(preg_match("/d/",$acl)){
$actions.= "<input class='center' type='image'
src='images/lists/trash.png' alt='".msgPool::delButton()."' name='sudo_del_%KEY%' title='"._("Delete this entry")."'>";
}
- $title = "title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'";
+ $title = "title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'";
if(!isset($val['description'][0])){
$desc = "";
/* Create summary string for list footer */
$num = count($list);
$num_str = _("Number of listed roles");
- $str = "<img class='center' src='images/select_sudo.png'
+ $str = "<img class='center' src='plugins/sudo/images/select_sudo.png'
title='".$num_str."' alt='".$num_str."'> ".$num." ";
$this->set_List_Bottom_Info($str);
}