Code

closes #107
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Aug 2007 07:27:33 +0000 (07:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Aug 2007 07:27:33 +0000 (07:27 +0000)
Object groups will display "startup" and "fai summary" tab now, if there is a server bundled eith this group

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

plugins/admin/ogroups/tabs_ogroups.inc

index 57d388751af4599a2b038bcc96f56d8ad918fa51..ce5e1a52382e5bcf40754ec670885ee7a1ca8ed8 100644 (file)
@@ -41,10 +41,12 @@ class ogrouptabs extends tabs
     }
     
     /* Remove ws tabs, if theres no ws left in the object list */
-    if((!preg_match("/W/",$objects))&&(isset($this->by_object['workstartup']))){
+    if((!preg_match("/W/",$objects))&&(isset($this->by_object['workservice']))){
       $this->by_object['workservice']->remove_from_parent();
       unset($this->by_object['workservice']);
       unset($this->by_name['workservice']);
+    }
+    if((!preg_match("/S/",$objects) && !preg_match("/W/",$objects))&&(isset($this->by_object['workstartup']))){
       $this->by_object['workstartup']->remove_from_parent();
       unset($this->by_object['workstartup']);
       unset($this->by_name['workstartup']);
@@ -97,19 +99,19 @@ class ogrouptabs extends tabs
     }
     
     /* Add Workstation tabs */
-    if((preg_match("/W/",$objects))&&(!isset($this->by_object['workstartup']))){
-      if(!isset($this->by_object['workstartup'])){
-        $this->by_name['workstartup']= _("Startup");
-        $this->by_object['workstartup']= new workstartup($this->config, $this->dn);
-        $this->by_object['workstartup']->parent= &$this;
+    if((preg_match("/W/",$objects))&&(!isset($this->by_object['workservice']))){
         $this->by_name['workservice']= _("Devices");
         $this->by_object['workservice']= new workservice($this->config, $this->dn);
         $this->by_object['workservice']->inheritTimeServer = false;
         $this->by_object['workservice']->parent= &$this;
+    }
+    if((preg_match("/S/",$objects) || preg_match("/W/",$objects))&&(!isset($this->by_object['workstartup']))){
+        $this->by_name['workstartup']= _("Startup");
+        $this->by_object['workstartup']= new workstartup($this->config, $this->dn);
+        $this->by_object['workstartup']->parent= &$this;
         $this->by_name['faiSummary']= _("Summary");
         $this->by_object['faiSummary']= new faiSummaryTab($this->config, $this->dn);
         $this->by_object['faiSummary']->parent= &$this;
-      }
     }
 
     /* Add application tab if user or group is member in this object group*/