Code

Added description to workstation startup, fai assigment
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Oct 2007 11:32:56 +0000 (11:32 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Oct 2007 11:32:56 +0000 (11:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7438 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_workstationStartup.inc

index 02e5b7ea0c81668b990c35aacdbff524795c686c..4b55ee073be156e1a7531b5ef5187f8f08a2b09e 100644 (file)
@@ -99,7 +99,7 @@ class workstartup extends plugin
           "(objectClass=FAIprofile)".
           "(objectClass=FAIpartitionTable))",
           $ui->subtreeACL,$this->config->current['BASE'],
-          array("cn","objectClass","FAIdebianSection"));
+          array("cn","objectClass","FAIdebianSection","description"));
 
       foreach($res as $attr){
         $cn = $attr['cn'][0];
@@ -110,36 +110,43 @@ class workstartup extends plugin
           $tmp2[$cn]['FAIpackageList']['obj']   = 'FAIpackageList'; 
           $tmp2[$cn]['FAIpackageList']['kzl']   = 'Pl';
           $tmp2[$cn]['FAIpackageList']['sec']   = $attr['FAIdebianSection'];
+          $tmp2[$cn]['FAIpackageList']['desc']  = $attr['description'];
           $this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
         }
         if(in_array('FAItemplate',$attr['objectClass'])){
           $tmp2[$cn]['FAItemplate']['obj']      = 'FAItemplate'; 
           $tmp2[$cn]['FAItemplate']['kzl']      = 'T'; 
+          $tmp2[$cn]['FAItemplate']['desc']  = $attr['description'];
           $this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
         }
         if(in_array('FAIvariable',$attr['objectClass'])){
           $tmp2[$cn]['FAIvariable']['obj']      = 'FAIvariable'; 
           $tmp2[$cn]['FAIvariable']['kzl']      = 'V'; 
+          $tmp2[$cn]['FAIvariable']['desc']  = $attr['description'];
           $this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
         }
         if(in_array('FAIscript',$attr['objectClass'])){
           $tmp2[$cn]['FAIscript']['obj']        = 'FAIscript'; 
           $tmp2[$cn]['FAIscript']['kzl']        = 'S'; 
+          $tmp2[$cn]['FAIscript']['desc']  = $attr['description'];
           $this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
         }
         if(in_array('FAIhook',$attr['objectClass'])){
           $tmp2[$cn]['FAIhook']['obj']          = 'FAIhook'; 
           $tmp2[$cn]['FAIhook']['kzl']          = 'H'; 
+          $tmp2[$cn]['FAIhook']['desc']  = $attr['description'];
           $this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
         }
         if(in_array('FAIpartitionTable',$attr['objectClass'])){
           $tmp2[$cn]['FAIpartitionTable']['obj']= 'FAIpartitionTable'; 
           $tmp2[$cn]['FAIpartitionTable']['kzl']= 'Pt'; 
+          $tmp2[$cn]['FAIpartitionTable']['desc']  = $attr['description'];
           $this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
         }
         if(in_array('FAIprofile',$attr['objectClass'])){
           $tmp2[$cn]['FAIprofile']['obj']= 'FAIprofile'; 
           $tmp2[$cn]['FAIprofile']['kzl']= 'P'; 
+          $tmp2[$cn]['FAIprofile']['desc']  = $attr['description'];
           $this->FAIclasses[$attr['cn'][0]]=$attr['cn'][0];
         }
       }
@@ -765,13 +772,22 @@ class workstartup extends plugin
           }
         }
         $i ++ ; 
+  
+        $desc = ""; 
+        foreach($this->FAIclassInfo[$class] as $types ){
+          if(isset($types['desc'][0])){
+            $desc.= $types['desc'][0]." ";
+          }
+        }
+        if(!empty($desc)){
+          $desc = "&nbsp;[".trim($desc)."]";
+        }        
 
         $div->AddEntry(array(
-              array("string"=>$class.$marker),
+              array("string"=>$class.$desc.$marker),
               array("string"=>preg_replace("/\%s/",base64_encode($class),$str),"attach"=>"style='width:50px;border-right:none;'")
               ));
       }  
-
       $smarty->assign("FAIScriptlist",$div->DrawList()); 
     }