e74c82eb |
1 | <?php |
2 | /** |
3 | * options_highlight.tpl |
4 | * |
5 | * Template for displaying option highlighting rules |
6 | * |
7 | * The following variables are available in this template: |
8 | * $current_rules - array containing the current rule set. Each element |
9 | * contains the following fields: |
10 | * $el['Name'] - The name of the rule. Sanitized. May be empty. |
11 | * $el['Color'] - The highlight color for the rule |
12 | * $el['MatchField'] - Translated name of the field the rule matches |
13 | * $el['MatchValue'] - The value being matched |
14 | * $add_rule - URL to add a rule |
15 | * $edit_rule - URL foundation to edit a rule |
16 | * $delete_rule - URL foundation to delete a rule |
17 | * $move_up - URL foundation to move a rule up |
18 | * $move_down - URL foundation to move a rule down |
19 | * |
20 | * @copyright © 1999-2006 The SquirrelMail Project Team |
21 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
22 | * @version $Id$ |
23 | * @package squirrelmail |
24 | * @subpackage templates |
25 | */ |
26 | |
e74c82eb |
27 | |
28 | /** extract template variables **/ |
29 | extract($t); |
30 | |
31 | /** Begin template **/ |
32 | ?> |
33 | <div id="optionHighlightList"> |
34 | <table cellspacing="0" class="table1"> |
35 | <tr> |
36 | <td class="header1"> |
37 | <?php echo _("Options") .' - '. _("Message Highlighting"); ?> |
38 | </td> |
39 | </tr> |
40 | <tr> |
41 | <td> |
42 | <table cellspacing="0" class="table1"> |
43 | <?php |
44 | if (count($current_rules) == 0) { |
45 | ?> |
46 | <tr> |
47 | <td colspan="6" class="emptyList"> |
48 | <?php echo _("No highlighting is defined"); ?> |
49 | </td> |
50 | </tr> |
51 | <?php |
52 | } |
53 | |
54 | foreach ($current_rules as $index=>$rule) { |
55 | ?> |
56 | <tr> |
57 | <td class="ruleButtons"> |
58 | <a href="<?php echo $edit_rule.$index ?>"><?php echo getIcon($icon_theme_path, 'edit.png', _("Edit"), _("Edit")); ?></a> |
59 | </td> |
60 | <td class="ruleButtons"> |
61 | <a href="<?php echo $delete_rule.$index; ?>"><?php echo getIcon($icon_theme_path, 'delete.png', _("Delete"), _("Delete")); ?></a> |
62 | </td> |
63 | <td class="ruleButtons"> |
64 | <?php |
65 | if ($index > 0) { |
66 | ?> |
67 | <a href="<?php echo $move_up.$index; ?>"><?php echo getIcon($icon_theme_path, 'up.png', _("Up"), _("Up")); ?></a> |
68 | <?php |
69 | } else { |
70 | ?> |
71 | |
72 | <?php |
73 | } |
74 | ?> |
75 | </td> |
76 | <td class="ruleButtons"> |
77 | <?php |
78 | if ($index < count($current_rules)-1) { |
79 | ?> |
80 | <a href="<?php echo $move_down.$index; ?>"><?php echo getIcon($icon_theme_path, 'down.png', _("Down"), ("Down")); ?></a> |
81 | <?php |
82 | } else { |
83 | ?> |
84 | |
85 | <?php |
86 | } |
87 | ?> |
88 | </td> |
89 | <td bgcolor="#<?php echo $rule['Color']; ?>" class="ruleName"> |
90 | <?php echo $rule['Name']; ?> |
91 | </td> |
92 | <td bgcolor="#<?php echo $rule['Color']; ?>" class="ruleDesc"> |
93 | <?php echo $rule['MatchField'].' = '.$rule['MatchValue']; ?> |
94 | </td> |
95 | </tr> |
96 | <?php |
97 | } |
98 | ?> |
99 | </table> |
100 | </td> |
101 | </tr> |
102 | <tr> |
103 | <td class="ruleButtons"> |
0b628640 |
104 | <a href="<?php echo $add_rule; ?>"><?php echo getIcon($icon_theme_path, 'plus.png', _("Add"), _("Add")); ?></a> Add Rule |
e74c82eb |
105 | </td> |
106 | </tr> |
107 | </table> |
d281e128 |
108 | </div> |