3 * read_menubar_buttons.tpl
5 * Tempalte for displaying the action buttons, e.g. Reply, Reply All, Forward,
6 * etc., while reading a message. When combined with the read_menubar_nav template,
7 * the entire menu bar is displayed.
9 * The following variables are available in this template:
10 * $nav_on_top - boolean TRUE if the navigation buttons are on top of the
11 * action buttons generated here.
12 * $prev_href - URL to move to the previous message. Empty if not avilable.
13 * $up_href - URL to move up in the message. Empty if not available.
14 * $next_href - URL to move to the next nessage. Empty when N/A.
15 * $del_prev_href - URL to delete this message and move to the next one. Empty if N/A.
16 * $del_next_href - URL to delete this message and move to the next one. Empty if N/A.
17 * $view_msg_href - URL to go back to the main message. Empty if N/A.
18 * $msg_list_href - URL to go to the message list.
19 * $search_href - URL to go back to the serach results. Empty if N/A.
20 * $form_extra - Extra elements required by the forms to delete, move or copy
21 * $compose_href - Base URL to forward, reply, etc. Note that a specific action
22 * must also be given by the form or in this URL.
23 * $on_click - Onclick event string for all buttons
24 * $forward_as_attachment_enabled - boolean TRUE if forwarding as attachments
26 * $can_resume_draft - boolean TRUE if the "resume draft" is legitimate for
28 * $can_edit_as_new - boolean TRUE if the "reasume as new" action is legitimate
30 * $mailboxes - array containing list of mailboxes available for move/copy action.
31 * $can_be_deleted - boolean TRUE if this message can be deleted.
32 * $can_be_moved - boolean TRUE if this message can be moved.
33 * $cab_be_copied - boolean TRUE if this message can be copied to another folder.
34 * $move_delete_form_action - the value for the ACTION attribute of forms to
35 * move, copy or delete a message
36 * $delete_form_extra - additional input elements needed by the DELETE form
37 * $move_form_extra - additional input elements needed by the MOVE form.
38 * $last_move_target - the last folder that a message was moved/copied to.
41 * @copyright © 1999-2006 The SquirrelMail Project Team
42 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
43 * @version $Id: read_menubar_buttons.tpl 11850 2006-10-06 21:57:26Z stevetruckstuff $
44 * @package squirrelmail
45 * @subpackage templates
48 /** add required includes **/
50 /** extract template variables **/
54 /*FIXME: This is a place where Marc's idea for putting all the buttons and
55 links and other widgets into an array is sorely needed instead of
56 hard-coding everything. Whomever implements that, PLEASE, PLEASE
57 look at how the preview pane plugin code is used here to change
58 some links and buttons and make sure your implementation can support
59 it (tip: it may or may not be OK to let a plugin do the modification
60 of the widgets, since a template set can turn on the needed plugin,
61 but that might not be the most clear way to solve said issue).*/
64 /** preview pane prep */
65 global $data_dir, $username, $base_uri;
66 $pp_refresh_message_list = getPref($data_dir, $username, 'pp_refresh_message_list', 1);
67 $use_previewPane = getPref($data_dir, $username, 'use_previewPane', 0);
68 $show_preview_pane = checkForJavascript() && $use_previewPane;
69 $empty_frame_uri = $base_uri . 'plugins/preview_pane/empty_frame.php';
70 if ($show_preview_pane) { ?>
73 function refresh_message_list()
74 { parent.right.delayed_page_load("<?php echo $message_list_href; ?>"); }
80 /** Begin template **/
82 $table_class = 'bottom';
83 $plugin_hook = 'read_body_menu_buttons_top';
86 $plugin_hook = 'read_body_menu_buttons_bottom';
89 <div class="readMenuBar">
90 <table class="<?php echo $table_class; ?>" cellspacing="0">
93 <form name="composeForm" action="<?php echo $compose_href; ?>" <?php echo $form_extra; ?> >
96 if ($can_resume_draft) {
98 <input type="submit" name="smaction_draft" value="<?php echo _("Resume Draft"); ?>" <?php echo $button_onclick; ?> />
100 } elseif ($can_edit_as_new) {
102 <input type="submit" name="smaction_edit_new" value="<?php echo _("Edit Message as New"); ?>" <?php echo $button_onclick; ?> />
106 <input type="submit" name="smaction_reply" value="<?php echo _("Reply"); ?>" <?php echo $button_onclick; ?> />
107 <input type="submit" name="smaction_reply_all" value="<?php echo _("Reply All"); ?>" <?php echo $button_onclick; ?> />
108 |
109 <input type="submit" name="smaction_forward" value="<?php echo _("Forward"); ?>" <?php echo $button_onclick; ?> />
111 if ($forward_as_attachment_enabled) {
113 <input type="checkbox" name="smaction_attache" id="smaction_attache">
114 <label for="smaction_attache"><?php echo _("As Attachment"); ?></label>
120 |
122 if ($can_be_deleted) {
124 <form name="deleteMessageForm" action="<?php echo $move_delete_form_action; ?>" method="POST">
125 <?php echo $delete_form_extra; ?>
127 <input type="submit" name="delete" value="<?php
129 echo _("Delete") .'"';
131 /** if preview pane turned on with "always refresh message list",
132 refresh message list frame too, but only if we are in the bottom frame! */
133 if ($show_preview_pane && $pp_refresh_message_list)
134 echo ' onclick="if (self.name == \'bottom\') { refresh_message_list(); } "';
138 <input type="checkbox" name="bypass_trash" id="bypass_trash"><label for="bypass_trash"><?php echo _("Bypass Trash"); ?></label>
144 <?php if(!empty($plugin_output[$plugin_hook])) echo $plugin_output[$plugin_hook]; ?>
150 <form name="moveMessageForm" action="<?php echo $move_delete_form_action; ?>" method="POST">
151 <?php echo $move_form_extra; ?>
153 <?php echo _("Move To"); ?>:
154 <select name="targetMailbox">
156 foreach ($mailboxes as $value=>$option) {
157 echo '<option value="'. $value .'"' . ($value==$last_move_target ? ' selected="selected"' : '').'>' . $option .'</option>'."\n";
161 <input type="submit" name="moveButton" value="<?php
163 echo _("Move") . '"';
165 /** if preview pane turned on with "always refresh message list",
166 refresh message list frame too, but only if we are in the bottom frame! */
167 if ($show_preview_pane && $pp_refresh_message_list)
168 echo ' onclick="if (self.name == \'bottom\') { refresh_message_list(); } "';
173 if ($can_be_copied) {
175 <input type="submit" name="copyButton" value="<?php echo _("Copy"); ?>" />