summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 84a6a21)
raw | patch | inline | side by side (parent: 84a6a21)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 25 Oct 2010 08:11:45 +0000 (08:11 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 25 Oct 2010 08:11:45 +0000 (08:11 +0000) |
-Inject object definitions now.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20135 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20135 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/admin/newConfigManagement/class_ConfigManagementListing.inc b/gosa-core/plugins/admin/newConfigManagement/class_ConfigManagementListing.inc
index 9153c4db90073a15d6f5a99b88792155935ffec6..acc0c4f0ecf2eac6cb3028d58bebe896a8ab6f26 100644 (file)
private $containerSelector = NULL;
private $itemSelector = NULL;
+ private $objectTypeStr = "";
function __construct($config, $ui)
{
}
+
+ function setListingTypes($types)
+ {
+ $str = "";
+ foreach($types as $typeData){
+ $str.= "\n<objectType>";
+ foreach($typeData as $key => $value){
+ $str .= "\n\t<{$key}>{$value}</{$key}>";
+ }
+ $str.= "\n</objectType>\n";
+
+ }
+ $this->objectTypeStr = $str;
+ $this->rebuildListing();
+ }
+
function rebuildListing()
{
}
$this->setFilter($filter);
+
+
// Load service xml file and fill in placeholders
$contents = file_get_contents(get_template_path("DeviceConfig-list.xml", true));
+ $contents = preg_replace("/%TYPES%/", $this->objectTypeStr, $contents);
$contents = preg_replace("/%ITEMS%/", "", $contents);
+
$headpage = new listing($contents,TRUE);
$headpage->setBase($this->base);
$headpage->setFilter($filter);
diff --git a/gosa-core/plugins/admin/newConfigManagement/class_filterConfigManagement.inc b/gosa-core/plugins/admin/newConfigManagement/class_filterConfigManagement.inc
index 306e386ae7b524c36d05b0a7b57bc5bb2552f211..87697b8198420c689c2946a4df4d80df8877f748 100644 (file)
static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
{
-
- echo $base;
-
// Walk through the data array till we reach the correct level, then
// create the list of entries.
$data = session::get('CONFIG_ITEM');
diff --git a/gosa-core/plugins/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-core/plugins/admin/newConfigManagement/class_newConfigManagement.inc
index eb7b13e7355c7cb042de187e927d2d8aba30cb93..4d5822c88b70dd83d07cd184bd31f481d6eebbd3 100644 (file)
$path = $this->selectedContainer.$this->selectedItem;
$item = $this->dataModel->getItemByPath($path);
session::set('CONFIG_ITEM', $item);
+ $this->listing->setListingTypes($this->getListingTypes());
return($this->listing->renderList());
}
}
+ function getListingTypes()
+ {
+ $types= array();
+ $types['Distribution']['objectClass'] = 'Distribution';
+ $types['Distribution']['label'] = _('Distribution');
+ $types['Distribution']['image'] = 'images/lists/edit.png';
+ $types['Distribution']['category'] = 'Device';
+ $types['Distribution']['class'] = 'Device';
+
+ $types['Release']['objectClass'] = 'Release';
+ $types['Release']['label'] = _('Release');
+ $types['Release']['image'] = 'images/lists/edit.png';
+ $types['Release']['category'] = 'Device';
+ $types['Release']['class'] = 'Device';
+ return($types);
+ }
+
+
public static function plInfo()
{
return (array(