From: hickert Date: Wed, 30 Jun 2010 15:25:16 +0000 (+0000) Subject: Added dummy channels to dash board X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c5520f6ad065a8b00e7434e4eafda80f20ff6d7f;p=gosa.git Added dummy channels to dash board git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18896 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc b/gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc index 443fdff41..bad2187bd 100644 --- a/gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc +++ b/gosa-core/plugins/generic/dashBoard/dbChannelStatus/class_dbChannelStatus.inc @@ -5,11 +5,53 @@ class dbChannelStatus extends plugin function __construct($config) { parent::__construct($config, NULL); + + // Construct the channel list. + $this->channelList= new sortableListing(); + $this->channelList->setDeleteable(false); + $this->channelList->setEditable(false); + $this->channelList->setColspecs(array('30px','120px','*','100px')); + $this->channelList->setHeader(array('?',_("Name"),_("Description"),_("Status"))); + $this->channelList->setWidth("100%"); + $this->channelList->setDefaultSortColumn(1); + $this->channelList->setHeight("200px"); + $this->channelList->setAcl("rwcdm"); } function execute() { $smarty = get_smarty(); + + $channel = array(); + $channel[] = array( + 'icon' => image('images/true.png'), + 'name' => 'GONICUS support', + 'desc' => 'GONICUS helps you all time!', + 'stat' => 'Online' + ); + $channel[] = array( + 'icon' => image('images/true.png'), + 'name' => 'Free', + 'desc' => 'Free channel, basic GOsa plugins!', + 'stat' => 'Online' + ); + $channel[] = array( + 'icon' => image('images/small_error.png'), + 'name' => 'Experimental', + 'desc' => 'May be down for maintance!', + 'stat' => 'Offline' + ); + + + $data = $lData = array(); + foreach($channel as $key => $ch){ + $data[$key] = $ch; + $lData[$key] = array('data' => array($ch['icon'],$ch['name'], $ch['desc'], $ch['stat'])); + } + + $this->channelList->setListData($data,$lData); + $this->channelList->update(); + $smarty->assign('channelList', $this->channelList->render()); return($smarty->fetch(get_template_path('dbChannelStatus/contents.tpl', TRUE))); } diff --git a/gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl b/gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl index 690e0a203..1b1de976f 100644 --- a/gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl +++ b/gosa-core/plugins/generic/dashBoard/dbChannelStatus/contents.tpl @@ -1 +1,3 @@

{t}Channels{/t}

+ +{$channelList} diff --git a/gosa-core/plugins/generic/dashBoard/dbPluginStatus/class_dbPluginStatus.inc b/gosa-core/plugins/generic/dashBoard/dbPluginStatus/class_dbPluginStatus.inc index 1ee9f9e42..940727d35 100644 --- a/gosa-core/plugins/generic/dashBoard/dbPluginStatus/class_dbPluginStatus.inc +++ b/gosa-core/plugins/generic/dashBoard/dbPluginStatus/class_dbPluginStatus.inc @@ -23,7 +23,7 @@ class dbPluginStatus extends plugin $this->pluginList->setDeleteable(false); $this->pluginList->setEditable(false); $this->pluginList->setColspecs(array('30px','120px','*','100px')); - $this->pluginList->setHeader(array('?',_("Name"),_("Descriptio"),_("Status"))); + $this->pluginList->setHeader(array('?',_("Name"),_("Description"),_("Status"))); $this->pluginList->setWidth("100%"); $this->pluginList->setDefaultSortColumn(1); $this->pluginList->setHeight("200px");