From 864e55294fd5efe911774221b337b1ba1829e32c Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 1 Oct 2007 11:32:56 +0000 Subject: [PATCH] Added description to workstation startup, fai assigment git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7438 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/class_workstationStartup.inc | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 02e5b7ea0..4b55ee073 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -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 = " [".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()); } -- 2.30.2