Code

Updated info page
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 1 Dec 2010 10:32:29 +0000 (10:32 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 1 Dec 2010 10:32:29 +0000 (10:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20481 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/ihtml/themes/default/infoPage.tpl
gosa-core/plugins/generic/infoPage/class_infoPage.inc

index 60dcd77bd9218a4a9f7b26e43dd18a0ab8a79dbf..f7f0b77edeb7fd97e5eb31b5568dd2754fc580f6 100644 (file)
@@ -50,7 +50,7 @@
     <hr>
     <h3>{t}Administrative contact{/t}</h3>
     {foreach from=$managers item=item}
-        <div style='float:left; width:50%;'>
+        <div style='float:left; padding-right:20px;'>
         {$item.str}
         </div>
     {/foreach}
index 01819bf19a4ef5d86218ebf55e444aaeb8fdf255..ce958029feebcc4312aacd636c6ec6ba1c82f51b 100644 (file)
@@ -87,15 +87,13 @@ class infoPage extends plugin
 
         // Get next department manager dn
         $dn = $this->dn;
-        $max = 10;
-        while(strlen($dn) >= strlen($this->config->current['BASE']) && $max){
+        $max = 4;
+        while(strlen($dn) >= strlen($this->config->current['BASE']) && $max--){
             $dn = preg_replace("/^[^,]+,/","",$dn);
-            $max --;
             $ldap->cat($dn, array('manager'));
             $attrs = $ldap->fetch();
             if(isset($attrs['manager'][0])){
                 $dns['DEPARTMENT'] = $attrs['manager'][0];
-                break;
             }
         }
 
@@ -106,14 +104,14 @@ class infoPage extends plugin
             $managers[$dn] = $ldap->fetch();
             $managers[$dn]['type'] = $type;
             $name = $phone = $mail = "";
-            $name = "<b>".set_post($managers[$dn]['sn'][0]).", ".set_post($managers[$dn]['givenName'][0])."</b>";
-            if(isset($managers[$dn]['mail'][0])){
-                $mail = "<li>"._("Mail address").":&nbsp;".set_post($managers[$dn]['mail'][0])."</li>";
-            }
+            $name = "<tr><td colspan='2' style='background-color:#F0F0F0'><b>".set_post($managers[$dn]['givenName'][0])." ".set_post($managers[$dn]['sn'][0])."</b></td></tr>";
             if(isset($managers[$dn]['telephoneNumber'][0])){
-                $phone = "<li>"._("Phone number").":&nbsp;".set_post($managers[$dn]['telephoneNumber'][0])."</li>";
+                $phone = "<tr><td>&nbsp;"._("Phone number").":</td><td><i>".set_post($managers[$dn]['telephoneNumber'][0])."</i></td></tr>";
+            }
+            if(isset($managers[$dn]['mail'][0])){
+                $mail = "<tr><td>&nbsp;"._("Mail").":</td><td><i>".set_post($managers[$dn]['mail'][0])."</i></td></tr>";
             }
-            $managers[$dn]['str'] = "<p>{$name}<ul>{$phone}{$mail}</ul></p>";
+            $managers[$dn]['str'] = "<table cellpadding='2' style='border:1px solid #CCC'>{$name}{$phone}{$mail}</table>";
         }
         return($managers);
     }