Code

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3808 594d385d-05f5-0310...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Jun 2006 06:51:39 +0000 (06:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Jun 2006 06:51:39 +0000 (06:51 +0000)
plugins/gofax/blocklists/class_blocklistManagement.inc
plugins/gofax/blocklists/class_divListBlocklists.inc

index 660a829542cfdb792b6da99463c967e25acbba77..a415e19e9ade5d4ef7638c602f28537667b44c05 100644 (file)
@@ -321,6 +321,12 @@ class blocklist extends plugin
         Divlist dialog 
        ***************/
 
+      /* Check if there is a snapshot dialog open */
+      if($str = $this->showSnapshotDialog($this->DivListBlocklist->selectedBase,
+              array("ou=gofax,ou=systems,". $this->DivListBlocklist->selectedBase))){
+        return($str);
+      }
+
       /* Display dialog with system list */
       $this->DivListBlocklist->parent = $this;
       $this->DivListBlocklist->execute();
index 42e884dc2c09859739c7876ac747748ab6518470..e2591a2e1b8e70700fbcc8c8ec678c6ac2f7ff15 100755 (executable)
@@ -44,7 +44,7 @@ class divListBlocklist extends MultiSelectWindow
     /* set Page header */
     $this->AddHeader(array("string" => "&nbsp;", "attach" => "style='text-align:center;width:20px;'"));
     $this->AddHeader(array("string" => _("Blocklist name")." / "._("Department"), "attach" => "style=''"));
-    $this->AddHeader(array("string" => _("Actions"), "attach" => "style='width:60px;border-right:0px;text-align:right;'" ));
+    $this->AddHeader(array("string" => _("Actions"), "attach" => "style='width:90px;border-right:0px;text-align:right;'" ));
 
     /* Add Checkboxes / SubSearch checkbox */
     $this->AddCheckBox("ShowSendBocklists"     , _("Select to see send blocklists"),    _("Show send blocklists"),true);
@@ -81,9 +81,16 @@ class divListBlocklist extends MultiSelectWindow
           title='"._("Go to users department")."' alt='"._("Home")."'          name='dep_home'>&nbsp;".
       " <input class='center' type='image' src='images/list_reload.png' align='middle' 
           title='"._("Reload list")."' name='submit_department' alt='".      _("Submit")."'>&nbsp;".
-      " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
-      " <input class='center' type='image' align='middle' src='images/list_new_blocklist.png' 
-          title='"._("Create new blocklist")."' alt='"._("New Blocklist")."' name='user_new'>&nbsp;".
+          " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;";
+
+    if($this->parent->snapshotEnabled()){
+      $listhead .= "  <input class='center' type='image' align='middle' src='images/restore.png'
+        title='"._("Restore snapshopts of already deleted objects")."' alt='"._("Restore")."' name='RestoreDeletedSnapShot'>".
+        " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;";
+    }
+
+    $listhead .= " <input class='center' type='image' align='middle' src='images/list_new_blocklist.png' 
+      title='"._("Create new blocklist")."' alt='"._("New Blocklist")."' name='user_new'>&nbsp;".
       " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>".
           "&nbsp;"._("Base")."&nbsp;<select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
       " <input class='center' type='image' src='images/list_submit.png' align='middle' 
@@ -101,20 +108,22 @@ class divListBlocklist extends MultiSelectWindow
 
   function setEntries($list)
   {
-    $action= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'     name='user_edit_%KEY%' title='"._("Edit user")."'>";
-    $action.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."'   name='user_del_%KEY%' title='"._("Delete user")."'>";
-
     // User and Template  Images
     $blockimg = "<img class='center' src='images/list_blocklist.png' alt='User' title='%s'>";
     $editlink = "<a href='?plug=".$_GET['plug']."&amp;id=%s&amp;act=edit_entry'>%s</a>";
 
     /* Append to list */
     foreach($list as $key => $val){
+  
+      $action = $this->GetSnapShotActions($val['dn']);
+      $action.= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'     name='user_edit_%KEY%' title='"._("Edit user")."'>";
+      $action.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."'   name='user_del_%KEY%' title='"._("Delete user")."'>";
+
       // Generate Array to Add
       $display= "[".$val["cn"][0]."]";
       $field1 = array("string" => sprintf($blockimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
       $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'");
-      $field3 = array("string" => preg_replace("/%KEY%/", "$key", $action), "attach" => "style='width:60px;border-right:0px;text-align:right;'");
+      $field3 = array("string" => preg_replace("/%KEY%/", "$key", $action), "attach" => "style='width:90px;border-right:0px;text-align:right;'");
       $this->AddElement( array($field1,$field2,$field3));
     }
   }