Code

Updated registration template
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Nov 2010 10:18:13 +0000 (10:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Nov 2010 10:18:13 +0000 (10:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20221 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/generic/dashBoard/class_dashBoard.inc
gosa-core/plugins/generic/dashBoard/dashBoard.tpl

index 0289b8bca479cc729a071f54998f16ac8781c130..61828c675bc552b3f55123177e22c303f67631f1 100644 (file)
@@ -29,11 +29,13 @@ class dashBoard extends plugin
     function init()
     {
         // Instantiate child classes
-        if($this->config->registration->isInstanceRegistered()){
-            $this->dbPluginStatus = new dbPluginStatus($config);
-            $this->dbChannelStatus = new dbChannelStatus($config);
-            $this->dbNotifications = new dbNotifications($config);
-            $this->dbInformation = new dbInformation($config);
+        if( $this->config->registration->isInstanceRegistered() && 
+                $this->config->registration->isServerAccessible()){
+
+            $this->dbPluginStatus = new dbPluginStatus($this->config);
+            $this->dbChannelStatus = new dbChannelStatus($this->config);
+            $this->dbNotifications = new dbNotifications($this->config);
+            $this->dbInformation = new dbInformation($this->config);
             $this->initialized = TRUE;
         }
     }
@@ -61,6 +63,7 @@ class dashBoard extends plugin
 
         $smarty = get_smarty();
         $smarty->assign('instanceRegistered', $this->config->registration->isInstanceRegistered());
+        $smarty->assign('isServerAccessible', $this->config->registration->isServerAccessible());
         $smarty->assign('registrationServerAvailable', $this->config->registration->isServerAccessible());
 
         if($this->initialized){
index 972f316798fce93acb38410ed94431ddb2889047..acc5eaaa890a1c67ab886e0e9ed80602ef1c61e6 100644 (file)
@@ -1,4 +1,4 @@
-{if !$instanceRegistered}
+{if !$instanceRegistered || !$isServerAccessible}
     <h3>{t}This feature is only accessible for registrated instances of GOsa{/t}</h3>
 
     {if $registrationServerAvailable}
@@ -6,6 +6,9 @@
     {else}
         {t}Unfortunately the registration server cannot be reached, maybe the server is down for maintaince or you've no internet access!{/t}
     {/if}
+
+
+
 {else}
     <table style='width:100%' summary="{t}GOsa dash board{/t}">
         <tr>