Show bypass trash checkbox again and move the delete button to the right.
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 18 Apr 2005 17:39:48 +0000 (17:39 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 18 Apr 2005 17:39:48 +0000 (17:39 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9347 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php
templates/default/message_list.tpl

index c6851131e915c5bdca8d1bf921465770887b9968..aa0a88667ac297ec339b0893559edd4d97e91779 100644 (file)
@@ -914,32 +914,35 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) {
                            'markFlagged'   => 1,
                            'markRead'      => 1,
                            'markUnread'    => 1,
+                           'forward'       => 1,
                            'delete'        => 1,
                            'undeleteButton'=> 1,
                            'bypass_trash'  => 1,
                            'expungeButton' => 1,
-                           'moveButton'    => 1,
-                           'forward'       => 1
+                           'moveButton'    => 1
                            );
     /* user prefs control */
     $aUserControl = array (
+
                            'markUnflagged' => $show_flag_buttons,
                            'markFlagged'   => $show_flag_buttons,
                            'markRead'      => 1,
                            'markUnread'    => 1,
+                           'forward'       => 1,
                            'delete'        => 1,
                            'undeleteButton'=> 1,
                            'bypass_trash'  => 1,
                            'expungeButton' => 1,
-                           'moveButton'    => 1,
-                           'forward'       => 1
+                           'moveButton'    => 1
+
                           );
 
     $showDelete = ($aMailbox['RIGHTS'] != 'READ-ONLY' &&
                    in_array('\\deleted',$aMailbox['PERMANENTFLAGS'], true)) ? true : false;
-    $showByPassTrash = (!$aMailbox['AUTO_EXPUNGE'] && $aMailbox['RIGHTS'] != 'READ-ONLY' &&
+    $showByPassTrash = (($aMailbox['AUTO_EXPUNGE'] && $aMailbox['RIGHTS'] != 'READ-ONLY' &&
                    in_array('\\deleted',$aMailbox['PERMANENTFLAGS'], true)) &&
-                   $trash_folder ? true : false; //
+                   $trash_folder) ? true : false; //
+
     $showUndelete = (!$aMailbox['AUTO_EXPUNGE'] && $aMailbox['RIGHTS'] != 'READ-ONLY' &&
                    in_array('\\deleted',$aMailbox['PERMANENTFLAGS'], true) && !$trash_folder) ? true : false;
     $showMove   = ($aMailbox['RIGHTS'] != 'READ-ONLY') ? true : false;
@@ -950,25 +953,27 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) {
                            'markFlagged'   => in_array('\\flagged',$aMailbox['PERMANENTFLAGS'], true),
                            'markRead'      => in_array('\\seen',$aMailbox['PERMANENTFLAGS'], true),
                            'markUnread'    => in_array('\\seen',$aMailbox['PERMANENTFLAGS'], true),
+                           'forward'       => 1,
                            'delete'        => $showDelete,
                            'undeleteButton'=> $showUndelete,
                            'bypass_trash'  => $showByPassTrash,
                            'expungeButton' => $showExpunge,
-                           'moveButton'    => $showMove,
-                           'forward'       => 1
+                           'moveButton'    => $showMove
                           );
     $aButtonStrings = array(
                            'markUnflagged' => _("Unflag"),
                            'markFlagged'   => _("Flag"),
                            'markRead'      => _("Read"),
                            'markUnread'    => _("Unread"),
+                           'forward'       => _("Forward"),
                            'delete'    => _("Delete"),
                            'undeleteButton'  => _("Undelete"),
                            'bypass_trash'  => _("Bypass Trash"),
                            'expungeButton' => _("Expunge"),
-                           'moveButton'          => _("Move"),
-                           'forward'       => _("Forward")
+                           'moveButton'          => _("Move")
                            );
+
+
     /**
      * Register buttons in order to an array
      * The key is the "name", the first element of the value array is the "value", second argument is the type.
index d214d739d7f4f82e9bd75d972d7cae1f48268cb7..cbf256d0a3be143d0dcc6fd1258e88101341b5e2 100644 (file)
@@ -139,16 +139,18 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16];
         foreach ($aFormElements as $key => $value) {
             switch ($value[1]) {
             case 'submit':
-                if ($key != 'moveButton') { // add move in a different table cell
+                if ($key != 'moveButton' && $key != 'delete' && $key != 'undeleteButton') { // add move in a different table cell
 ?>
                   <input type="submit" name="<?php echo $key; ?>" value="<?php echo $value[0]; ?>" style="padding: 0px; margin: 0px;" />&nbsp;
 <?php
-            }
+                }
                 break;
             case 'checkbox':
+                if ($key != 'bypass_trash') {
 ?>
                   <input type="checkbox" name="<?php echo $key; ?>" /><?php echo $value[0]; ?>&nbsp;
 <?php
+                }
                 break;
             case 'hidden':
                  echo '<input type="hidden" name="'.$key.'" value="'. $value[0]."\">\n";
@@ -163,8 +165,31 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16];
 
 
 <?php
+        if (isset($aFormElements['delete'])) {
+?>
+              <td align="<?php echo $align['right']; ?>">
+                <small>
+                  <input type="submit" name="delete" value="<?php echo $aFormElements['delete'][0]; ?>" style="padding: 0px; margin: 0px;" />&nbsp;
+ <?php
+            if (isset($aFormElements['bypass_trash'])) {
+?>
+                  <input type="checkbox" name="bypass_trash" /><?php echo $aFormElements['bypass_trash'][0]; ?>&nbsp;
+<?php
+            }
+            if (isset($aFormElements['undeleteButton'])) {
+?>
+                  <input type="submit" name="undeleteButton" value="<?php echo $aFormElements['undeleteButton'][0]; ?>" style="padding: 0px; margin: 0px;" />&nbsp;
+<?php
+            }
+?>
+               </small>
+              </td>
+<?php
+        } // if (isset($aFormElements['delete']))
         if (isset($aFormElements['moveButton'])) {
-?>              <small>&nbsp;
+?>
+              <td align="<?php echo $align['right']; ?>">
+                <small>&nbsp;
                   <tt>
                     <select name="targetMailbox">
                        <?php echo $aFormElements['targetMailbox'][0];?>
@@ -172,10 +197,11 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16];
                   </tt>
                   <input type="submit" name="moveButton" value="<?php echo $aFormElements['moveButton'][0]; ?>" style="padding: 0px; margin: 0px;" />
                 </small>
+              </td>
+
 <?php
         } // if (isset($aFormElements['move']))
 ?>
-              </td>
             </tr>
           </table>
         </td>
@@ -345,7 +371,7 @@ $clickedColor = (empty($color[16])) ? $color[2] : $color[16];
             switch ($aColumns[SQM_COL_PRIO]['value']) {
                 case 1:
                 case 2: $sValue .= "<font color=\"$color[1]\">!</font>"; break;
-               // use downwards arrow for low priority emails
+        // use downwards arrow for low priority emails
                 case 5: $sValue .= "<font color=\"$color[8]\">&#8595;</font>"; break;
                 default: break;
             }