From 216eaa1f150efc830f8f320322c65f03b2d54294 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 4 Apr 2011 11:38:23 +0000 Subject: [PATCH] Updated listing types git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20643 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../newConfigManagement/DeviceConfig-list.tpl | 2 ++ .../class_filterConfigManagement.inc | 2 +- .../class_newConfigManagement.inc | 23 ++++++++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/DeviceConfig-list.tpl b/gosa-plugins/goto-ng/admin/newConfigManagement/DeviceConfig-list.tpl index 0620e1835..0401be9f2 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/DeviceConfig-list.tpl +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/DeviceConfig-list.tpl @@ -5,6 +5,8 @@
+ + diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_filterConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_filterConfigManagement.inc index 5bd73ae3c..227d1ab71 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_filterConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_filterConfigManagement.inc @@ -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; diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc index 1ce99f61a..676e67a3b 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc @@ -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."
"; + $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); } -- 2.30.2
{$ROOT}{$BACK} {$RELOAD} {t}Container{/t} {$CONTAINER} {$ACTIONS}