From 734385e8fefe81fc98c798c72a1048496e5d45c0 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 5 Apr 2011 11:58:53 +0000 Subject: [PATCH] Updated listing class git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20654 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/newConfigManagement/DeviceConfig-list.xml | 2 ++ .../class_filterConfigManagement.inc | 12 +++++++++++- .../class_newConfigManagement.inc | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/DeviceConfig-list.xml b/gosa-plugins/goto-ng/admin/newConfigManagement/DeviceConfig-list.xml index 99bc644f8..4b5c6bf83 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/DeviceConfig-list.xml +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/DeviceConfig-list.xml @@ -71,6 +71,7 @@ editEntry entry + editable images/lists/edit.png @@ -79,6 +80,7 @@ remove entry images/lists/trash.png + removeable diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_filterConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_filterConfigManagement.inc index 227d1ab71..b090c7291 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_filterConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_filterConfigManagement.inc @@ -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; } diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc index e5ea6ff46..615c01a01 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc @@ -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 ),'-' ); -- 2.30.2