summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c09fe43)
raw | patch | inline | side by side (parent: c09fe43)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 23 Oct 2008 13:50:28 +0000 (13:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 23 Oct 2008 13:50:28 +0000 (13:50 +0000) |
-Fixed display of fai classes
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12772 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12772 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
index 0235937ba16cfc162ee7142a45a412e44232807b..33d671a865bcf5aa04751361d7f31f29fa288401 100644 (file)
$div = new divSelectBox("WSFAIscriptClasses");
$div -> SetHeight("110");
- $str_up = " <input type='image' src='images/lists/sort-up.png' name='sort_up_%s' value='%s'>";
- $str_down = " <input type='image' src='images/lists/sort-down.png' name='sort_down_%s' value='%s'>";
- $str_remove = " <input type='image' src='images/lists/trash.png' name='fai_remove_%s' value='%s'>";
+
$str_empty = " <img src='images/empty.png' alt=\"\" width='7'>";
+ if($this->acl_is_writeable("FAIclass")){
+ $str_up = " <input type='image' src='images/lists/sort-up.png' name='sort_up_%s' value='%s'>";
+ $str_down = " <input type='image' src='images/lists/sort-down.png' name='sort_down_%s' value='%s'>";
+ $str_remove = " <input type='image' src='images/lists/trash.png' name='fai_remove_%s' value='%s'>";
+ }else{
+ $str_up=$str_down=$str_remove=$str_empty;
+ }
/* Get classes */
if($this->FAIdebianMirror == "inherited"){
/* Draw every single entry */
$i = 1;
- foreach($tmp as $class){
+ if($this->acl_is_readable("FAIclass")){
+ foreach($tmp as $class){
- /* Mark invalid classes. (Not in selected release)
- */
- $marker = "";
- if(in_array_ics($class,$invalid)){
- $marker = " <font color='red'>("._("Not available in current setup").")</font>";
- }
+ /* Mark invalid classes. (Not in selected release)
+ */
+ $marker = "";
+ if(in_array_ics($class,$invalid)){
+ $marker = " <font color='red'>("._("Not available in current setup").")</font>";
+ }
- /* Create up/down priority icons
- * Skip this, if we have inherited the FAI classes.
- */
- if($this->FAIdebianMirror == "inherited"){
- $str = "";
- }else{
- if($i==1){
- $str = $str_empty.$str_down.$str_remove;
- }elseif($i == count($this->FAIclass)){
- $str = $str_up.$str_empty.$str_remove;
+ /* Create up/down priority icons
+ * Skip this, if we have inherited the FAI classes.
+ */
+ if($this->FAIdebianMirror == "inherited"){
+ $str = "";
}else{
- $str = $str_up.$str_down.$str_remove;
+ if($i==1){
+ $str = $str_empty.$str_down.$str_remove;
+ }elseif($i == count($this->FAIclass)){
+ $str = $str_up.$str_empty.$str_remove;
+ }else{
+ $str = $str_up.$str_down.$str_remove;
+ }
}
- }
- $i ++ ;
-
- /* Get Description tag
- * There may be several FAI objects with the same class name,
- * use the description from FAIprofile, if possible.
- */
- $desc = "";
- if(isset($this->cache['CLASSES'][$this->FAIrelease][$class])){
- foreach($this->cache['CLASSES'][$this->FAIrelease][$class] as $types ){
- if(isset($types['Desc'])){
- $desc= $types['Desc'];
- if($types['Type'] == "FAIprofile"){
- break;
+ $i ++ ;
+
+ /* Get Description tag
+ * There may be several FAI objects with the same class name,
+ * use the description from FAIprofile, if possible.
+ */
+ $desc = "";
+ if(isset($this->cache['CLASSES'][$this->FAIrelease][$class])){
+ foreach($this->cache['CLASSES'][$this->FAIrelease][$class] as $types ){
+ if(isset($types['Desc'])){
+ $desc= $types['Desc'];
+ if($types['Type'] == "FAIprofile"){
+ break;
+ }
}
}
}
- }
- if(!empty($desc)){
- $desc = " [".trim($desc)."]";
- }
-
- $div->AddEntry(array(
- 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());
+ if(!empty($desc)){
+ $desc = " [".trim($desc)."]";
+ }
+
+ $div->AddEntry(array(
+ array("string"=>$class.$desc.$marker),
+ array("string"=>preg_replace("/\%s/",base64_encode($class),$str),"attach"=>"style='width:50px;border-right:none;'")
+ ));
+ }
+ }// END FAI output generation
}// END FAI output generation
+ $smarty->assign("FAIScriptlist",$div->DrawList());
/* Radio button group */
if (preg_match("/G/", $this->bootmode)) {