Code

Display images in the FAI class lisitng
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Sep 2009 15:49:31 +0000 (15:49 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Sep 2009 15:49:31 +0000 (15:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14426 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc

index 6d2c6bb2c64dcca6ce4868ccd5a178b588cef9a8..ae047a7e9b609968c22ce4d680606c5634669105 100644 (file)
@@ -650,11 +650,21 @@ class workstartup extends plugin
            *   use the description from FAIprofile, if possible.
            */  
           $desc = ""; 
+
+          $objects = array(
+              "Pl"  => array("IMG"=> "plugins/fai/images/fai_partitionTable.png"),
+              "Pt"     => array("IMG"=> "plugins/fai/images/fai_packages.png"),
+              "S"          => array("IMG"=> "plugins/fai/images/fai_script.png"),
+              "V"        => array("IMG"=> "plugins/fai/images/fai_variable.png"),
+              "H"            => array("IMG"=> "plugins/fai/images/fai_hook.png"),
+              "P"         => array("IMG"=> "plugins/fai/images/fai_profile.png"),
+              "T"        => array("IMG"=> "plugins/fai/images/fai_template.png"));
+
           if(isset($this->cache['CLASSES'][$this->FAIrelease][$class])){
             $desc ="";
             foreach($this->cache['CLASSES'][$this->FAIrelease][$class] as $types ){
               if(isset($types['Abbr'])){
-                $desc.= $types['Abbr']." ";
+                $desc.= "<img src='".$objects[$types['Abbr']]['IMG']."' class='center'> ";
                 if($types['Type'] == "FAIprofile"){
                   break;
                 }
@@ -662,11 +672,12 @@ class workstartup extends plugin
             }
           }
           if(!empty($desc)){
-            $desc = "&nbsp;[".trim($desc)."]";
+            $desc = "&nbsp;".trim($desc)."";
           }        
 
           $div->AddEntry(array(
-                array("string"=>$class.$desc.$marker),
+                array("string"=>$class.$marker),
+                array("string"=>$desc),
                 array("string"=>preg_replace("/\%s/",base64_encode($class),$str),"attach"=>"style='width:50px;border-right:none;'")
                 ));
         }