Templating for searching email
[squirrelmail.git] / templates / default / search_list.tpl
CommitLineData
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 &copy; 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
31/** add required includes **/
32require_once(SM_PATH . 'templates/util_global.php');
33
34/** extract template variables **/
35extract($t);
36
37/** Begin template **/
38?>
39<div class="search">
40<table cellspacing="0" class="table2">
41 <tr>
42 <td style="width:1%" class="header4">
43 <a href="<?php echo $expand_collapse_toggle; ?>">
44 <?php
45 if ($show_list) {
46 echo getIcon($icon_theme_path, 'minus.png', '-', _("Fold"));
47 } else {
48 echo getIcon($icon_theme_path, 'plus.png', '+', _("Unfold"));
49 }
50 ?>
51 </a>
52 </td>
53 <td class="header4" colspan="4">
54 <?php echo $list_title; ?>
55 </td>
56 </tr>
57 <?php
58 if ($show_list) {
59 $count = 1;
60 foreach ($query_list as $id=>$desc) {
61 if ($count%2 == 0)
62 $class = 'even';
63 else $class = 'odd';
64 ?>
65 <tr class="<?php echo $class; ?>">
66 <td class="queryDesc">
67 &nbsp;
68 </td>
69 <td class="queryDesc">
70 <?php echo $desc; ?>
71 </td>
72 <?php
73 if ($is_recent_list) {
74 ?>
75 <td class="queryAction">
76 <a href="<?php echo $save_recent.$id; ?>"><?php echo _("Save"); ?></a>
77 </td>
78 <td class="queryAction">
79 <a href="<?php echo $do_recent.$id; ?>"><?php echo _("Search"); ?></a>
80 </td>
81 <td class="queryAction">
82 <a href="<?php echo $forget_recent.$id; ?>"><?php echo _("Forget"); ?></a>
83 </td>
84 <?php
85 } else {
86 ?>
87 <td class="queryAction">
88 <a href="<?php echo $edit_saved.$id; ?>"><?php echo _("Edit"); ?></a>
89 </td>
90 <td class="queryAction">
91 <a href="<?php echo $do_saved.$id; ?>"><?php echo _("Search"); ?></a>
92 </td>
93 <td class="queryAction">
94 <a href="<?php echo $delete_saved.$id; ?>"><?php echo _("Delete"); ?></a>
95 </td>
96 <?php
97 }
98 ?>
99 </tr>
100 <?php
101 $count++;
102 }
103 }
104 ?>
105</table>
106</div>