Code

Added navigation gray out if option is not available
[gosa.git] / plugins / admin / systems / class_divListSystem.inc
index c5665751c8d9a00b726c01262ab5b7c419e0ba68..9d732b212e45a718e8e667442c171d40f5aeaaa3 100644 (file)
@@ -6,6 +6,7 @@ class divListSystem extends MultiSelectWindow
   /* Current base */
   var $selectedBase       = "";
   var $departments        = array();
+  var $do_iso             = FALSE;
 
   /* Regex */
   var $Regex              = "*";
@@ -33,6 +34,10 @@ class divListSystem extends MultiSelectWindow
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
 
+    if (search_config($config->data['TABS'], "workgeneric", "ISOCMD")){
+      $this->do_iso= TRUE;
+    }
+
     /* Set list strings */
     $this->SetTitle(_("List of systems"));
     $this->SetSummary(_("List of systems"));
@@ -83,16 +88,10 @@ class divListSystem extends MultiSelectWindow
         $options.= "<option value='$key'>$value</option>";
       }
     }
-    $listhead = "<div style='background:#F0F0F9;padding:5px;'>".
-    " <input class='center' type='image' src='images/list_root.png' align='middle'
-        title='"._("Go to root department")."' name='dep_root' alt='"._("Root")."'>&nbsp;".
-    " <input class='center' type='image' align='middle' src='images/list_back.png'
-        title='"._("Go up one department")."' alt='"._("Up")."' name='dep_back'>&nbsp;".
-    " <input class='center' type='image' align='middle' src='images/list_home.png'
-        title='"._("Go to users department")."' alt='"._("Home")."'                     name='dep_home'>&nbsp;".
-    " <input class='center' type='image' src='images/list_reload.png' align='middle' title='"._("Reload list")."' name='submit_department' alt='".          _("Submit")."'>&nbsp;".
-    " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
-    " <input class='center' type='image' align='middle' src='images/select_new_terminal.png'
+
+    /* Add default header */
+    $listhead = MultiSelectWindow::get_default_header();
+    $listhead.=" <input class='center' type='image' align='middle' src='images/select_new_terminal.png'
         name='newsystem_terminal'    alt='"._("New Terminal template")."' title='"._("New Terminal")."'>".
     " <input class='center' type='image' align='middle' src='images/select_new_workstation.png'
         name='newsystem_workstation' alt='"._("New Workstation template")."' title='"._("New Workstation")."'>".
@@ -175,12 +174,13 @@ class divListSystem extends MultiSelectWindow
         $action2 = "";
       }
 
-      if(in_array("gotoWorkstation",$val['objectClass'])){
+      if($this->do_iso && in_array("gotoWorkstation",$val['objectClass'])){
         $action2= "<input class='center' type='image' src='images/cdrom.png' alt='"._("Create CD")."'   name='gen_cd_%KEY%' title='"._("Create FAI CD")."'>".$action2;
       }
 
+      /* Add Message generated by mangement->reload*/  
       if(isset($val['message'])){
-        $display.= "  (".$val['message']." '".$this->config->idepartments[$_SESSION['CurrentMainBase']]."'  )";
+        $display.= "  (".$val['message'].")";
       }
 
       $img    = $this->parent->convert_list($val);