From: hickert Date: Tue, 27 May 2008 13:05:17 +0000 (+0000) Subject: Updated suo actions X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ba40058e3fabefa4ecbf7bba3459b60322e3a603;p=gosa.git Updated suo actions git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11040 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc index 111d8f22d..9db39af79 100644 --- a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc +++ b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc @@ -99,7 +99,8 @@ class divListSudo extends MultiSelectWindow which are shown in the listbox on top of the listbox */ $base = sudo::get_sudoers_ou($this->config); - $acl = $this->ui->get_category_permissions($base,"sudo"); + $acl = $this->ui->get_permissions($base,"sudo/sudo"); + $acl_all= $this->ui->get_category_permissions($base,"sudo"); /* Add default header */ $listhead = MultiSelectWindow::get_default_header(false); @@ -122,31 +123,27 @@ class divListSudo extends MultiSelectWindow " "._("Remove")."|"."del_role|\n"; } - /* Add multiple copy & cut icons */ - if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl)){ + if(is_object($this->parent->CopyPasteHandler) && preg_match("/r/",$acl_all)){ $s.= "..|---|\n"; $s.= "..|". - " "._("Copy")."|"."multiple_copy_sudo|\n"; -# $s.= "..|". -# " "._("Cut")."|"."multiple_cut_sudo|\n"; - - if($this->parent->CopyPasteHandler->entries_queued()){ - $img = ""; - $s.="..|".$img." "._("Paste")."|editPaste|\n"; - }else{ - $img = ""; - $s.="..|".$img." "._("Paste")."\n"; - } + " "._("Copy")."|"."multiple_copy_systems|\n"; } + /* Copy & paste icons */ + if(is_object($this->parent->CopyPasteHandler) && $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)){ + if(preg_match("/(c.*w|w.*c)/",$acl_all)){ $s .= "..|---|\n"; $s .= $this->get_snapshot_header(TRUE); } - - + $this->SetDropDownHeaderMenu($s); $this->SetListHeader($listhead); } @@ -184,26 +181,29 @@ class divListSudo extends MultiSelectWindow /* Create action icons - copy & paste icons */ $acl = $ui->get_permissions($val['dn'],"sudo/sudo"); + $acl_all= $this->ui->get_category_permissions($val['dn'],"sudo"); /* Add edit icon */ - $actions = ""; - $actions= ""; - if(($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl)){ -# $actions.= " "; + if(preg_match("/r/",$acl_all) && $this->parent->CopyPasteHandler){ $actions.= " "; + src='images/lists/copy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> "; + }else{ + $actions.="  "; } - $actions.= ""; - if(preg_match("/(c.*w|w.*c)/",$acl)){ + /* Add snapshot icon */ + if(preg_match("/(r.*w|w.*r)/",$acl_all)){ $actions.= $this->GetSnapShotActions($val['dn']); + }else{ + $actions.="  "; + $actions.="  "; } + if(preg_match("/d/",$acl)){ $actions.= "";