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 |
52 | * $thread_link_str |
53 | * $php_self |
54 | * $mailbox |
55 | * $enablesort |
56 | * $icon_theme |
57 | * $use_icons |
58 | * $alt_index_colors |
59 | * $fancy_index_highlite |
60 | * $aSortSupported |
61 | * $show_label_columns |
62 | * $compact_paginator |
63 | * $aErrors |
64 | * |
65 | * @copyright © 1999-2006 The SquirrelMail Project Team |
66 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
67 | * @version $Id$ |
68 | * @package squirrelmail |
69 | * @subpackage templates |
70 | */ |
71 | |
72 | |
73 | /* retrieve the template vars */ |
74 | extract($t); |
75 | |
76 | |
77 | if (count($aFormElements)) { |
78 | ?> |
79 | <table class="table_empty" cellspacing="0"> |
80 | <tr> |
81 | <td class="message_control_buttons"> |
82 | |
83 | <?php |
84 | foreach ($aFormElements as $widget_name => $widget_attrs) { |
85 | switch ($widget_attrs['type']) { |
86 | case 'submit': |
87 | if ($widget_name != 'moveButton' && $widget_name != 'copyButton' && $widget_name != 'delete' && $widget_name != 'undeleteButton') { // add these later in another table cell |
88 | echo '<input type="submit" name="' . $widget_name . '" value="' . $widget_attrs['value'] . '" class="message_control_button" /> '; |
89 | } |
90 | break; |
91 | case 'checkbox': |
92 | if ($widget_name != 'bypass_trash') { |
93 | echo '<input type="checkbox" name="' . $widget_name . '" id="' . $widget_name . '" /><label for="' . $widget_name . '">' . $widget_attrs['value'] . '</label> '; |
94 | } |
95 | break; |
96 | case 'hidden': |
97 | echo '<input type="hidden" name="'.$widget_name.'" value="'. $widget_attrs['value']."\">\n"; |
98 | break; |
99 | default: break; |
100 | } |
101 | } |
102 | ?> |
103 | </td> |
104 | <td class="message_control_delete"> |
105 | <?php |
106 | if (isset($aFormElements['delete'])) { |
107 | echo '<input type="submit" name="delete" value="' . $aFormElements['delete']['value'] . '" class="message_control_button" /> '; |
108 | if (isset($aFormElements['bypass_trash'])) { |
109 | echo '<input type="checkbox" name="bypass_trash" id="bypass_trash" /><label for="bypass_trash">' . $aFormElements['bypass_trash']['value'] . '</label> '; |
110 | } |
111 | if (isset($aFormElements['undeleteButton'])) { |
112 | echo '<input type="submit" name="undeleteButton" value="' . $aFormElements['undeleteButton']['value'] . '" class="message_control_button" /> '; |
113 | } |
114 | ?> |
115 | |
116 | </td> |
117 | |
118 | <?php |
119 | } // if (isset($aFormElements['delete'])) |
120 | if (isset($aFormElements['moveButton']) || isset($aFormElements['copyButton'])) { |
121 | ?> |
122 | <td class="message_control_move"> |
123 | <select name="targetMailbox"> |
124 | <?php echo $aFormElements['targetMailbox']['options_list'];?> |
125 | </select> |
126 | <?php |
127 | if (isset($aFormElements['moveButton'])) { |
128 | echo '<input type="submit" name="moveButton" value="' . $aFormElements['moveButton']['value'] . '" class="message_control_button" />'; |
129 | } |
130 | if (isset($aFormElements['copyButton'])) { |
131 | echo '<input type="submit" name="copyButton" value="' . $aFormElements['copyButton']['value'] . '" class="message_control_button" />'; |
132 | } |
133 | ?> |
134 | |
135 | </td> |
136 | |
137 | <?php |
138 | } // if (isset($aFormElements['moveButton']) || isset($aFormElements['copyButton'])) |
139 | ?> |
140 | </tr> |
141 | </table> |
142 | <?php |
143 | } // if (count($aFormElements)) |
144 | |