Code

Added diffrent pictures if department is empty .. or contains another dep..
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 2 Aug 2005 13:10:46 +0000 (13:10 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 2 Aug 2005 13:10:46 +0000 (13:10 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1050 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/applications/class_applicationManagement.inc
plugins/admin/groups/class_groupManagement.inc
plugins/admin/ogroups/class_ogroupManagement.inc
plugins/admin/systems/class_systemManagement.inc
plugins/admin/users/class_userManagement.inc
plugins/gofax/blocklists/class_blocklistManagement.inc
plugins/gofon/macro/class_gofonMacroManagement.inc

index 4ac2c0ca080031c6615f6744a53da9aae54a2c53..ba24827b6a084ffe6c574bb50ce2839bba111ca3 100644 (file)
@@ -371,7 +371,19 @@ class applicationManagement extends plugin
 
         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;","attach"=>"style='text-align:right;border:none'");
 
index cc4a0d0d7dffb724c0cdd173d1b75a429283242a..1ee8e268c8c28a8d0765851d2cc0c53678ca05e6 100644 (file)
@@ -402,7 +402,20 @@ class groupManagement extends plugin
 
     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='text-align:right;border:none'");
index 060d36c0ab4cb71349724da77653a3b4a417c44c..e7b70cf2a3f2a12ebb1b4f3ba6d89f23c33d4e1a 100644 (file)
@@ -408,7 +408,21 @@ name='dep_root' alt='"._("Root")."'>&nbsp;".
 
     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='text-align:right;border:none'");
index c6195ce8b123333e310d7cbe6ac63518c2b123f9..0d8f03731506bbb992d9a879d640f5c28663c161 100644 (file)
@@ -561,7 +561,20 @@ class systems 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;", "attach" => "style='border:none'");
       $divlist->AddEntry(array($field1,$field2,$field3));
index 9e60df1662052f3229b90c2a1a4f63f1fdb2c3c3..d3b7dcc8708bb8ced67e9a2d21f5df9585e41213 100644 (file)
@@ -649,13 +649,28 @@ class userManagement extends plugin
     $linkopen = "<a href='?plug=".$_GET['plug']."&amp;act=dep_open&amp;dep_id=%s'>%s</a>";
 
     foreach($this->departments as $key=> $val){
+      
+      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/folder.png' alt='department'>");
+
+
+
+      $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'");
 
-      
+
       $divlist->AddEntry(array($field1,$field2,$field3,$field4));
     }
 
index bd8f9a7a8359d645b0c869fb206a45e298fbb17c..4ca1d9d5ac7f3cfc8dea6b885d109141e641b6ec 100644 (file)
@@ -32,7 +32,6 @@ class blocklist extends plugin
 
     /* Get global filter config */
     if (!is_global("blockfilter")){
-      print_a($_SESSION['blocklist']);
       $uii= get_userinfo();
       $base= get_base_from_people($ui->dn);
       $blockfilter= array("sendlists" => "checked",
@@ -315,7 +314,19 @@ class blocklist extends plugin
       // Defining Links
       $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;", "attach" => "style='border:none'");
         $divlist->AddEntry(array($field1,$field2,$field3));
index 24e34e856404197ba0c1fa2c14e0909198bd4697..5c64bb4bde0e5ac12fa68ca53dd0ba4a21523502 100755 (executable)
@@ -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'");