Code

Updated listing types
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 4 Apr 2011 11:38:23 +0000 (11:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 4 Apr 2011 11:38:23 +0000 (11:38 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20643 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto-ng/admin/newConfigManagement/DeviceConfig-list.tpl
gosa-plugins/goto-ng/admin/newConfigManagement/class_filterConfigManagement.inc
gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc

index 0620e18353ae1cef83d83f0352c4489c62acca75..0401be9f2590ee89be96b1d5aafa5b472a83f816 100644 (file)
@@ -5,6 +5,8 @@
    <div class="mainlist-nav">
     <table summary="{$HEADLINE}">
      <tr>
+      <td>{$ROOT}</td>
+      <td>{$BACK}</td>
       <td>{$RELOAD}</td>
       <td class="left-border">{t}Container{/t} {$CONTAINER}</td>
       <td class="left-border">{$ACTIONS}</td>
index 5bd73ae3c99ef4909730538a6e1bda0afca9822c..227d1ab71ab5c67ad4efef7800f671118d8aeb7e 100644 (file)
@@ -24,7 +24,7 @@ class filterConfigManagement {
             $back[] = 'cn';
             $back['description'] = array($data['type'], 'count' => 1);
             $back[] = 'description';
-            $back['objectClass'] = array('Back', 'count' => 1);
+            $back['objectClass'] = array($data['type'], 'count' => 1);
             $back[] = 'objectClass';
             $back['count'] = 3;
             $ret[] = $back;
index 1ce99f61a9225cc8b942c590dde8286b6404aca3..676e67a3b42ad5c6280d80207e06fbd57a2e5815 100644 (file)
@@ -22,7 +22,9 @@ class newConfigManagement extends plugin
         $this->listing = new ConfigManagementListing($this->config, get_userinfo(), $this);
 
         // Request an update of the data model
+        $this->loadInstallationMethods();
         $this->updateDataModel();
+        $this->listing->setListingTypes($this->getListingTypes());
     }
 
 
@@ -70,7 +72,13 @@ class newConfigManagement extends plugin
 
         // Get the selected distribution and release from the listing widget.
         $cont = $this->listing->getSelectedContainer();
-        $this->setCurrentContainer($cont);
+        if(isset($_POST['ROOT'])){
+            $this->setCurrentContainer('/root');
+        }elseif(isset($_POST['BACK'])){
+            $this->setCurrentContainer('/root');
+        }else{
+            $this->setCurrentContainer($cont);
+        }
     }
 
 
@@ -137,6 +145,8 @@ class newConfigManagement extends plugin
      */
     function setCurrentContainer($cont)
     {
+        echo $cont."<br>";
+
         $this->selectedContainer = $cont;
 
         // Update list of items within the selected container. 
@@ -266,6 +276,17 @@ class newConfigManagement extends plugin
         $types['Component']['image'] = 'plugins/users/images/select_user.png';
         $types['Component']['category'] = 'Device';
         $types['Component']['class'] = 'Device';
+
+        foreach($this->installationMethods as $method => $items){
+            foreach($items['items'] as $itemName => $item){
+                $types[$itemName]['objectClass'] = $itemName;
+                $types[$itemName]['label'] = $item['name'];
+                $types[$itemName]['image'] = 'plugins/fai/images/fai_script.png';
+                $types[$itemName]['category'] = 'Device';
+                $types[$itemName]['class'] = 'Device';
+            }
+        }
+
         return($types);
     }