summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8655766)
raw | patch | inline | side by side (parent: 8655766)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 May 2010 13:08:09 +0000 (13:08 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 May 2010 13:08:09 +0000 (13:08 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18553 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_serverService.inc | patch | blob | history | |
gosa-plugins/systems/admin/systems/serverService-list.xml | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_serverService.inc b/gosa-plugins/systems/admin/systems/class_serverService.inc
index 80bd240e0439008c0b010a9018c61b257a61e951..5e4e35ced3f4916ebc7804f44968f60a61408d7a 100644 (file)
}
$this->setFilter($filter);
- // Build headpage
- $headpage = new listing(get_template_path("serverService-list.xml", true));
- $headpage->registerElementFilter("filterServiceStatus", "ServerService::filterServiceStatus");
- $headpage->setFilter($filter);
-
-
// Initialize list of used and useable services.
foreach ($config->data['TABS']['SERVERSERVICE'] as $plug){
if(class_available($plug['CLASS'])){
}
}
+ // Load service xml file and fill in placeholders
+ $contents =file_get_contents(get_template_path("serverService-list.xml", true));
+ $template = "
+ <action>
+ <name>new_%s</name>
+ <type>entry</type>
+ <label>%s</label>
+ </action>";
+ $serviceList = "";
+ foreach($this->getAllUnusedServices() as $name => $desc){
+ $serviceList.= sprintf($template, $name,_($desc));
+ }
+ $contents = preg_replace("/%SERVICES%/",$serviceList, $contents);
+
+ $headpage = new listing($contents,TRUE);
+ $headpage->registerElementFilter("filterServiceStatus", "ServerService::filterServiceStatus");
+ $headpage->setFilter($filter);
+
parent::__construct($config, $this->ui, "services", $headpage);
$this->registerAction("new", "newService");
$this->registerAction("remove", "removeService");
diff --git a/gosa-plugins/systems/admin/systems/serverService-list.xml b/gosa-plugins/systems/admin/systems/serverService-list.xml
index e4937c87875b6ba96cbe773078e10979c21e4f86..ddd3132cb88aba090373c2b8595131cae1b2bacf 100644 (file)
<?xml version="1.0" encoding="UTF-8"?>
-
<list>
<definition>
<departmentBrowser>false</departmentBrowser>
<image>images/lists/element.png[new]</image>
<label>Create</label>
- <action>
- <name>new</name>
- <type>entry</type>
- <image>images/lists/element.png[new]</image>
- <label>Service</label>
- </action>
+ %SERVICES%
+
</action>
<action>