Code

Initial freeze check in for application freezes.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 4 Aug 2006 08:44:04 +0000 (08:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 4 Aug 2006 08:44:04 +0000 (08:44 +0000)
No acls handling implemented yet...

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4386 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/applications/class_applicationManagement.inc
plugins/admin/applications/class_divListApplication.inc

index af900c92e0513d190f7f5f706e845517fbb6c6f6..1df485d75eb786dc2414615d9f66ae7a978c06fd 100644 (file)
@@ -72,7 +72,7 @@ class applicationManagement extends plugin
     $ldap                   = $this->config->get_ldap_link();
     $dn                     = "ou=apps,".$base;
     $ret                    = array();
-    $ret [$base] = "/";
+    $ret [$dn] = "/";
 
     $ldap->cd($dn);
     $ldap->search("objectClass=organizationalUnit",array("ou"));
@@ -396,7 +396,7 @@ class applicationManagement extends plugin
       $Flags    |= GL_SUBSEARCH;  
     }
    
-    $res= get_list($Filter, $this->ui->subtreeACL,$use_base, array("cn","description","dn","objectClass"), $Flags);
+    $res= get_list($Filter, $this->ui->subtreeACL,$use_base, array("cn","description","dn","objectClass","FAIstate"), $Flags);
     foreach ($res as $val){
       $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
     }
index e5bddf2ceaf4d5f9740b1f3f3d3ff4ee28664c28..612d530b3edd1fb3bc8b040966e5a722f69b4a5a 100755 (executable)
@@ -131,25 +131,40 @@ class divListApplication extends MultiSelectWindow
     $empty    = "<img class='center' src='images/empty.png' style='width:16px;height:16px;' alt=''>";
 
 
-    /* Create action icons */
-    $actions = "";
-    if($this->parent->CopyPasteHandler){
-      $actions.= "<input class='center' type='image'
-        src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'>&nbsp;";
-      $actions.= "<input class='center' type='image'
-        src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'>&nbsp;";
-    }
-    $actions.= "<input class='center' type='image'
-      src='images/edit.png' alt='"._("edit")."' name='appl_edit_%KEY%' title='"._("Edit this entry")."'>";
-    $actions.= "<input class='center' type='image'
-      src='images/edittrash.png' alt='"._("delete")."' name='appl_del_%KEY%' title='"._("Delete this entry")."'>";
-
-
     /********************
       Attach objects
      ********************/
 
     foreach($list as $key => $val){
+
+      /* Get state */
+      $state = "";
+      if(isset($val['FAIstate'])){
+        $state = $val['FAIstate'][0];
+      }
+
+      /* If this application is a freezed one, we must hide some action buttons */
+      $is_freezed = preg_match("/freeze/i",$state);
+
+      /* Create action icons */
+      $actions = "";
+      if(($this->parent->CopyPasteHandler) && (!$is_freezed)){
+        $actions.= "<input class='center' type='image'
+          src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'>&nbsp;";
+        $actions.= "<input class='center' type='image'
+          src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'>&nbsp;";
+      }
+    
+      $actions.= "<input class='center' type='image'
+        src='images/edit.png' alt='"._("edit")."' name='appl_edit_%KEY%' title='"._("Edit this entry")."'>";
+      if($is_freezed){
+        $actions.= "<img src='empty' width='32' alt='&nbsp;' >";
+      }else{
+        $actions.= "<input class='center' type='image'
+          src='images/edittrash.png' alt='"._("delete")."' name='appl_del_%KEY%' title='"._("Delete this entry")."'>";
+      }
+
+
       $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
 
       if(!isset($val['description'][0])){