Code

Updated registrtation process
[gosa.git] / gosa-core / plugins / generic / dashBoard / dbChannelStatus / class_dbChannelStatus.inc
index 443fdff41279b3d797dd5dad42e16517a8441a03..eec7eb5c7fc3af6c11106858b556c7f5e5f568ea 100644 (file)
@@ -5,11 +5,52 @@ 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)));
     }