3cb5a0bb |
1 | <?php |
2 | /** |
3 | * read_menubar_nav.tpl |
4 | * |
5 | * Template to generate the nav buttons while reading a message, e.g. "Previous", |
6 | * "Next", "Delete & Previous", etc. When used in conjunction with the |
7 | * read_menubar_nav tempalte, the entire menubar is generated. |
8 | * |
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 |
25 | * has been enabled. |
26 | * $can_resume_draft - boolean TRUE if the "resume draft" is legitimate for |
27 | * this message. |
28 | * $can_edit_as_new - boolean TRUE if the "reasume as new" action is legitimate |
29 | * for this message |
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. |
39 | * * |
22387c8d |
40 | * @copyright 1999-2017 The SquirrelMail Project Team |
3cb5a0bb |
41 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
42 | * @version $Id$ |
43 | * @package squirrelmail |
44 | * @subpackage templates |
45 | */ |
46 | |
47 | /** add required includes **/ |
48 | |
49 | /** extract template variables **/ |
50 | extract($t); |
51 | |
541dedcd |
52 | /*FIXME: This is a place where Marc's idea for putting all the buttons and links and other widgets into an array is sorely needed instead of hard-coding everything. Whomever implements that, PLEASE, PLEASE look at how the preview pane plugin code is used in this same template file for the *default_advanced* set to change some links and buttons and make sure your implementation can support it (tip: it may or may not be OK to let a plugin do the modification of the widgets, since a template set can turn on the needed plugin, but that might not be the most clear way to solve said issue).*/ |
9faee771 |
53 | |
3cb5a0bb |
54 | /** Begin template **/ |
55 | |
56 | if ($nav_on_top) { |
57 | $table_class = 'top'; |
58 | $plugin_hook = 'read_body_menu_nav_top'; |
59 | } else { |
60 | $table_class = 'bottom'; |
61 | $plugin_hook = 'read_body_menu_nav_bottom'; |
62 | } |
63 | ?> |
64 | <div class="readMenuBar"> |
65 | <table cellspacing="0" class="<?php echo $table_class; ?>"> |
66 | <tr class="nav"> |
67 | <td class="nav"> |
68 | <small> |
dcc5e0d3 |
69 | [ <?php |
3cb5a0bb |
70 | if (empty($prev_href)) { |
71 | echo _("Previous"); |
72 | } else { |
dcc5e0d3 |
73 | ?><a href="<?php echo $prev_href; ?>"><?php echo _("Previous"); ?></a> |
3cb5a0bb |
74 | <?php |
75 | } |
76 | ?> | |
77 | <?php |
78 | if (empty($up_href)) { |
79 | # Do nothing |
80 | } else { |
81 | ?> |
82 | <a href="<?php echo $up_href; ?>"><?php echo _("Up"); ?></a> | |
83 | <?php |
84 | } |
85 | |
86 | if (empty($next_href)) { |
87 | echo _("Next"); |
88 | } else { |
89 | ?> |
dcc5e0d3 |
90 | <a href="<?php echo $next_href; ?>"><?php echo _("Next"); ?></a><?php |
3cb5a0bb |
91 | } |
dcc5e0d3 |
92 | ?> ] |
3cb5a0bb |
93 | |
94 | <?php |
95 | if (!empty($del_prev_href) || !empty($del_next_href)) { |
96 | ?> |
dcc5e0d3 |
97 | [ <?php |
3cb5a0bb |
98 | if (empty($del_prev_href)) { |
dcc5e0d3 |
99 | echo '<span style="white-space: nowrap;">' . _("Delete & Previous") . '</span>'; |
3cb5a0bb |
100 | } else { |
dcc5e0d3 |
101 | ?><a href="<?php echo $del_prev_href; ?>" style="white-space: nowrap"><?php echo _("Delete & Previous"); ?></a> |
3cb5a0bb |
102 | <?php |
103 | } |
104 | ?> |
105 | | |
106 | <?php |
107 | if (empty($del_next_href)) { |
dcc5e0d3 |
108 | echo '<span style="white-space: nowrap;">' . _("Delete & Next") . '</span>'; |
3cb5a0bb |
109 | } else { |
110 | ?> |
dcc5e0d3 |
111 | <a href="<?php echo $del_next_href; ?>" style="white-space: nowrap"><?php echo _("Delete & Next"); ?></a><?php |
3cb5a0bb |
112 | } |
dcc5e0d3 |
113 | ?> ] |
3cb5a0bb |
114 | |
115 | <?php |
116 | } |
117 | |
118 | if (!empty($view_msg_href)) { |
119 | ?> |
dcc5e0d3 |
120 | [ <a href="<?php echo $view_msg_href; ?>" style="white-space: nowrap"><?php echo _("View Message"); ?></a> ] |
3cb5a0bb |
121 | |
122 | <?php |
123 | } |
124 | ?> |
dcc5e0d3 |
125 | [ <a href="<?php echo $message_list_href; ?>" style="white-space: nowrap"><?php echo _("Message List"); ?></a><?php |
3cb5a0bb |
126 | if (!empty($search_href)) { |
127 | ?> |
dcc5e0d3 |
128 | | <a href="<?php echo $search_href; ?>" style="white-space: nowrap"><?php echo _("Search Results"); ?></a><?php |
3cb5a0bb |
129 | } |
dcc5e0d3 |
130 | ?> ] |
3cb5a0bb |
131 | </small> |
132 | <?php if(!empty($plugin_output[$plugin_hook])) echo $plugin_output[$plugin_hook]; ?> |
133 | </td> |
134 | </tr> |
135 | </table> |
9faee771 |
136 | </div> |