summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f21cf4)
raw | patch | inline | side by side (parent: 2f21cf4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Apr 2011 06:35:23 +0000 (06:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Apr 2011 06:35:23 +0000 (06:35 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20649 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagementListing.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagementListing.inc
index 762353f433a0097b0f989ce47875e69819557d3e..de47f981e648e8ad22c50ab3fcb823b269306557 100644 (file)
function editEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
{
+ // Update the template engine to use another type of item and
+ // some other values.
+ $item = $this->parent->dataModel->getItemById($target[0]);
+ $this->parent->TemplateEngine->setValues($item['type'],array('data' => array()));
$this->dialogObject = $this->parent->TemplateEngine;
$this->skipFooter = TRUE;
$this->dialog = TRUE;
-
}
}
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc
index f3d16981970b725569b245d4b5bfa529ba1e1991..a5bcdd1dc13f6c34cbc8801a40e6eedad890c2ce 100644 (file)
var $dataModel = NULL;
var $listing = NULL;
+ var $cfgTypeMap = NULL;
/*! \brief Initialize the plugin and finally update the data model.
*/
$this->listing->setContainers($this->getContainerList());
$this->listing->setContainer($cont);
- $this->setInstallMethod('puppet');
-
+ // Set the correct installation method for the selected item
+ $item = $this->dataModel->getItemByPath($cont);
+ if($this->cfgTypeMap[$item['type']]){
+ $method = $this->cfgTypeMap[$item['type']];
+ $this->setInstallMethod($method);
+ }
}
// packages and items.
$res = $this->listing->execute();
$this->listing->setListingTypes($this->getListingTypes());
-
return($res);
}
msg_dialog::display(_("Setup"), $this->errorMessage , ERROR_DIALOG);
$this->initFailed = TRUE;
return;
+ }else{
+
+ $this->cfgTypeMap = array();
+ foreach($this->installationMethods as $methodName => $data){
+ foreach($data['items'] as $itemName => $itemData){
+ $this->cfgTypeMap[$itemName] = $methodName;
+ }
+ }
+
}
}
}
- /*! \brief Acts on edit requests and opens an edit dialog for the received item-id.
- * (This action is received from the ConfigManagementListing class.)
- * @param Array The items ids. (May contain multiple ids)
- * @return
- */
- function editEntry($ids)
- {
- // Update the template engine to use another type of item and
- // some other values.
- $this->TemplateEngine->setValues('PuppetTemplate',array('data' => array()));
- }
-
-
/*! \brief The plugins ACL and plugin-property definition.
* @return
*/