Code

Added pluginStatus plugin
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Jun 2010 08:36:07 +0000 (08:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Jun 2010 08:36:07 +0000 (08:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18876 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/generic/dashBoard/class_dashBoard.inc
gosa-core/plugins/generic/dashBoard/dashBoard.tpl
gosa-core/plugins/generic/dashBoard/dbPluginStatus/class_dbPluginStatus.inc [new file with mode: 0644]

index 6dce8e7faf17eaa25240531c6278669b75e1b742..de795136b393c181c9a12f40f0a68b5298782908 100644 (file)
@@ -2,18 +2,50 @@
 
 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';
 
+    function __construct($config)
+    {
+        plugin::plugin($config, NULL);
+
+        // Instantiate child classes
+        $this->dbPluginStatus = new dbPluginStatus($config);
+    }
 
     function execute()
     {
         $smarty = get_smarty();
-
+        $smarty->assign('dbPluginStatus', $this->dbPluginStatus->execute());
         return($smarty->fetch(get_template_path('dashBoard.tpl', TRUE)));
-        
+
+    }
+
+    function check()
+    {
+        $messages = plugin::check();
+        $messages = array_merge($this->dbPluginStatus->check());    
+        return($messages);
+    }
+
+    function save_object()
+    {
+        plugin::save_object();
+        $this->dbPluginStatus->save_object();
+    }
+
+    function save()
+    {
+        plugin::save();
+        $this->dbPluginStatus->save();
+    }
+
+    function remove_from_parent()
+    {
+        plugin::remove_from_parent();
+        $this->dbPluginStatus->remove_from_parent();
     }
 }
 
index 6d09a8fa82add93dda9e71cffd1d3519f1c50ad2..5b3847d164f66f2df3bdac55f715f0dc9f089272 100644 (file)
@@ -4,6 +4,7 @@
         <td style='width:50%;' class='right-border'>
             
             <!-- Channel -->    
+            <h3>{t}Channels{/t}</h3> 
     
 
             <!--Chanel  END -->
@@ -12,7 +13,9 @@
         <td>
             
             <!-- Plugins Status -->    
-    
+            <h3>{t}Plugin status{/t}</h3> 
+
+            {$dbPluginStatus}
 
             <!-- Plugins Status  END -->
 
@@ -23,6 +26,7 @@
         <td style='width:50%;' class='right-border'>
             
             <!-- Messages -->    
+            <h3>{t}Advices{/t}</h3> 
     
 
             <!-- Messages  END -->
@@ -31,6 +35,7 @@
         <td>
             
             <!-- RSS Feeds -->    
+            <h3>{t}Information{/t}</h3> 
     
 
             <!-- RSS Feeds  END -->
diff --git a/gosa-core/plugins/generic/dashBoard/dbPluginStatus/class_dbPluginStatus.inc b/gosa-core/plugins/generic/dashBoard/dbPluginStatus/class_dbPluginStatus.inc
new file mode 100644 (file)
index 0000000..80fa091
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+
+class dbPluginStatus extends plugin
+{
+
+    function execute()
+    {
+        return("test");
+    }
+}
+
+?>