69a023cf |
1 | <?php |
2 | |
3 | /** |
4 | * message_list_controls.tpl |
5 | * |
6 | * Template for the form control widgets on the message list page |
7 | * |
8 | * The following variables are available in this template: |
9 | //FIXME: need to clean (and document) this list, it is just a dump of the array keys of $t |
10 | * $sTemplateID |
11 | * $icon_theme_path |
12 | * $javascript_on |
13 | * $delayed_errors |
14 | * $frames |
15 | * $lang |
16 | * $page_title |
17 | * $header_tags |
18 | * $plugin_output |
19 | * $header_sent |
20 | * $body_tag_js |
21 | * $shortBoxName |
22 | * $sm_attribute_str |
23 | * $frame_top |
24 | * $urlMailbox |
25 | * $startMessage |
26 | * $hide_sm_attributions |
27 | * $uri |
28 | * $text |
29 | * $onclick |
30 | * $class |
31 | * $id |
32 | * $target |
33 | * $color |
34 | * $form_name |
35 | * $form_id |
36 | * $page_selector |
37 | * $page_selector_max |
38 | * $messagesPerPage |
39 | * $showall |
40 | * $end_msg |
41 | * $align |
42 | * $iNumberOfMessages |
43 | * $aOrder |
44 | * $aFormElements |
45 | * $sort |
46 | * $pageOffset |
47 | * $baseurl |
48 | * $aMessages |
49 | * $trash_folder |
50 | * $sent_folder |
51 | * $draft_folder |
cd693cf4 |
52 | * $thread_link_uri |
53 | * $thread_name |
69a023cf |
54 | * $php_self |
55 | * $mailbox |
56 | * $enablesort |
57 | * $icon_theme |
58 | * $use_icons |
59 | * $alt_index_colors |
60 | * $fancy_index_highlite |
61 | * $aSortSupported |
62 | * $show_label_columns |
63 | * $compact_paginator |
64 | * $aErrors |
65 | * |
66 | * @copyright © 1999-2006 The SquirrelMail Project Team |
67 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
68 | * @version $Id$ |
69 | * @package squirrelmail |
70 | * @subpackage templates |
71 | */ |
72 | |
73 | |
74 | /* retrieve the template vars */ |
75 | extract($t); |
76 | |
77 | |
78 | if (count($aFormElements)) { |
79 | ?> |
80 | <table class="table_empty" cellspacing="0"> |
81 | <tr> |
82 | <td class="message_control_buttons"> |
83 | |
84 | <?php |
85 | foreach ($aFormElements as $widget_name => $widget_attrs) { |
86 | switch ($widget_attrs['type']) { |
87 | case 'submit': |
88 | if ($widget_name != 'moveButton' && $widget_name != 'copyButton' && $widget_name != 'delete' && $widget_name != 'undeleteButton') { // add these later in another table cell |
89 | echo '<input type="submit" name="' . $widget_name . '" value="' . $widget_attrs['value'] . '" class="message_control_button" /> '; |
90 | } |
91 | break; |
92 | case 'checkbox': |
93 | if ($widget_name != 'bypass_trash') { |
94 | echo '<input type="checkbox" name="' . $widget_name . '" id="' . $widget_name . '" /><label for="' . $widget_name . '">' . $widget_attrs['value'] . '</label> '; |
95 | } |
96 | break; |
97 | case 'hidden': |
b116fd78 |
98 | echo '<input type="hidden" name="'.$widget_name.'" value="'. $widget_attrs['value']."\" />\n"; |
69a023cf |
99 | break; |
100 | default: break; |
101 | } |
102 | } |
103 | ?> |
104 | </td> |
105 | <td class="message_control_delete"> |
106 | <?php |
107 | if (isset($aFormElements['delete'])) { |
108 | echo '<input type="submit" name="delete" value="' . $aFormElements['delete']['value'] . '" class="message_control_button" /> '; |
109 | if (isset($aFormElements['bypass_trash'])) { |
110 | echo '<input type="checkbox" name="bypass_trash" id="bypass_trash" /><label for="bypass_trash">' . $aFormElements['bypass_trash']['value'] . '</label> '; |
111 | } |
112 | if (isset($aFormElements['undeleteButton'])) { |
113 | echo '<input type="submit" name="undeleteButton" value="' . $aFormElements['undeleteButton']['value'] . '" class="message_control_button" /> '; |
114 | } |
115 | ?> |
116 | |
117 | </td> |
118 | |
119 | <?php |
120 | } // if (isset($aFormElements['delete'])) |
121 | if (isset($aFormElements['moveButton']) || isset($aFormElements['copyButton'])) { |
122 | ?> |
123 | <td class="message_control_move"> |
124 | <select name="targetMailbox"> |
125 | <?php echo $aFormElements['targetMailbox']['options_list'];?> |
126 | </select> |
127 | <?php |
128 | if (isset($aFormElements['moveButton'])) { |
129 | echo '<input type="submit" name="moveButton" value="' . $aFormElements['moveButton']['value'] . '" class="message_control_button" />'; |
130 | } |
131 | if (isset($aFormElements['copyButton'])) { |
132 | echo '<input type="submit" name="copyButton" value="' . $aFormElements['copyButton']['value'] . '" class="message_control_button" />'; |
133 | } |
134 | ?> |
135 | |
136 | </td> |
137 | |
138 | <?php |
139 | } // if (isset($aFormElements['moveButton']) || isset($aFormElements['copyButton'])) |
140 | ?> |
141 | </tr> |
142 | </table> |
143 | <?php |
144 | } // if (count($aFormElements)) |
145 | |