summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1d71107)
raw | patch | inline | side by side (parent: 1d71107)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 May 2011 09:02:09 +0000 (09:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 May 2011 09:02:09 +0000 (09:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20853 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc | patch | blob | history | |
gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc
index 7eb695dd883fd83ec2dfd860a95a9037960370d1..3bbf1f9b3bf81611f1a480892a0009a4dacb0fe4 100644 (file)
// Preset item config - with Distribution and Release objects.
$items = array();
- $items['root']['container'] = array('Distribution');
+ $items['root']['container'] = array('Distribution', 'Template');
$items['root']['name'] = '/';
$items['root']['description'] = _('Root');
$rOpt1 = array('description' => _('Name'), 'default' => '', 'value' => '', 'required' => true,
'type' => 'string', 'display' => _('Name'));
+ // Define template parameters
+ $tOpt1 = array('description' => _('Name'), 'default' => '', 'value' => '', 'required' => true,
+ 'type' => 'string', 'display' => _('Name'));
+
$items['Distribution']['container'] = array('Release');
$items['Distribution']['name'] = 'Distribution';
$items['Distribution']['description'] = _('Distribution');
$items['Release']['description'] = _('Release');
$items['Release']['options']['name'] = $rOpt1;
+ $items['Template']['container'] = array();
+ $items['Template']['name'] = 'Template';
+ $items['Template']['description'] = _('Template');
+ $items['Template']['options']['name'] = $tOpt1;
+
$this->installationMethods = array();
$this->installationMethods['root']['description'] = _('root');
$this->installationMethods['root']['name'] = 'root';
$this->installationMethods['root']['items']['Distribution'] = &$items['Distribution'];
$this->installationMethods['root']['items']['Release'] = &$items['Release'];
$this->installationMethods['root']['items']['root'] = &$items['root'];
+ $this->installationMethods['root']['items']['Template'] = &$items['Template'];
}
// Recreate the data model, to have a clean and fresh instance.
$this->dataModel = new ConfigManagementDataModel();
+
+ // Load templates from the backend and append them on the base
+ $rpc = $this->config->getRpcHandle();
+ $res = $rpc->installListTemplates();
+ if(!$rpc->success()){
+ $this->errorMessage = sprintf(_("Failed to load templates: %s"), $rpc->get_error());
+ return(FALSE);
+ }
+ foreach($res as $tName => $tData){
+ $tData['name'] = $tName;
+ $this->dataModel->addItem('Template','/root', $tName, $tData);
+ }
+
+
// Load distributions
$rpc = $this->config->getRpcHandle();
$res = $rpc->getDistributions();
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.tpl b/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.tpl
index 839a4c69b22e4bc489c222e023519db6e6ab522a..c5318485bde98912772e33cbf662e40de1f64687 100644 (file)
<td>{$name}</td>
</tr>
</table>
+{else if $type == 'Template'}
+<table>
+ <tr>
+ <td>{$nameName}</td>
+ <td>{$name}</td>
+ </tr>
+</table>
{/if}