Code

Updated FAI template entry.
[gosa.git] / gosa-plugins / fai / admin / fai / class_divListFai.inc
index ebb49b04b7798c7118cf1d8416360feed296a601..f171d9c0655394c665cdec7be0d473340f13db80 100644 (file)
@@ -313,7 +313,11 @@ class divListFai extends MultiSelectWindow
 
         $display = "<div style='overflow:hidden; height:1em;'>".$display."</div>";
 
-       /* Create each field */
+        /* Some objects are non ldap objects which do not have a dn.
+         */
+        if(!isset($value['dn'])) $value['dn'] = "";
+
+        /* Create each field */
        $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
            "attach" => "style='width:20px;'");
        $field1 = array("string" => $img , "attach" => "style='text-align:center;width:20px;'");
@@ -337,24 +341,33 @@ class divListFai extends MultiSelectWindow
      $template_str   = sprintf(_("Number of listed '%s'"),_("templates"));
      $package_str    = sprintf(_("Number of listed '%s'"),_("packages"));   
      $dep_str        = sprintf(_("Number of listed '%s'"),_("departments"));
+     $opsi_netboot   = sprintf(_("Number of listed '%s'"),_("netboot products"));
+     $opsi_local     = sprintf(_("Number of listed '%s'"),_("local products"));
+
+     $str = "<img class=\"center\" src=\"".$objects['FAIprofile']['IMG']."\"
+       title=\"".$profile_str."\" alt=\"".$profile_str."\">&nbsp;".$cnts['FAIprofile']."&nbsp;&nbsp;&nbsp;&nbsp;";
+     $str.= "<img class=\"center\" src=\"".$objects['FAIpartitionTable']['IMG']."\"
+       title=\"".$partition_str."\" alt=\"".$partition_str."\">&nbsp;".$cnts['FAIpartitionTable']."&nbsp;&nbsp;&nbsp;&nbsp;";
+     $str.= "<img class=\"center\" src=\"".$objects['FAIscript']['IMG']."\"
+       title=\"".$script_str."\" alt=\"".$script_str."\">&nbsp;".$cnts['FAIscript']."&nbsp;&nbsp;&nbsp;&nbsp;";
+     $str.= "<img class=\"center\" src=\"".$objects['FAIhook']['IMG']."\"
+       title=\"".$hook_str."\" alt=\"".$hook_str."\">&nbsp;".$cnts['FAIhook']."&nbsp;&nbsp;&nbsp;&nbsp;";
+     $str.= "<img class=\"center\" src=\"".$objects['FAIvariable']['IMG']."\"
+       title=\"".$variable_str."\" alt=\"".$variable_str."\">&nbsp;".$cnts['FAIvariable']."&nbsp;&nbsp;&nbsp;&nbsp;";
+     $str.= "<img class=\"center\" src=\"".$objects['FAItemplate']['IMG']."\"
+       title=\"".$template_str."\" alt=\"".$template_str."\">&nbsp;".$cnts['FAItemplate']."&nbsp;&nbsp;&nbsp;&nbsp;";
+     $str.= "<img class=\"center\" src=\"".$objects['FAIpackageList']['IMG']."\"
+       title=\"".$package_str."\" alt=\"".$package_str."\">&nbsp;".$cnts['FAIpackageList']."&nbsp;&nbsp;&nbsp;&nbsp;";
+     $str.= "<img class=\"center\" src='images/lists/folder.png'
+       title=\"".$dep_str."\" alt=\"".$dep_str."\">&nbsp;".$num_deps."&nbsp;&nbsp;&nbsp;&nbsp;";
 
-     $str = "<img class='center' src='".$objects['FAIprofile']['IMG']."'
-       title='".$profile_str."' alt='".$profile_str."'>&nbsp;".$cnts['FAIprofile']."&nbsp;&nbsp;&nbsp;&nbsp;";
-     $str.= "<img class='center' src='".$objects['FAIpartitionTable']['IMG']."'
-       title='".$partition_str."' alt='".$partition_str."'>&nbsp;".$cnts['FAIpartitionTable']."&nbsp;&nbsp;&nbsp;&nbsp;";
-     $str.= "<img class='center' src='".$objects['FAIscript']['IMG']."'
-       title='".$script_str."' alt='".$script_str."'>&nbsp;".$cnts['FAIscript']."&nbsp;&nbsp;&nbsp;&nbsp;";
-     $str.= "<img class='center' src='".$objects['FAIhook']['IMG']."'
-       title='".$hook_str."' alt='".$hook_str."'>&nbsp;".$cnts['FAIhook']."&nbsp;&nbsp;&nbsp;&nbsp;";
-     $str.= "<img class='center' src='".$objects['FAIvariable']['IMG']."'
-       title='".$variable_str."' alt='".$variable_str."'>&nbsp;".$cnts['FAIvariable']."&nbsp;&nbsp;&nbsp;&nbsp;";
-     $str.= "<img class='center' src='".$objects['FAItemplate']['IMG']."'
-       title='".$template_str."' alt='".$template_str."'>&nbsp;".$cnts['FAItemplate']."&nbsp;&nbsp;&nbsp;&nbsp;";
-     $str.= "<img class='center' src='".$objects['FAIpackageList']['IMG']."'
-       title='".$package_str."' alt='".$package_str."'>&nbsp;".$cnts['FAIpackageList']."&nbsp;&nbsp;&nbsp;&nbsp;";
-     $str.= "<img class='center' src='images/lists/folder.png'
-       title='".$dep_str."' alt='".$dep_str."'>&nbsp;".$num_deps."&nbsp;&nbsp;&nbsp;&nbsp;";
-     $this->set_List_Bottom_Info($str);
+    if($this->parent->opsi instanceof opsi && $this->parent->opsi->enabled()){
+      $str.= "<img class=\"center\" src=\"".$objects['opsi_netboot']['IMG']."\"
+        title=\"".$opsi_netboot."\" alt=\"".$opsi_netboot."\">&nbsp;".$cnts['opsi_netboot']."&nbsp;&nbsp;&nbsp;&nbsp;";
+      $str.= "<img class=\"center\" src=\"".$objects['opsi_local']['IMG']."\"
+        title=\"".$opsi_local."\" alt=\"".$opsi_local."\">&nbsp;".$cnts['opsi_local']."&nbsp;&nbsp;&nbsp;&nbsp;";
+    }
+    $this->set_List_Bottom_Info($str);
   }
 
   function Save()