Code

Apply patch from mba: If all classes of a certain type are in FAIstate freeze, don...
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Mar 2009 11:17:38 +0000 (11:17 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Mar 2009 11:17:38 +0000 (11:17 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13561 594d385d-05f5-0310-b6e9-bd551577e9d8

trunk/gosa-plugins/fai/admin/fai/class_divListFai.inc

index 28c00143c1029e3e0aa18391b51e166992ff1e1f..620aaa7459626985db899c7ed8676d6902386d4b 100644 (file)
@@ -248,8 +248,13 @@ class divListFai extends MultiSelectWindow
       $name = "";
       $icon_list = "";
       $opsi_only = TRUE;
+      $locked = TRUE;
       foreach($objects as $type => $type_data){
         if(isset($value[$type])){
+          if(!preg_match("/^freeze/", $value[$type]['FAIstate'])){
+            /* at least one FAI object of this name is not frozen. */
+            $locked = FALSE;
+          }
           $name = $value[$type]['cn'];
           $icon_list .= "<input type='image' src='".$type_data['IMG']."' title='".$type_data['NAME']."' 
             alt='".$type_data['KZL']."' class='center' name='edit_".$key."_".$type."'>\n";
@@ -282,8 +287,12 @@ class divListFai extends MultiSelectWindow
 
         $actions.= "<input type='image' name='group_edit_".$key."' class='center'
           src='images/lists/edit.png'>";
-        $actions.= "<input type='image' name='group_remove_".$key."' class='center'
-          src='images/lists/trash.png'>";
+        if($locked) {
+          $actions.= "<img src='images/lists/locked.png' alt='F' class='center'>";
+        }else{
+          $actions.= "<input type='image' name='group_remove_".$key."' class='center'
+            src='images/lists/trash.png'>";
+        }
       }
 
       /* Create list