Misc updates
[squirrelmail.git] / templates / default / edit_list_widget_list_style.tpl
1 <?php
2
3 /**
4 * edit_list_widget_list_style.tpl
5 *
6 * Template for constructing an edit list using a list-format layout.
7 *
8 * The following variables are available in this template:
9 *
10 * string $name The name of the edit list
11 * string $input_widget A preconstructed input text box used
12 * for adding new elements to the edit list
13 * boolean $use_input_widget Whether or not to present the $input_widget
14 * string $select_widget A preconstructed input text box used
15 * string $checkbox_widget A preconstructed input text box used
16 * string $trailing_text Any text given by the caller to be displayed
17 * after the edit list input
18 * array $possible_values The original list of options in the edit list,
19 * for use constructing layouts alternative to
20 * the select widget
21 *
22 * @copyright &copy; 1999-2008 The SquirrelMail Project Team
23 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
24 * @version $Id: select.tpl 12961 2008-02-24 22:35:08Z pdontthink $
25 * @package squirrelmail
26 * @subpackage templates
27 */
28
29
30 // retrieve the template vars
31 //
32 extract($t);
33
34
35 echo '<table class="table2" cellspacing="0"><tr><td>';
36
37 if ($use_input_widget)
38 echo _("Add") . '&nbsp;' . $input_widget . '<br />';
39
40 echo '<table class="table_messageList" cellspacing="0">';
41
42 $class = 'even';
43 $index = 0;
44
45 foreach ($possible_values as $key => $value) {
46
47 if ($class == 'even') $class = 'odd';
48 else $class = 'even';
49
50 echo '<tr class="' . $class . '">'
51 . '<td class="col_check" style="width:1%"><input type="checkbox" name="new_' . $name . '[' . ($index++) . ']" id="' . $name . '_list_item_' . $key . '" value="' . $value . '"></td>'
52 . '<td><label for="' . $name . '_list_item_' . $key . '">' . $value . '</label></td>'
53 . "</tr>\n";
54
55 }
56
57 echo '</table>';
58
59 if (!empty($possible_values))
60 echo $checkbox_widget . '&nbsp;<label for="delete_' . $name . '">'
61 . _("Delete Selected") . '</label>';
62
63 echo '</td></tr></table>';