X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Fplugins%2Fgeneric%2FdashBoard%2Fclass_dashBoard.inc;h=a983faf369182ef6f200fc8d1032bbccc2bc6d22;hb=4901496e8d4627acaad0e23f62f1cfc11e98cca8;hp=6dce8e7faf17eaa25240531c6278669b75e1b742;hpb=5cc0928c2bd312e64b0400ad7f8644e1c4e599cf;p=gosa.git diff --git a/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc b/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc index 6dce8e7fa..a983faf36 100644 --- a/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc +++ b/gosa-core/plugins/generic/dashBoard/class_dashBoard.inc @@ -2,18 +2,85 @@ class dashBoard extends plugin { - var $plHeadline = 'dashBoard.png'; - var $plDescription = 'dashBoard.png'; - var $plShortIcon = 'dashBoard.png'; - var $plIcon = 'dashBoard.png'; + var $plHeadline = 'Dash board'; + var $plDescription = 'Dash board'; + var $plShortIcon = 'dashBoard.png'; + var $plIcon = 'plugin.png'; + private $dbPluginStatus = NULL; + private $dbChannelStatus = NULL; + private $dbNotifications = NULL; + private $dbInformation = NULL; + + function __construct($config) + { + plugin::plugin($config, NULL); + + // Instantiate child classes + $this->dbPluginStatus = new dbPluginStatus($config); + $this->dbChannelStatus = new dbChannelStatus($config); + $this->dbNotifications = new dbNotifications($config); + $this->dbInformation = new dbInformation($config); + + + // Detect registration status + $this->GOsaRegistration = new GOsaRegistration($config); + $this->registered = GOsaRegistration::isRegistered($config); + } function execute() { - $smarty = get_smarty(); + if(!$this->registered){ + return($this->GOsaRegistration->execute()); + } + + $smarty = get_smarty(); + $smarty->assign('dbPluginStatus', $this->dbPluginStatus->execute()); + $smarty->assign('dbChannelStatus', $this->dbChannelStatus->execute()); + $smarty->assign('dbNotifications', $this->dbNotifications->execute()); + $smarty->assign('dbInformation', $this->dbInformation->execute()); return($smarty->fetch(get_template_path('dashBoard.tpl', TRUE))); + } + + function check() + { + $messages = plugin::check(); + $messages = array_merge($this->dbPluginStatus->check()); + $messages = array_merge($this->dbChannelStatus->check()); + $messages = array_merge($this->dbNotifications->check()); + $messages = array_merge($this->dbInformation->check()); + return($messages); + } + + function save_object() + { + plugin::save_object(); + if(!$this->registered) $this->GOsaRegistration->save_object(); + + $this->dbPluginStatus->save_object(); + $this->dbChannelStatus->save_object(); + $this->dbNotifications->save_object(); + $this->dbInformation->save_object(); + } + + function save() + { + plugin::save(); + $this->dbPluginStatus->save(); + $this->dbChannelStatus->save(); + $this->dbNotifications->save(); + $this->dbInformation->save(); + } + + function remove_from_parent() + { + plugin::remove_from_parent(); + $this->dbPluginStatus->remove_from_parent(); + $this->dbChannelStatus->remove_from_parent(); + $this->dbNotifications->remove_from_parent(); + $this->dbInformation->remove_from_parent(); } }