Templates for reading a message
authorstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 6 Oct 2006 21:57:26 +0000 (21:57 +0000)
committerstevetruckstuff <stevetruckstuff@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 6 Oct 2006 21:57:26 +0000 (21:57 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11850 7612ce4b-ef26-0410-bec9-ea0150e637f0

templates/default/read_attachments.tpl [new file with mode: 0644]
templates/default/read_display_images_inline.tpl [new file with mode: 0644]
templates/default/read_handle_receipt.tpl [new file with mode: 0644]
templates/default/read_headers.tpl [new file with mode: 0644]
templates/default/read_menubar_buttons.tpl [new file with mode: 0644]
templates/default/read_menubar_nav.tpl [new file with mode: 0644]
templates/default/read_message_body.tpl [new file with mode: 0644]
templates/default/read_message_priority.tpl [new file with mode: 0644]
templates/default/read_recipient_list.tpl [new file with mode: 0644]
templates/default/read_toolbar.tpl [new file with mode: 0644]
templates/default/read_xmailer.tpl [new file with mode: 0644]

diff --git a/templates/default/read_attachments.tpl b/templates/default/read_attachments.tpl
new file mode 100644 (file)
index 0000000..0ed0916
--- /dev/null
@@ -0,0 +1,102 @@
+<?php
+/**
+ * read_attachments.tpl
+ *
+ * Template used to generate the attachment list while reading a message.  This
+ * template is called from the function formatAttachments() in functions/mime.php.
+ * 
+ * The following variables are available in this template:
+ *    $attachments - array containing info for all message attachments.  Each
+ *                   element in the array represents a separate attachment and
+ *                   contains the following elements:
+ *       $el['Name']         - The name of the attachment
+ *       $el['Description']  - Description of the attachment
+ *       $el['DefaultHREF']  - URL to the action that should occur when the name is clicked
+ *       $el['DownloadHREF'] - URL to download the attachment
+ *       $el['ViewHREF']     - URL to view the attachment.  Empty if not available.
+ *       $el['Size']         - Size of attachment in bytes.
+ *       $el['ContentType']  - Content-Type of the attachment
+ *       $el['OtherLinks']   - array containing links to any other actions
+ *                             available for this attachment that might be
+ *                             provided by plugins, for example.  Each element represents
+ *                             a different action and contains the following elements:
+ *            $link['HREF'] - URL to access the functionality
+ *            $link['Text'] - Text representing the functionality.
+ *
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+/** add required includes **/
+require(SM_PATH . 'templates/util_global.php');
+
+/** extract template variables **/
+extract($t);
+
+/** Begin template **/
+if (count($attachments)==0) {
+    # If there are no attachments, display nothing.
+    return '';
+}
+
+?>
+<div class="readAttachments">
+<table cellspacing="0" class="table2">
+ <tr>
+  <td class="header5" colspan="5">
+   <?php echo _("Attachments"); ?>
+  </td>
+ </tr>
+ <?php
+    foreach ($attachments as $count=>$attachment) {
+        ?>
+ <tr class="<?php echo ($count%2 ? 'odd' : 'even'); ?>">
+  <td class="attachName">
+   <a href="<?php echo $attachment['DefaultHREF']; ?>"><?php echo $attachment['Name']; ?></a>
+  </td>
+  <td class="attachType">
+   <small><?php echo $attachment['ContentType']; ?></small>
+  </td>
+  <td class="attachSize">
+   <small><?php echo humanReadableSize($attachment['Size']); ?></small>
+  </td>
+  <td class="attachDesc">
+   <small><?php echo $attachment['Description']; ?></small>
+  </td>
+  <td class="attachActions">
+   <small>
+   <a href="<?php echo $attachment['DownloadHREF']; ?>"><?php echo _("Download"); ?></a>
+   <?php
+    if (!empty($attachment['ViewHREF'])) {
+        ?>
+   &nbsp;|&nbsp;
+   <a href="<?php echo $attachment['ViewHREF']; ?>"><?php echo _("View"); ?></a>
+        <?php
+    }
+    
+    foreach ($attachment['OtherLinks'] as $link) {
+        ?>
+   &nbsp;|&nbsp;
+   <a href="<?php echo $link['HREF']; ?>"><?php echo $link['Text']; ?></a>
+        <?php
+    }
+   ?>
+   </small>
+  </td>
+ </tr>
+        <?php
+    }
+    
+    if (!empty($plugin_output['attachments_bottom'])) echo $plugin_output['attachments_bottom'];
+ ?>
+</table>
+<table cellspacing="0" class="spacer">
+ <tr>
+  <td>
+  </td>
+ </tr>
+</table>
+</div>
\ No newline at end of file
diff --git a/templates/default/read_display_images_inline.tpl b/templates/default/read_display_images_inline.tpl
new file mode 100644 (file)
index 0000000..b2ce6e0
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+/**
+ * read_display_images_inline.tpl
+ *
+ * Template for displaying attached images inline, when desired by the user.
+ * 
+ * The following variables are available in this template:
+ *      $images - array containing all the images to be displayed.  Each element
+ *                is an array representing an image and contains the following elements:
+ *          $im['Name']        - The name of the attached image
+ *          $im['DisplayURL']  - URL for use with src attribute of img tag to display the image
+ *          $im['DownloadURL'] - URL to download the image. 
+ *
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+/** add required includes **/
+
+/** extract template variables **/
+extract($t);
+
+/** Begin template **/
+if (count($images) == 0) {
+    # If we don't have any images, don't do anything
+    return '';
+}
+
+?>
+<div class="readInlineImages">
+<table cellspacing="0" class="table_blank">
+ <?php
+  foreach ($images as $img) {
+    ?>
+ <tr>
+  <td>
+   <table cellspacing="0">
+    <tr>
+     <td class="header5">
+      <small><?php echo $img['Name']; ?></small>
+      <?php
+        if (!empty($img['DownloadURL'])) {
+            ?>
+      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+      <a href="<?php echo $img['DownloadURL']; ?>"><?php echo _("Download"); ?></a>
+            <?php
+        }
+      ?>
+     </td>
+     <td>&nbsp;</td>
+    </tr>
+    <tr>
+     <td colspan="2" class="image">
+      <img src="<?php echo $img['DisplayURL']; ?>" />
+     </td>
+    </tr>
+   </table>
+  </td>
+ </tr>
+    <?php
+  }
+ ?>
+</table>
+</div>
\ No newline at end of file
diff --git a/templates/default/read_handle_receipt.tpl b/templates/default/read_handle_receipt.tpl
new file mode 100644 (file)
index 0000000..fe17ad5
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+/**
+ * read_handle_receipt.tpl
+ *
+ * Template to generate output for handling read receipts.
+ * 
+ * The following variables are available in this template:
+ * 
+ *     $read_receipt_sent - boolean TRUE if the read receipt has already been sent
+ *     $first_time_reading - boolean TRUE if this is the first time this message
+ *                           has been seen
+ *     $send_receipt_href  - URL to send a read receipt now.
+ *
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+/** add required includes **/
+
+/** extract template variables **/
+extract($t);
+
+/** Begin template **/
+if ($read_receipt_sent) {
+    echo  _("Sent");
+} else {
+    ?>
+<?php echo _("Requested"); ?>&nbsp;
+<small>[ <a href="<?php echo $send_receipt_href; ?>"><?php echo _("Send Read Receipt Now"); ?></a> ]</small>
+    <?php
+    if ($first_time_reading && $javascript_on) {
+        ?>
+<script type="text/javascript">
+<!--
+if (confirm("<?php echo _("The message sender has requested a response to indicate that you have read this message. Would you like to send a receipt?"); ?>")) {
+    sendMDN();
+}
+// -->
+</script>
+        <?php
+    }
+}
+?>
\ No newline at end of file
diff --git a/templates/default/read_headers.tpl b/templates/default/read_headers.tpl
new file mode 100644 (file)
index 0000000..bb91425
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/**
+ * read_headers.tpl
+ *
+ * Template to display the envelope headers when viewing a message.
+ * 
+ * The following variables are available in this template:
+ * 
+ *    $headers_to_display - array containing the list of all elements that need
+ *             to be displayed.  The index of each element is the translated name
+ *             of the field to be displayed.  The value of each element is the
+ *             value to be displayed for that field.  Many values can be controled
+ *             through additional templates.
+ * 
+ *
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+/** add required includes **/
+
+/** extract template variables **/
+extract($t);
+
+/** Begin template **/
+?>
+<div class="readHeaders">
+<table cellspacing="0" class="spacer">
+ <tr>
+  <td>
+  </td>
+ </tr>
+</table>
+<table cellspacing="0" class="table2">
+ <?php
+    foreach ($headers_to_display as $field_name=>$value) {
+        if (empty($value)) {
+            # Skip enpty headers
+            continue;
+        }
+        ?>
+ <tr>
+  <td class="fieldName">
+   <?php echo $field_name; ?>:
+  </td>
+  <td class="fieldValue">
+   <?php echo $value; ?>
+  </td>
+ </tr>
+        <?php
+    }
+ ?>
+ <tr>
+  <td>
+   <?php if(!empty($plugin_output['read_body_header'])) echo $plugin_output['read_body_header']; ?>
+  </td>
+ </tr>
+</table>
+<table cellspacing="0" class="spacer">
+ <tr>
+  <td>
+  </td>
+ </tr>
+</table>
+</div>
\ No newline at end of file
diff --git a/templates/default/read_menubar_buttons.tpl b/templates/default/read_menubar_buttons.tpl
new file mode 100644 (file)
index 0000000..3ea20d9
--- /dev/null
@@ -0,0 +1,140 @@
+<?php
+/**
+ * read_menubar_buttons.tpl
+ *
+ * Tempalte for displaying the action buttons, e.g. Reply, Reply All, Forward,
+ * etc., while reading a message.  When combined with the read_menubar_nav template,
+ * the entire menu bar is displayed.
+ * 
+ * The following variables are available in this template:
+ *    $nav_on_top       - boolean TRUE if the navigation buttons are on top of the
+ *                        action buttons generated here.
+ *    $prev_href        - URL to move to the previous message.  Empty if not avilable.
+ *    $up_href          - URL to move up in the message.  Empty if not available.
+ *    $next_href    - URL to move to the next nessage.  Empty when N/A.
+ *    $del_prev_href - URL to delete this message and move to the next one.  Empty if N/A.
+ *    $del_next_href - URL to delete this message and move to the next one.  Empty if N/A.
+ *    $view_msg_href - URL to go back to the main message.  Empty if N/A.
+ *    $msg_list_href - URL to go to the message list.
+ *    $search_href   - URL to go back to the serach results.  Empty if N/A.
+ *    $form_extra    - Extra elements required by the forms to delete, move or copy
+ *    $compose_href  - Base URL to forward, reply, etc.  Note that a specific action
+ *                     must also be given by the form or in this URL.
+ *    $on_click      - Onclick event string for all buttons
+ *    $forward_as_attachment_enabled - boolean TRUE if forwarding as attachments
+ *                     has been enabled.
+ *    $can_resume_draft - boolean TRUE if the "resume draft" is legitimate for
+ *                     this message.
+ *    $can_edit_as_new - boolean TRUE if the "reasume as new" action is legitimate
+ *                     for this message
+ *    $mailboxes     - array containing list of mailboxes available for move/copy action.
+ *    $can_be_deleted - boolean TRUE if this message can be deleted.
+ *    $can_be_moved  - boolean TRUE if this message can be moved.
+ *    $cab_be_copied - boolean TRUE if this message can be copied to another folder.
+ *    $move_delete_form_action - the value for the ACTION attribute of forms to
+ *                     move, copy or delete a message
+ *    $delete_form_extra - additional input elements needed by the DELETE form
+ *    $move_form_extra - additional input elements needed by the MOVE form.
+ *    $last_move_target - the last folder that a message was moved/copied to. 
+ *    
+ *
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+/** add required includes **/
+
+/** extract template variables **/
+extract($t);
+
+/** Begin template **/
+if ($nav_on_top) {
+    $table_class = 'bottom';
+    $plugin_hook = 'read_body_menu_buttons_top';
+} else {
+    $table_class = 'top';
+    $plugin_hook = 'read_body_menu_buttons_bottom';
+}
+?>
+<div class="readMenuBar">
+<table class="<?php echo $table_class; ?>" cellspacing="0">
+ <tr class="buttons">
+  <td class="buttons">
+   <form name="composeForm" action="<?php echo $compose_href; ?>" <?php echo $form_extra; ?> >
+   <small>
+    <?php
+        if ($can_resume_draft) {
+            ?>
+    <input type="submit" name="smaction_draft" value="<?php echo _("Resume Draft"); ?>" <?php echo $button_onclick; ?> />&nbsp;
+            <?php
+        } elseif ($can_edit_as_new) {
+            ?>
+    <input type="submit" name="smaction_edit_new" value="<?php echo _("Edit Message as New"); ?>" <?php echo $button_onclick; ?> />&nbsp;
+            <?php
+        }
+    ?>
+    <input type="submit" name="smaction_reply" value="<?php echo _("Reply"); ?>" <?php echo $button_onclick; ?> />&nbsp;
+    <input type="submit" name="smaction_reply_all" value="<?php echo _("Reply All"); ?>" <?php echo $button_onclick; ?> />
+    &nbsp;&nbsp;|&nbsp;&nbsp;
+    <input type="submit" name="smaction_forward" value="<?php echo _("Forward"); ?>" <?php echo $button_onclick; ?> />
+    <?php
+    if ($forward_as_attachment_enabled) {
+        ?>
+    <input type="checkbox" name="smaction_attache" id="smaction_attache">
+    <label for="smaction_attache"><?php echo _("As Attachment"); ?></label>
+        <?php
+    }
+    ?>
+   </small>
+   </form>
+    &nbsp;&nbsp;|&nbsp;&nbsp;
+    <?php
+    if ($can_be_deleted) {
+        ?>
+    <form name="deleteMessageForm" action="<?php echo $move_delete_form_action; ?>" method="POST">
+     <?php echo $delete_form_extra; ?>
+     <small>
+     <input type="submit" name="delete" value="<?php echo _("Delete"); ?>" />
+     <input type="checkbox" name="bypass_trash" id="bypass_trash"><label for="bypass_trash"><?php echo _("Bypass Trash"); ?></label>
+     </small>
+    </form>
+        <?php
+    }
+    ?>
+   <?php if(!empty($plugin_output[$plugin_hook])) echo $plugin_output[$plugin_hook]; ?>
+  </td>
+  <td class="move">
+   <?php
+    if ($can_be_moved) {
+        ?>
+    <form name="moveMessageForm" action="<?php echo $move_delete_form_action; ?>" method="POST">
+     <?php echo $move_form_extra; ?>
+     <small>
+     <?php echo _("Move To"); ?>:
+     <select name="targetMailbox">
+     <?php
+        foreach ($mailboxes as $value=>$option) {
+            echo '<option value="'. $value .'"' . ($value==$last_move_target ? ' selected="selected"' : '').'>' . $option .'</option>'."\n";
+        }
+     ?>
+     </select>
+     <input type="submit" name="moveButton" value="<?php echo _("Move"); ?>" />
+     <?php
+        if ($can_be_copied) {
+            ?>
+     <input type="submit" name="copyButton" value="<?php echo _("Copy"); ?>" />
+            <?php
+        }
+     ?>
+     </small>
+    </form>
+        <?php
+    }
+   ?>
+  </td>
+ </tr>
+</table>
+</div>
diff --git a/templates/default/read_menubar_nav.tpl b/templates/default/read_menubar_nav.tpl
new file mode 100644 (file)
index 0000000..9fb97dc
--- /dev/null
@@ -0,0 +1,145 @@
+<?php
+/**
+ * read_menubar_nav.tpl
+ *
+ * Template to generate the nav buttons while reading a message, e.g. "Previous",
+ * "Next", "Delete & Previous", etc.  When used in conjunction with the
+ * read_menubar_nav tempalte, the entire menubar is generated.
+ * 
+ * The following variables are available in this template:
+ *    $nav_on_top       - boolean TRUE if the navigation buttons are on top of the
+ *                        action buttons generated here.
+ *    $prev_href        - URL to move to the previous message.  Empty if not avilable.
+ *    $up_href          - URL to move up in the message.  Empty if not available.
+ *    $next_href    - URL to move to the next nessage.  Empty when N/A.
+ *    $del_prev_href - URL to delete this message and move to the next one.  Empty if N/A.
+ *    $del_next_href - URL to delete this message and move to the next one.  Empty if N/A.
+ *    $view_msg_href - URL to go back to the main message.  Empty if N/A.
+ *    $msg_list_href - URL to go to the message list.
+ *    $search_href   - URL to go back to the serach results.  Empty if N/A.
+ *    $form_extra    - Extra elements required by the forms to delete, move or copy
+ *    $compose_href  - Base URL to forward, reply, etc.  Note that a specific action
+ *                     must also be given by the form or in this URL.
+ *    $on_click      - Onclick event string for all buttons
+ *    $forward_as_attachment_enabled - boolean TRUE if forwarding as attachments
+ *                     has been enabled.
+ *    $can_resume_draft - boolean TRUE if the "resume draft" is legitimate for
+ *                     this message.
+ *    $can_edit_as_new - boolean TRUE if the "reasume as new" action is legitimate
+ *                     for this message
+ *    $mailboxes     - array containing list of mailboxes available for move/copy action.
+ *    $can_be_deleted - boolean TRUE if this message can be deleted.
+ *    $can_be_moved  - boolean TRUE if this message can be moved.
+ *    $cab_be_copied - boolean TRUE if this message can be copied to another folder.
+ *    $move_delete_form_action - the value for the ACTION attribute of forms to
+ *                     move, copy or delete a message
+ *    $delete_form_extra - additional input elements needed by the DELETE form
+ *    $move_form_extra - additional input elements needed by the MOVE form.
+ *    $last_move_target - the last folder that a message was moved/copied to. 
+ *     *
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+/** add required includes **/
+
+/** extract template variables **/
+extract($t);
+
+/** Begin template **/
+
+if ($nav_on_top) {
+    $table_class = 'top';
+    $plugin_hook = 'read_body_menu_nav_top';
+} else {
+    $table_class = 'bottom';
+    $plugin_hook = 'read_body_menu_nav_bottom';
+}
+?>
+<div class="readMenuBar">
+<table cellspacing="0" class="<?php echo $table_class; ?>">
+ <tr class="nav">
+  <td class="nav">
+   <small>
+   [
+   <?php
+    if (empty($prev_href)) {
+        echo _("Previous");
+    } else {
+        ?>
+   <a href="<?php echo $prev_href; ?>"><?php echo _("Previous"); ?></a>
+        <?php
+    }
+   ?> | 
+   <?php
+    if (empty($up_href)) {
+        # Do nothing
+    } else {
+        ?>
+   <a href="<?php echo $up_href; ?>"><?php echo _("Up"); ?></a> |
+        <?php
+    }
+
+    if (empty($next_href)) {
+        echo _("Next");
+    } else {
+        ?>
+   <a href="<?php echo $next_href; ?>"><?php echo _("Next"); ?></a>
+        <?php
+    }
+   ?>
+   ]
+   &nbsp;&nbsp;&nbsp;&nbsp;
+   <?php
+    if (!empty($del_prev_href) || !empty($del_next_href)) {
+        ?>
+        [
+        <?php        
+        if (empty($del_prev_href)) {
+            echo _("Delete &amp; Previous");
+        } else {
+            ?>
+   <a href="<?php echo $del_prev_href; ?>"><?php echo _("Delete &amp; Previous"); ?></a>
+            <?php
+        }
+        ?>
+        | 
+        <?php
+        if (empty($del_next_href)) {
+            echo _("Delete &amp; Next");
+        } else {
+            ?>
+   <a href="<?php echo $del_next_href; ?>"><?php echo _("Delete &amp; Next"); ?></a>
+            <?php
+        }
+        ?>
+        ]
+   &nbsp;&nbsp;&nbsp;&nbsp;
+        <?php
+    }
+   
+    if (!empty($view_msg_href)) {
+        ?>
+   [ <a href="<?php echo $view_msg_href; ?>"><?php echo _("View Message"); ?></a> ]
+   &nbsp;&nbsp;&nbsp;&nbsp;
+        <?php
+    }
+   ?>
+   [ <a href="<?php echo $message_list_href; ?>"><?php echo _("Message List"); ?></a>
+   <?php
+    if (!empty($search_href)) {
+        ?>
+   | <a href="<?php echo $search_href; ?>"><?php echo _("Search Results"); ?></a>
+        <?php
+    }
+   ?>
+   ]
+   </small>
+   <?php if(!empty($plugin_output[$plugin_hook])) echo $plugin_output[$plugin_hook]; ?>
+  </td>
+ </tr>
+</table>
+</div>
\ No newline at end of file
diff --git a/templates/default/read_message_body.tpl b/templates/default/read_message_body.tpl
new file mode 100644 (file)
index 0000000..cd7430b
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/**
+ * read_message_body.tpl
+ *
+ * Template for displaying the message body.
+ * 
+ * The following variables are available in this template:
+ *      $message_body - Entire message body, scrubbed, formatted, etc.
+ *
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+/** add required includes **/
+
+/** extract template variables **/
+extract($t);
+
+/** Begin template **/
+if (!empty($plugin_output['read_body_top'])) echo $plugin_output['read_body_top']; 
+?>
+<div class="readBody">
+<table cellspacing="0" class="table2">
+ <tr>
+  <td> 
+   <?php echo $message_body; ?>
+  </td>
+ </tr>
+</table>
+<table cellspacing="0" class="spacer">
+ <tr>
+  <td>
+  </td>
+ </tr>
+</table>
+</div>
diff --git a/templates/default/read_message_priority.tpl b/templates/default/read_message_priority.tpl
new file mode 100644 (file)
index 0000000..e565ab3
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+/**
+ * read_message_priority.php
+ *
+ * Tempalte to return the message priority
+ * 
+ * The following variables are available in this template:
+ *      $message_priority - Priority setting as set in the message.
+ *
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+/** add required includes **/
+include_once(SM_PATH . 'templates/util_read.php');
+
+/** extract template variables **/
+extract($t);
+
+/** Begin template **/
+echo priorityStr($message_priority);
+?>
\ No newline at end of file
diff --git a/templates/default/read_recipient_list.tpl b/templates/default/read_recipient_list.tpl
new file mode 100644 (file)
index 0000000..f0c79fe
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+/**
+ * read_recipient_list.tpl
+ *
+ * Template to generate the listing of recipeients for the To, CC and BCC fields.
+ * 
+ * The following variables are available in this template:
+ *      $which_field - The field that is currently being displayed.  Will be 'to',
+ *                     'cc' or 'bcc'
+ *      $more_less_toggle_href - URL to toggle more/less addresses for this field
+ *      $show_more   - boolean TRUE if we want to show all addresses for this field. 
+ *      $recipients  - array containing all receipients for this field.  Each element
+ *                     is an array representing a recipient and contains the following
+ *                     elements:
+ *         $r['Name']  - The name attached to the receipient.  Will contain the email
+ *                       if no name is provided.
+ *         $r['Email'] - Email address of the recipient
+ *         $a['Full']  - Full name + email
+ *
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+/** add required includes **/
+
+/** extract template variables **/
+extract($t);
+
+/** Begin template **/
+$count = 0;
+foreach ($recipients as $r) {
+    $count++;
+    if ($count > 1 && !$show_more)
+        continue;
+    echo $r['Full'];
+    if ($show_more && $count != count($recipients)) {
+        echo '<br />';
+    }
+}
+
+if (count($recipients) > 1) {
+    if ($show_more) {
+        ?>
+&nbsp;<small>(<a href="<?php echo $more_less_toggle_href; ?>"><?php echo _("less"); ?></a>)</small>
+        <?php
+    } else {
+        ?>
+&nbsp;<small>(<a href="<?php echo $more_less_toggle_href; ?>"><?php echo _("more"); ?></a>)</small>
+        <?php
+    }
+}
\ No newline at end of file
diff --git a/templates/default/read_toolbar.tpl b/templates/default/read_toolbar.tpl
new file mode 100644 (file)
index 0000000..ce52150
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * read_toolbar.tpl
+ *
+ * This template generates the "Options" toolbar while reading a message.
+ * 
+ * The following variables are available in this template:
+ *      
+ *      $links - array containing various elements to be displayed in the toolbar.
+ *               Each element is an array representing an option that contains the
+ *               following elements:
+ *          $link['URL']  - URL needed to access the action
+ *          $link['Text'] - Text to be displayed for the action.
+ *
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+/** add required includes **/
+
+/** extract template variables **/
+extract($t);
+
+/** Begin template **/
+?>
+<small>
+ <?php
+    foreach ($links as $count=>$link) {
+        # Skip empty links
+        if (empty($link['Text']))
+            continue;
+            
+        # Printer firendly link must be handled a little differently
+        if ($link['Text'] == _("View Printable Version")) {
+            if ($javascript_on) {
+                ?>
+ <script type="text/javascript">
+ <!--
+ function printFormat () {
+     print_win = window.open("../src/printer_friendly_main.php<?php echo $link['URL']; ?>", "Print", "width=800; height=600");
+     print_win.focus();
+ }
+ // -->
+ </script>
+ <a href="javascript:printFormat()"><?php echo $link['Text']; ?></a>
+                <?php
+            } else {
+                # everything else follows this format...
+                ?>
+ <a href="../src/printer_friendly_bottom.php<?php echo $link['URL']; ?>" target="_blank"><?php $link['Text']; ?></a>
+               <?php
+            }
+        } else {
+            ?>
+ <a href="<?php echo $link['URL']; ?>"><?php echo $link['Text']; ?></a>
+            <?php
+        }
+        
+        # Spit out a divider between each element
+        if ($count < count($links)-1) {
+            ?>
+ &nbsp;|&nbsp;
+            <?php
+        }
+    }
+ ?>
+</small>
\ No newline at end of file
diff --git a/templates/default/read_xmailer.tpl b/templates/default/read_xmailer.tpl
new file mode 100644 (file)
index 0000000..ea89998
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+/**
+ * read_xmailer.tpl
+ *
+ * Template for setting the Mailer option
+ * 
+ * The following variables are available in this template:
+ *      $xmailer - Mailer as set on the message
+ *
+ * @copyright &copy; 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage templates
+ */
+
+/** add required includes **/
+
+/** extract template variables **/
+extract($t);
+
+/** Begin template **/
+echo $xmailer;
+?>
\ No newline at end of file