146acc11 |
1 | <?php |
2 | /** |
3 | * search_list.tpl |
4 | * |
5 | * Template for displaying recent/saved searches |
6 | * |
7 | * The following variables are available in this template: |
8 | * $list_title - Translated title for this list. |
9 | * $show_list - boolean TRUE if this list is to be shown, i.e. it is unfolded |
10 | * $is_recent_list - boolean TRUE if this is the list of recent searches. |
11 | * Different query options are displayed for each list |
12 | * $expand_collapse_toggle - URL to fold/unfold this list |
13 | * $save_recent - base URL to save a recent query |
14 | * $do_recent - base URL to repeat a recent query |
15 | * $forget_recent - base URL to forget a recent query |
16 | * $edit_saved - base URL to edit a saved query |
17 | * $do_saved - base URL to repeat a saved query |
18 | * $delete_saved - base URL to delete a saved query |
19 | * $query_list - array containing the list of queries to be displayed. |
20 | * Index of each element is the query number. Each of the |
21 | * base URLs above MUST be followed by this index in order |
22 | * to work correctly! |
23 | * |
24 | * @copyright © 1999-2006 The SquirrelMail Project Team |
25 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
26 | * @version $Id$ |
27 | * @package squirrelmail |
28 | * @subpackage templates |
29 | */ |
30 | |
146acc11 |
31 | |
32 | /** extract template variables **/ |
33 | extract($t); |
34 | |
35 | /** Begin template **/ |
36 | ?> |
37 | <div class="search"> |
38 | <table cellspacing="0" class="table2"> |
39 | <tr> |
40 | <td style="width:1%" class="header4"> |
41 | <a href="<?php echo $expand_collapse_toggle; ?>"> |
42 | <?php |
43 | if ($show_list) { |
44 | echo getIcon($icon_theme_path, 'minus.png', '-', _("Fold")); |
45 | } else { |
46 | echo getIcon($icon_theme_path, 'plus.png', '+', _("Unfold")); |
47 | } |
48 | ?> |
49 | </a> |
50 | </td> |
51 | <td class="header4" colspan="4"> |
52 | <?php echo $list_title; ?> |
53 | </td> |
54 | </tr> |
55 | <?php |
56 | if ($show_list) { |
57 | $count = 1; |
58 | foreach ($query_list as $id=>$desc) { |
59 | if ($count%2 == 0) |
60 | $class = 'even'; |
61 | else $class = 'odd'; |
62 | ?> |
63 | <tr class="<?php echo $class; ?>"> |
64 | <td class="queryDesc"> |
65 | |
66 | </td> |
67 | <td class="queryDesc"> |
68 | <?php echo $desc; ?> |
69 | </td> |
70 | <?php |
71 | if ($is_recent_list) { |
72 | ?> |
73 | <td class="queryAction"> |
74 | <a href="<?php echo $save_recent.$id; ?>"><?php echo _("Save"); ?></a> |
75 | </td> |
76 | <td class="queryAction"> |
77 | <a href="<?php echo $do_recent.$id; ?>"><?php echo _("Search"); ?></a> |
78 | </td> |
79 | <td class="queryAction"> |
80 | <a href="<?php echo $forget_recent.$id; ?>"><?php echo _("Forget"); ?></a> |
81 | </td> |
82 | <?php |
83 | } else { |
84 | ?> |
85 | <td class="queryAction"> |
86 | <a href="<?php echo $edit_saved.$id; ?>"><?php echo _("Edit"); ?></a> |
87 | </td> |
88 | <td class="queryAction"> |
89 | <a href="<?php echo $do_saved.$id; ?>"><?php echo _("Search"); ?></a> |
90 | </td> |
91 | <td class="queryAction"> |
92 | <a href="<?php echo $delete_saved.$id; ?>"><?php echo _("Delete"); ?></a> |
93 | </td> |
94 | <?php |
95 | } |
96 | ?> |
97 | </tr> |
98 | <?php |
99 | $count++; |
100 | } |
101 | } |
102 | ?> |
103 | </table> |
d281e128 |
104 | </div> |