Code

Unified delete pictograms
[gosa.git] / plugins / gofon / macro / class_gofonMacroManagement.inc
index 24e34e856404197ba0c1fa2c14e0909198bd4697..40f65bfc379e8935063a6a7604f0e99bc1f5fd66 100755 (executable)
@@ -334,7 +334,7 @@ class gofonMacro extends plugin
 
     /* Options */
     $action= "<input type='image' src='images/edit.png' alt='"._("edit")."'     name='user_edit_%KEY%' title='"._("Edit user")."'>";
-    $action.= "<input type='image' src='images/editdelete.png' alt='"._("delete")."'   name='user_del_%KEY%' title='"._("Delete user")."'>";
+    $action.= "<input type='image' src='images/edittrash.png' alt='"._("delete")."'   name='user_del_%KEY%' title='"._("Delete user")."'>";
 
     $divlist = new divlist("macrotabs");
     $divlist->SetHeader(array(
@@ -351,7 +351,20 @@ class gofonMacro extends plugin
     $linkopen = "<a href='?plug=".$_GET['plug']."&amp;act=dep_open&amp;dep_id=%s'>%s</a>";
 
     foreach($this->departments as $key=> $val){
-      $field1 = array("string" => "<img src='images/folder.png' alt='department'>");
+      
+      if(!isset($this->config->departments[trim($key)])){
+        $this->config->departments[trim($key)]="";
+      }
+
+      $non_empty="";
+      $keys= str_replace("/","\/",$key);
+      foreach($this->config->departments as $keyd=>$vald ){
+        if(preg_match("/".$keys."\/.*/",$keyd)){
+          $non_empty="full";
+        }
+      }
+
+      $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>");
       $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val));
       $field3 = array("string" => "&nbsp;");
       $field4 = array("string" => "&nbsp;", "attach" => "style='border:none'");
@@ -426,7 +439,7 @@ class gofonMacro extends plugin
     }
 
     /* Generate macro list */
-    $res= get_list($this->ui->subtreeACL, "(&(cn=$regex)(objectClass=goFonMacro))", TRUE, $base, array("*"), TRUE);
+    $res= get_list($this->ui->subtreeACL, "(&(cn=$regex)(objectClass=goFonMacro))", FALSE, "ou=macros,ou=asterisk,ou=config,".$base, array("*"), TRUE);
     $this->macros= $res;
 
     /* NEW LIST MANAGMENT