From: Steve B. <ste...@us...> - 2006-10-06 21:57:29
|
Update of /cvsroot/squirrelmail/squirrelmail/templates/default In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14003/templates/default Added Files: read_recipient_list.tpl read_menubar_nav.tpl read_menubar_buttons.tpl read_toolbar.tpl read_xmailer.tpl read_attachments.tpl read_message_priority.tpl read_message_body.tpl read_headers.tpl read_handle_receipt.tpl read_display_images_inline.tpl Log Message: Templates for reading a message --- NEW FILE --- <?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 © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id: read_recipient_list.tpl,v 1.1 2006/10/06 21:57:26 stevetruckstuff Exp $ * @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) { ?> <small>(<a href="<?php echo $more_less_toggle_href; ?>"><?php echo _("less"); ?></a>)</small> <?php } else { ?> <small>(<a href="<?php echo $more_less_toggle_href; ?>"><?php echo _("more"); ?></a>)</small> <?php } } --- NEW FILE --- <?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 © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id: read_menubar_nav.tpl,v 1.1 2006/10/06 21:57:26 stevetruckstuff Exp $ * @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 } ?> ] <?php if (!empty($del_prev_href) || !empty($del_next_href)) { ?> [ <?php if (empty($del_prev_href)) { echo _("Delete & Previous"); } else { ?> <a href="<?php echo $del_prev_href; ?>"><?php echo _("Delete & Previous"); ?></a> <?php } ?> | <?php if (empty($del_next_href)) { echo _("Delete & Next"); } else { ?> <a href="<?php echo $del_next_href; ?>"><?php echo _("Delete & Next"); ?></a> <?php } ?> ] <?php } if (!empty($view_msg_href)) { ?> [ <a href="<?php echo $view_msg_href; ?>"><?php echo _("View Message"); ?></a> ] <?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> --- NEW FILE --- <?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 © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id: read_menubar_buttons.tpl,v 1.1 2006/10/06 21:57:26 stevetruckstuff Exp $ * @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; ?> /> <?php } elseif ($can_edit_as_new) { ?> <input type="submit" name="smaction_edit_new" value="<?php echo _("Edit Message as New"); ?>" <?php echo $button_onclick; ?> /> <?php } ?> <input type="submit" name="smaction_reply" value="<?php echo _("Reply"); ?>" <?php echo $button_onclick; ?> /> <input type="submit" name="smaction_reply_all" value="<?php echo _("Reply All"); ?>" <?php echo $button_onclick; ?> /> | <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> | <?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> --- NEW FILE --- <?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 © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id: read_toolbar.tpl,v 1.1 2006/10/06 21:57:26 stevetruckstuff Exp $ * @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) { ?> | <?php } } ?> </small> --- NEW FILE --- <?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 © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id: read_xmailer.tpl,v 1.1 2006/10/06 21:57:26 stevetruckstuff Exp $ * @package squirrelmail * @subpackage templates */ /** add required includes **/ /** extract template variables **/ extract($t); /** Begin template **/ echo $xmailer; ?> --- NEW FILE --- <?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 © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id: read_attachments.tpl,v 1.1 2006/10/06 21:57:26 stevetruckstuff Exp $ * @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'])) { ?> | <a href="<?php echo $attachment['ViewHREF']; ?>"><?php echo _("View"); ?></a> <?php } foreach ($attachment['OtherLinks'] as $link) { ?> | <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> --- NEW FILE --- <?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 © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id: read_message_priority.tpl,v 1.1 2006/10/06 21:57:26 stevetruckstuff Exp $ * @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); ?> --- NEW FILE --- <?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 © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id: read_message_body.tpl,v 1.1 2006/10/06 21:57:26 stevetruckstuff Exp $ * @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> --- NEW FILE --- <?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 © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id: read_headers.tpl,v 1.1 2006/10/06 21:57:26 stevetruckstuff Exp $ * @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> --- NEW FILE --- <?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 © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id: read_handle_receipt.tpl,v 1.1 2006/10/06 21:57:26 stevetruckstuff Exp $ * @package squirrelmail * @subpackage templates */ /** add required includes **/ /** extract template variables **/ extract($t); /** Begin template **/ if ($read_receipt_sent) { echo _("Sent"); } else { ?> <?php echo _("Requested"); ?> <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 } } ?> --- NEW FILE --- <?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 © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id: read_display_images_inline.tpl,v 1.1 2006/10/06 21:57:26 stevetruckstuff Exp $ * @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'])) { ?> <a href="<?php echo $img['DownloadURL']; ?>"><?php echo _("Download"); ?></a> <?php } ?> </td> <td> </td> </tr> <tr> <td colspan="2" class="image"> <img src="<?php echo $img['DisplayURL']; ?>" /> </td> </tr> </table> </td> </tr> <?php } ?> </table> </div> |