From 72fe697b10d1f29ec60d96193eebd75d36ecf17e Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 10 Nov 2010 10:18:13 +0000 Subject: [PATCH] Updated registration template git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20221 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../plugins/generic/dashBoard/class_dashBoard.inc | 13 ++++++++----- gosa-core/plugins/generic/dashBoard/dashBoard.tpl | 5 ++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc b/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc index 0289b8bca..61828c675 100644 --- a/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc +++ b/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc @@ -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){ diff --git a/gosa-core/plugins/generic/dashBoard/dashBoard.tpl b/gosa-core/plugins/generic/dashBoard/dashBoard.tpl index 972f31679..acc5eaaa8 100644 --- a/gosa-core/plugins/generic/dashBoard/dashBoard.tpl +++ b/gosa-core/plugins/generic/dashBoard/dashBoard.tpl @@ -1,4 +1,4 @@ -{if !$instanceRegistered} +{if !$instanceRegistered || !$isServerAccessible}

{t}This feature is only accessible for registrated instances of GOsa{/t}

{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} -- 2.30.2