Code

Moved images around. Finished ogroups.
[gosa.git] / gosa-core / plugins / admin / ogroups / tabs_ogroups.inc
index adcc709f596173e9fb467ad8a2b1594dd30d87bb..ecd43d2dbad4dd2d5a71d2e28a412f96b01d23a1 100644 (file)
@@ -1,4 +1,24 @@
 <?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
 
 class ogrouptabs extends tabs
 {
@@ -41,7 +61,7 @@ class ogrouptabs extends tabs
       unset($this->by_object['termgroup']);
       unset($this->by_name['termgroup']);
     }
-    if(((!preg_match("/T/",$objects)) && (!preg_match("/W/",$objects)))&&(isset($this->by_object['termservice']))){
+    if(!preg_match("/T/",$objects) &&(isset($this->by_object['termservice']))){
       $this->by_object['termservice']->remove_from_parent();
       unset($this->by_object['termservice']);
       unset($this->by_name['termservice']);
@@ -97,19 +117,26 @@ class ogrouptabs extends tabs
     /* Add Terminal tab */
     if(((preg_match("/T/",$objects)) || (preg_match("/W/",$objects)))&&(!isset($this->by_object['termgroup']))){
       if(!isset($this->by_object['termgroup'])){
-        $this->by_name['termgroup']= _("System");
+        $this->by_name['termgroup']= _("Systems");
         $this->by_object['termgroup']= new termgroup($this->config, $this->dn);
         $this->by_object['termgroup']->inheritTimeServer = false;
         $this->by_object['termgroup']->parent= &$this;
       }
+    }
+    if(preg_match("/T/",$objects) &&(!isset($this->by_object['termservice']))){
       if(!isset($this->by_object['termservice'])){
-        $this->by_name['termservice']= _("Service");
-        $this->by_object['termservice']= new termservice($this->config, $this->dn);
-        $this->by_object['termservice']->parent= &$this;
+        $this->by_name['termservice']= _("Devices");
+        $this->by_object['termservice']= new termservice($this->config, $this->dn,$this->by_object['ogroup']);
       }
     }
-    
+
     /* Add Workstation tabs */
+    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_object['workstartup']->acl = "#all#";
+    }
     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);
@@ -117,12 +144,8 @@ class ogrouptabs extends tabs
         $this->by_object['workservice']->parent= &$this;
         $this->by_object['workservice']->acl = "#all#";
     }
-    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_object['workstartup']->acl = "#all#";
-        $this->by_name['faiSummary']= _("Summary");
+    if((preg_match("/S/",$objects) || preg_match("/W/",$objects))&&(!isset($this->by_object['faiSummary']))){
+        $this->by_name['faiSummary']= _("FAI summary");
         $this->by_object['faiSummary']= new faiSummaryTab($this->config, $this->dn);
         $this->by_object['faiSummary']->parent= &$this;
     }
@@ -204,9 +227,8 @@ class ogrouptabs extends tabs
           $this->by_object['termgroup']= new termgroup($this->config, $this->dn);
           $this->by_object['termgroup']->parent= &$this;
 
-          $this->by_name['termservice']= _("Service");
-          $this->by_object['termservice']= new termservice($this->config, $this->dn);
-          $this->by_object['termservice']->parent= &$this;
+          $this->by_name['termservice']= _("Devices");
+          $this->by_object['termservice']= new termservice($this->config, $this->dn,$this->by_object['ogroup']);
           break;
 
           case "U":