Code

Fixed icons of member objects in object group overview.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 20 Nov 2006 07:58:13 +0000 (07:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 20 Nov 2006 07:58:13 +0000 (07:58 +0000)
Fixed Copy & Paste and Snapshot icon acls

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5159 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/ogroups/class_divListOGroup.inc
plugins/admin/ogroups/class_ogroupManagement.inc

index 69e6ce20738473cd3497846c822f3eb65cdc7ede..3c6ed8e66e96cfa005551e3311aa3cdb11da8f4f 100755 (executable)
@@ -110,7 +110,9 @@ class divListOGroup extends MultiSelectWindow
     }
 
     /* Get copy & paste icon */
-    if(preg_match("/w/",$ui->get_permissions($this->selectedBase,"ogroups/ogroup")) &&  $this->parent->CopyPasteHandler){
+    $acls  = $ui->get_permissions($this->selectedBase,"ogroups/ogroup");
+    $acl_all= $ui->has_complete_category_acls($this->selectedBase,"groups");
+    if(preg_match("/(c.*w|w.*c)/",$acl_all) &&  $this->parent->CopyPasteHandler){
       $Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon();
     }else{
       $Copy_Paste ="";
@@ -128,8 +130,8 @@ class divListOGroup extends MultiSelectWindow
       title='"._("Reload list")."' name='submit_department' alt='"._("Submit")."'>&nbsp;".
       " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;";
 
-    $acls  = $ui->get_permissions($this->selectedBase,"ogroups/ogroup");
-    if(preg_match("/c/",$acls) && preg_match("/w/",$acls)){
+
+    if(preg_match("/(c.*w|w.*c)/",$acl_all)){
       $listhead .= $this->get_snapshot_header($this->selectedBase);
     }else{
       $listhead .= "<img class='center' src='images/restore_grey.png' alt=''>&nbsp;";
@@ -180,18 +182,18 @@ class divListOGroup extends MultiSelectWindow
 
       /* Create action icons */
       $actions= "";
-      if($this->parent->CopyPasteHandler && preg_match("/w/",$ui->get_category_permissions($val['dn'],"ogroups"))){
+      $acl_all= $ui->has_complete_category_acls($val['dn'],"groups");
+      if(($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){
         $actions.= "<input class='center' type='image'
           src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'>&nbsp;";
         $actions.= "<input class='center' type='image'
           src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'>&nbsp;";
       }
 
-
       $actions.= "<input class='center' type='image'
         src='images/edit.png' alt='"._("edit")."' name='group_edit_%KEY%' title='"._("Edit this entry")."'>";
     
-      if(preg_match("/w/",$ui->get_permissions($val['dn'],"groups/group"))){
+      if(preg_match("/(c.*w|w.*c)/", $acl_all)){
         $actions.= $this->GetSnapShotActions($val['dn']);
       }
 
@@ -199,7 +201,7 @@ class divListOGroup extends MultiSelectWindow
         $actions.= "<input class='center' type='image'
           src='images/edittrash.png' alt='"._("delete")."' name='group_del_%KEY%' title='"._("Delete this entry")."'>";
       }else{
-        $action.= "<img class='center' src='images/empty.png' alt='&nbsp;'
+        $actions.= "<img class='center' src='images/empty.png' alt='&nbsp;'
           title='"._("You are not allowed to remove this entry.")."'>";
       }
 
index f3a3ad2593eb9f6bb10cf2e6821a0b876f9d1251..4883ecbb2074ef65356c3e1635084c04cdac2103 100644 (file)
@@ -366,11 +366,13 @@ class ogroupManagement extends plugin
       $p1['tit']= $conv[$type[0]][1];
       $p1['alt']= $type[0];
       $p1['lnk']= $conv[$type[0]][2];
+      $html_object_1 = "<input type='image' name='".$p1['lnk']."_group_edit_%KEY' ";
     } else {
       $p1['pic']= "empty.png";
       $p1['tit']= "";
       $p1['alt']= "";
       $p1['lnk']= "";//$conv[$type[0]][2];
+      $html_object_1 = "<img ";
     }
 
     if (isset($type[1])){
@@ -378,15 +380,20 @@ class ogroupManagement extends plugin
       $p2['alt']= $type[1];
       $p2['tit']= $conv[$type[1]][1];
       $p2['lnk']= $conv[$type[1]][2];
+      $html_object_2 = "<input type='image' name='".$p2['lnk']."_group_edit_%KEY' ";
     } else {
       $p2['pic']= "empty.png";
       $p2['alt']= "";
       $p2['tit']= "";
       $p2['lnk']= ""; //$conv[$type[0]][2];
+      $html_object_2 = "<img ";
     }
-    $temp = "<input type='image' name='".$p1['lnk']."_group_edit_%KEY' class='center' 
+    
+    $html_object_1 = "<input type='image' ";
+      
+    $temp = $html_object_1." class='center' id='iconA".preg_replace("/_/","",$p1['lnk']."_group_edit_%KEY")."' 
       src='images/".$p1['pic']."' alt='".$p1['alt']."' title='".$p1['tit']."'>";
-    $temp.= "<input type='image' name='".$p2['lnk']."_group_edit_%KEY'class='center
+    $temp.= $html_object_2." class='center' id='iconB".preg_replace("/_/","",$p2['lnk']."_group_edit_%KEY")."
       src='images/".$p2['pic']."' alt='".$p2['alt']."' title='".$p2['tit']."'>";
     return ($temp);
   }