Code

Updated listing class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Apr 2011 11:58:53 +0000 (11:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Apr 2011 11:58:53 +0000 (11:58 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20654 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 99bc644f86ee34df72a492b9465ce50e357cbc38..4b5c6bf8336c83afce8509a5242de6650b5d5631 100644 (file)
@@ -71,6 +71,7 @@
     <action>
       <name>editEntry</name>
       <type>entry</type>
+      <objectclass>editable</objectclass>
       <image>images/lists/edit.png</image>
       <label>Edit item</label>
     </action>
@@ -79,6 +80,7 @@
       <name>remove</name>
       <type>entry</type>
       <image>images/lists/trash.png</image>
+      <objectclass>removeable</objectclass>
       <label>Remove item</label>
     </action>
 
index 227d1ab71ab5c67ad4efef7800f671118d8aeb7e..b090c729151825768dc4f849d0583994c1713194 100644 (file)
@@ -31,7 +31,7 @@ class filterConfigManagement {
         }
 
         foreach($data['children'] as $item){
-            filterDeviceItems::addEntry($ret, $item, $scope == 'sub', $filter);
+            filterConfigManagement::addEntry($ret, $item, $scope == 'sub', $filter);
         }
         return($ret);
     }
@@ -51,6 +51,16 @@ class filterConfigManagement {
             $entry['objectClass'] = array($item['type'],'count' => 1);
             $entry[] = 'objectClass';
             $entry['count'] = 5;
+
+            if(isset($item['values']['__editable']) && ($item['values']['__editable'])){
+                $entry['objectClass'][] = 'editable';
+                $entry['objectClass']['count'] ++;
+            }
+            if(isset($item['values']['__removeable']) && ($item['values']['__removeable'])){
+                $entry['objectClass'][] = 'removeable';
+                $entry['objectClass']['count'] ++;
+            }
+
             $ret[] = $entry;
         }
 
index e5ea6ff461923234553d40442d1ab4df0cafa4e4..615c01a014b2e0798a8f4cdd399cfacdcfbe9584 100644 (file)
@@ -92,10 +92,12 @@ class newConfigManagement extends plugin
         }else{
             $this->cfgTypeMap = array();
             foreach($res as $dist){
+                $dist['__removeable'] = TRUE;
                 $this->dataModel->addItem('Distribution','/root', $dist['name'], $dist);
                 $this->cfgTypeMap['/root/'.$dist['name']] = $dist['installation_method'];
                 foreach($dist['releases'] as $release){
                     $distPath = "/root/{$dist['name']}";
+                    $release['__removeable'] = TRUE;
                     $this->dataModel->addItem('Release',$distPath, $release['name'], $release);
                 }
             }
@@ -181,6 +183,8 @@ class newConfigManagement extends plugin
                         $targetPath = rtrim($targetPath,'/');
                         $this->dataModel->addItem($type, $targetPath, $name, 
                                 array(    
+                                        '__editable' => TRUE,
+                                        '__removeable' => TRUE,
                                         '__path' => $itemPath,
                                         '__release' => $path
                                     ),'-' );