summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 18699e4)
raw | patch | inline | side by side (parent: 18699e4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Apr 2011 08:15:04 +0000 (08:15 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Apr 2011 08:15:04 +0000 (08:15 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20651 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 de47f981e648e8ad22c50ab3fcb823b269306557..f6acaf539ae2cc966b1bedc89f8bedea439e9f86 100644 (file)
}
-
-
function execute()
{
// Ensure that html posts and gets are kept even if we see a 'Entry islocked' dialog.
function removeEntryRequested($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
{
- $this->parent->removeEntry($target);
+// $this->parent->removeEntry($target);
}
function openEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
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;
+ $this->parent->editEntry($target);
+ }
+
+ function setDialogObject($o)
+ {
+ $this->dialogObject = &$o;
+ $this->listing->skipFooter = TRUE;
+ $this->listing->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 7a4d574ad3806f63e96334f25392a8ef3df821c8..1b6bba4b89f4a0e1b9e547c9bc8b0b7b910696ed 100644 (file)
foreach($dist['releases'] as $release){
$distPath = "/root/{$dist['name']}";
$this->dataModel->addItem('Release',$distPath, $release['name'], $release);
-
- # foreach($dist['components'] as $component){
- # $comPath = "{$distPath}/{$release['name']}";
- # $this->dataModel->addItem('Component',$comPath, $component['name'], $component);
- # }
}
}
}
$type = $res[$itemPath];
// Root installation objects do not have a name, so we use 'root' here.
- $itemPath = trim($path."/root/".$itemPath);
+ $targetPath = trim($path."/root/".$itemPath);
// Remove trailing and duplicated slashes
- $itemPath = rtrim($itemPath, '/');
- $itemPath = preg_replace("/\/\/*/","/", $itemPath);
+ $targetPath = rtrim($targetPath, '/');
+ $targetPath = preg_replace("/\/\/*/","/", $targetPath);
// Extract the items name
- $name = preg_replace("/^.*\//","", $itemPath);
+ $name = preg_replace("/^.*\//","", $targetPath);
// Cleanup the path and then add the item.
- $itemPath = preg_replace("/[^\/]*$/","", $itemPath);
- $itemPath = rtrim($itemPath,'/');
- $this->dataModel->addItem($type, $itemPath, $name);
+ $targetPath = preg_replace("/[^\/]*$/","", $targetPath);
+ $targetPath = rtrim($targetPath,'/');
+ $this->dataModel->addItem($type, $targetPath, $name,
+ array(
+ '__path' => $itemPath,
+ '__release' => $path
+ ),'-' );
}
$this->dataModel->setItemStatus($path, 'fetched');
}
}
+ function editEntry($ids)
+ {
+ // Update the template engine to use another type of item and
+ // some other values.
+ $item = $this->dataModel->getItemById($ids[0]);
+ if($item['status'] == '-'){
+ $release = preg_replace("/^.*\//","",$item['values']['__release']);
+ $path = $item['values']['__path'];
+
+ //$rpc = $this->config->getRpcHandle();
+ //$res = $rpc->getConfigItem();
+ $item['values']['distribution'] = 'debian';
+ $item['values']['dependency'] = array('debian');
+ $item['values']['version'] = '10.0.0';
+ $item['values']['name'] = $item['name'];
+ $item['values']['description'] = 'bla';
+ }
+
+ $this->TemplateEngine->setValues($item['type'],$item['values']);
+ $this->listing->setDialogObject($this->TemplateEngine);
+ }
+
+
}
?>