Add access keys to mailbox list
[squirrelmail.git] / templates / default / message_list_controls.tpl
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_uri
53 * $thread_name
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 &copy; 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 if ($widget_attrs['accesskey'] != 'NONE')
91 echo ' accesskey="' . $widget_attrs['accesskey'] . '"';
92 if (!empty($widget_attrs['extra_attrs'])) {
93 foreach ($widget_attrs['extra_attrs'] as $attr => $val) {
94 echo ' ' . $attr . '="' . $val . '"';
95 }
96 }
97 echo ' />&nbsp;';
98 }
99 break;
100 case 'checkbox':
101 if ($widget_name != 'bypass_trash') {
102 echo '<input type="checkbox" name="' . $widget_name . '" id="' . $widget_name . '"';
103 if ($widget_attrs['accesskey'] != 'NONE')
104 echo ' accesskey="' . $widget_attrs['accesskey'] . '"';
105 if (!empty($widget_attrs['extra_attrs'])) {
106 foreach ($widget_attrs['extra_attrs'] as $attr => $val) {
107 echo ' ' . $attr . '="' . $val . '"';
108 }
109 }
110 echo ' /><label for="' . $widget_name . '">' . $widget_attrs['value'] . '</label>&nbsp;';
111 }
112 break;
113 case 'hidden':
114 echo '<input type="hidden" name="'.$widget_name.'" value="'. $widget_attrs['value']."\" />";
115 break;
116 default: break;
117 }
118 }
119 ?>
120 </td>
121 <td class="message_control_delete">
122 <?php
123 if (isset($aFormElements['delete'])) {
124 echo '<input type="submit" name="delete" value="' . $aFormElements['delete']['value'] . '" class="message_control_button" ' . ($aFormElements['delete']['accesskey'] != 'NONE' ? 'accesskey="' . $aFormElements['delete']['accesskey'] . '" ' : '') . '/>&nbsp;';
125 if (isset($aFormElements['bypass_trash'])) {
126 echo '<input type="checkbox" name="bypass_trash" id="bypass_trash" ' . ($aFormElements['bypass_trash']['accesskey'] != 'NONE' ? 'accesskey="' . $aFormElements['bypass_trash']['accesskey'] . '" ' : '') . '/><label for="bypass_trash">' . $aFormElements['bypass_trash']['value'] . '</label>&nbsp;';
127 }
128 if (isset($aFormElements['undeleteButton'])) {
129 echo '<input type="submit" name="undeleteButton" value="' . $aFormElements['undeleteButton']['value'] . '" class="message_control_button" ' . ($aFormElements['undeleteButton']['accesskey'] != 'NONE' ? 'accesskey="' . $aFormElements['undeleteButton']['accesskey'] . '" ' : '') . '/>&nbsp;';
130 }
131 ?>
132
133 </td>
134
135 <?php
136 } // if (isset($aFormElements['delete']))
137 if (isset($aFormElements['moveButton']) || isset($aFormElements['copyButton'])) {
138 ?>
139 <td class="message_control_move">
140 <select name="targetMailbox"<?php if ($aFormElements['targetMailbox']['accesskey'] != 'NONE') echo ' accesskey="' . $aFormElements['targetMailbox']['accesskey'] . '"'; ?>>
141 <?php echo $aFormElements['targetMailbox']['options_list'];?>
142 </select>
143 <?php
144 if (isset($aFormElements['moveButton'])) {
145 echo '<input type="submit" name="moveButton" value="' . $aFormElements['moveButton']['value'] . '" class="message_control_button" ' . ($aFormElements['moveButton']['accesskey'] != 'NONE' ? 'accesskey="' . $aFormElements['moveButton']['accesskey'] . '" ' : '') . '/>';
146 }
147 if (isset($aFormElements['copyButton'])) {
148 echo '<input type="submit" name="copyButton" value="' . $aFormElements['copyButton']['value'] . '" class="message_control_button" ' . ($aFormElements['copyButton']['accesskey'] != 'NONE' ? 'accesskey="' . $aFormElements['copyButton']['accesskey'] . '" ' : '') . '/>';
149 }
150 ?>
151
152 </td>
153
154 <?php
155 } // if (isset($aFormElements['moveButton']) || isset($aFormElements['copyButton']))
156 ?>
157 </tr>
158 </table>
159 <?php
160 } // if (count($aFormElements))
161