Code

Fixed service handling.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Jul 2010 09:59:41 +0000 (09:59 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Jul 2010 09:59:41 +0000 (09:59 +0000)
-If all services were used, the list rendering was broken.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19162 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_serverService.inc
gosa-plugins/systems/admin/systems/serverService-list.xml

index 1256d1be82ecab4fc97c1c223730feced679d25e..0564f7b848ad5a59ffddfe2c5d40ea3b1deef8d0 100644 (file)
@@ -118,6 +118,19 @@ class ServerService extends management
             $desc = $services[$name];
             $serviceList.= sprintf($template, $name,_($desc));
         }
+
+        if(!empty($serviceList)){
+            $serviceList = "
+              <action>
+                 <type>sub</type>
+                 <image>images/lists/element.png[new]</image>
+                 <label>Create</label>
+                 {$serviceList} 
+                </action>
+            ";
+
+         }
+
         $contents = preg_replace("/%SERVICES%/",$serviceList, $contents);
         $headpage = new listing($contents,TRUE);
         $headpage->registerElementFilter("filterServiceStatus", "ServerService::filterServiceStatus");
index ddd3132cb88aba090373c2b8595131cae1b2bacf..8ee8fd581ee7f74259f3ecac4481a6d7b7fc14a8 100644 (file)
 
   <actionmenu>
 
-    <action>
-     <type>sub</type>
-     <image>images/lists/element.png[new]</image>
-     <label>Create</label>
-
-     %SERVICES%
-
-    </action>
-
-    <action>
-      <type>separator</type>
-    </action>
+    %SERVICES%
 
     <action>
       <name>remove</name>