Code

Added list actions
[gosa.git] / gosa-core / plugins / admin / newConfigManagement / class_newConfigManagement.inc
index eb7b13e7355c7cb042de187e927d2d8aba30cb93..f038f01b399189f217070530afeff19b0ce6d364 100644 (file)
@@ -18,7 +18,7 @@ class newConfigManagement extends plugin
     function __construct($config, $dn)
     {
         $this->config = &$config;
-        $this->listing = new ConfigManagementListing($this->config, get_userinfo());
+        $this->listing = new ConfigManagementListing($this->config, get_userinfo(), $this);
 
         // Request an update of the data model
         $this->updateDataModel();
@@ -133,14 +133,16 @@ class newConfigManagement extends plugin
      */
     function execute()
     {
+
         // Get the selected release and store it in a session variable
         //  to allow the configFilter to access it and display the
         //  packages and items.
         $path = $this->selectedContainer.$this->selectedItem;
         $item = $this->dataModel->getItemByPath($path);
         session::set('CONFIG_ITEM', $item);
+        $this->listing->setListingTypes($this->getListingTypes());
 
-        return($this->listing->renderList());
+        return($this->listing->execute());
     }
 
 
@@ -223,6 +225,43 @@ class newConfigManagement extends plugin
     }
 
 
+    function getListingTypes()
+    {
+        $types= array();
+        $types['Distribution']['objectClass'] = 'Distribution';
+        $types['Distribution']['label'] = _('Distribution');
+        $types['Distribution']['image'] = 'images/lists/edit.png';
+        $types['Distribution']['category'] = 'Device';
+        $types['Distribution']['class'] = 'Device';
+
+        $types['Release']['objectClass'] = 'Release';
+        $types['Release']['label'] = _('Release');
+        $types['Release']['image'] = 'images/lists/delete.png';
+        $types['Release']['category'] = 'Device';
+        $types['Release']['class'] = 'Device';
+
+        $types['Component']['objectClass'] = 'Component';
+        $types['Component']['label'] = _('Component');
+        $types['Component']['image'] = 'plugins/users/images/select_user.png';
+        $types['Component']['category'] = 'Device';
+        $types['Component']['class'] = 'Device';
+        return($types);
+    }
+
+
+
+    function editEntry($id)
+    {
+        print_a($id);
+    }
+
+
+    function removeEntry($id)
+    {
+        print_a($id); 
+    }
+
+
     public static function plInfo()
     {
         return (array(