Code

Updated OPSI spelling
[gosa.git] / gosa-plugins / systems / admin / systems / class_divListSystem.inc
index 6c8d7337289c219bfcab426bd1a6722e5922f2c2..ab7d803d940844d98c910357a7c400bed27dc477 100644 (file)
@@ -39,6 +39,7 @@ class divListSystem extends MultiSelectWindow
   var $ShowPrinters;
   var $ShowDevices;
   var $ShowPhones;
+  var $ShowOpsiHosts;
 
   /* Subsearch checkbox */
   var $SubSearch;
@@ -115,6 +116,12 @@ class divListSystem extends MultiSelectWindow
           msgPool::selectToView(  _("MicroSoft Windows based workstations")), 
           sprintf(_("Show %s"),   _("windows based workstations")),true);
     }
+    /* Add opsi checkboxes if opsi is enabled */
+    if($this->parent->opsi instanceof opsi && $this->parent->opsi->enabled()){
+      $this->AddCheckBox("ShowOpsiHosts" , sprintf(_("Display objects of type '%s'."),
+            _("OPSI installed client")),_("Show OPSI based clients")   ,true);
+    }
+
     if(class_available("printtabs")){
       $this->AddCheckBox("ShowPrinters",
           msgPool::selectToView(  _("network printers")),   
@@ -183,7 +190,7 @@ class divListSystem extends MultiSelectWindow
       $s.= "...|<img src='plugins/systems/images/select_workstation.png' alt='' border='0' class='center'>".
         "&nbsp;"._("Workstation")."|"."newsystem_workstation|\n";
     }
-    if(class_available("servtabs") && preg_match("/c/",$ui->get_permissions($this->selectedBase,"workstation/servgeneric"))){
+    if(class_available("servtabs") && preg_match("/c/",$ui->get_permissions($this->selectedBase,"server/servgeneric"))){
       $s.= "...|<img src='plugins/systems/images/select_server.png' alt='' border='0' class='center'>".
         "&nbsp;"._("Server")."|"."newsystem_server|\n";
     }
@@ -199,9 +206,12 @@ class divListSystem extends MultiSelectWindow
       $s.= "...|<img src='plugins/systems/images/select_component.png' alt='' border='0' class='center'>".
         "&nbsp;"._("Component")."|"."newsystem_component|\n";
     }
-    if(class_available("opsigeneric") && preg_match("/c/",$ui->get_permissions($this->selectedBase,"opsi/opsigeneric"))){
-      $s.= "...|<img src='plugins/systems/images/select_component.png' alt='' border='0' class='center'>".
-        "&nbsp;"._("Opsi")."|"."newsystem_opsi_client|\n";
+
+    if($this->parent->opsi instanceof opsi && 
+        $this->parent->opsi->enabled() &&  
+        preg_match("/c/",$ui->get_permissions($this->selectedBase,"opsi/opsiGeneric"))){
+      $s.= "...|<img src='plugins/systems/images/select_winstation.png' alt='' border='0' class='center'>".
+        "&nbsp;"._("Opsi client")."|"."newsystem_opsi_client|\n";
     }
 
     if($this->parent->si_active){
@@ -268,7 +278,7 @@ class divListSystem extends MultiSelectWindow
     $ogroups = array();
     if($this->parent->fai_activated){
       $ogroups = get_sub_list("(&(objectClass=gosaGroupOfNames)(FAIclass=*)(member=*))",array("ogroups"),
-          get_ou("ogroupou"),$this->config->current['BASE'],array("FAIclass","member","cn"),GL_NO_ACL_CHECK | GL_SUBSEARCH);
+          get_ou("ogroupRDN"),$this->config->current['BASE'],array("FAIclass","member","cn"),GL_NO_ACL_CHECK | GL_SUBSEARCH);
       foreach($ogroups as $ogroup){
         for($i = 0 ; $i < $ogroup['member']['count'] ; $i++){
           if(preg_match("/:/",$ogroup['FAIclass'][0])) {
@@ -342,7 +352,10 @@ class divListSystem extends MultiSelectWindow
         $action2 = $empty;
       }
 
-      if(in_array("gotoWorkstation",$val['objectClass'])){
+      /* Add create FAI CD icon 
+       */
+      $acl_cd = preg_match("/w/",$ui->get_permissions($val['dn'],"workstation/workgeneric","createFAICD"));
+      if(in_array("gotoWorkstation",$val['objectClass']) && $acl_cd){
         $action2= "<input class='center' type='image' src='plugins/systems/images/cdrom.png' alt='"._("Create CD")."'   
                       name='gen_cd_%KEY%' title='"._("Create FAI CD")."'>&nbsp;".$action2;
       }else{