From: hickert Date: Tue, 2 Aug 2005 13:10:46 +0000 (+0000) Subject: Added diffrent pictures if department is empty .. or contains another dep.. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ac1cddf931fe70461753bb6c005ea42a548b1d0c;p=gosa.git Added diffrent pictures if department is empty .. or contains another dep.. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1050 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc index 4ac2c0ca0..ba24827b6 100644 --- a/plugins/admin/applications/class_applicationManagement.inc +++ b/plugins/admin/applications/class_applicationManagement.inc @@ -371,7 +371,19 @@ class applicationManagement extends plugin foreach($this->departments as $key=> $val){ - $field1 = array("string" => "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" => "department"); $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val)); $field3 = array("string" => " ","attach"=>"style='text-align:right;border:none'"); diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc index cc4a0d0d7..1ee8e268c 100644 --- a/plugins/admin/groups/class_groupManagement.inc +++ b/plugins/admin/groups/class_groupManagement.inc @@ -402,7 +402,20 @@ class groupManagement extends plugin foreach($this->departments as $key=> $val){ - $field1 = array("string" => "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" => "department"); $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val)); $field3 = array("string" => " "); $field4 = array("string" => " ","attach"=>"style='text-align:right;border:none'"); diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc index 060d36c0a..e7b70cf2a 100644 --- a/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/plugins/admin/ogroups/class_ogroupManagement.inc @@ -408,7 +408,21 @@ name='dep_root' alt='"._("Root")."'> ". foreach($this->departments as $key=> $val){ - $field1 = array("string" => ""._("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" => ""._("Department").""); $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val)); $field3 = array("string" => " "); $field4 = array("string" => " ","attach"=>"style='text-align:right;border:none'"); diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index c6195ce8b..0d8f03731 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -561,7 +561,20 @@ class systems extends plugin $linkopen = "%s"; foreach($this->departments as $key=> $val){ - $field1 = array("string" => "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" => "department"); $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val)); $field3 = array("string" => " ", "attach" => "style='border:none'"); $divlist->AddEntry(array($field1,$field2,$field3)); diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 9e60df166..d3b7dcc87 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -649,13 +649,28 @@ class userManagement extends plugin $linkopen = "%s"; 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" => "department"); + + + + $field1 = array("string" => "department"); $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val)); $field3 = array("string" => " "); $field4 = array("string" => " ", "attach" => "style='border:none'"); - + $divlist->AddEntry(array($field1,$field2,$field3,$field4)); } diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc index bd8f9a7a8..4ca1d9d5a 100644 --- a/plugins/gofax/blocklists/class_blocklistManagement.inc +++ b/plugins/gofax/blocklists/class_blocklistManagement.inc @@ -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 = "%s"; foreach($this->departments as $key=> $val){ - $field1 = array("string" => "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" => "department"); $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val)); $field3 = array("string" => " ", "attach" => "style='border:none'"); $divlist->AddEntry(array($field1,$field2,$field3)); diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc index 24e34e856..5c64bb4bd 100755 --- a/plugins/gofon/macro/class_gofonMacroManagement.inc +++ b/plugins/gofon/macro/class_gofonMacroManagement.inc @@ -351,7 +351,20 @@ class gofonMacro extends plugin $linkopen = "%s"; foreach($this->departments as $key=> $val){ - $field1 = array("string" => "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" => "department"); $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val)); $field3 = array("string" => " "); $field4 = array("string" => " ", "attach" => "style='border:none'");