Code

Centralized copy & paste icon creation && permission checks
[gosa.git] / gosa-plugins / sudo / admin / sudo / class_divListSudo.inc
index 701218be50f4296a0940801ec00b77c53f2aa406..1b04937b0a30a73bcf539d4faa9e193e006f3f47 100644 (file)
@@ -168,14 +168,8 @@ class divListSudo extends MultiSelectWindow
       $acl    = $ui->get_permissions($val['dn'],"sudo/sudo");
       $acl_all= $this->ui->get_category_permissions($val['dn'],"sudo"); 
 
-      /* Add edit icon */
-      $actions= "";
-      if($ui->is_copyable($val['dn'],"sudo","sudo") && $this->parent->CopyPasteHandler){
-        $actions.= "<input class='center' type='image'
-          src='images/lists/copy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'>&nbsp;";
-      }else{
-        $actions.="<img src='images/empty.png' alt=' ' class='center'>&nbsp;";
-      }
+      /* 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")."'>";