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 | |
27 | /** add required includes **/ |
28 | require(SM_PATH . 'templates/util_global.php'); |
29 | |
30 | /** extract template variables **/ |
31 | extract($t); |
32 | |
33 | /** Begin template **/ |
34 | ?> |
35 | <div id="optionHighlightList"> |
36 | <table cellspacing="0" class="table1"> |
37 | <tr> |
38 | <td class="header1"> |
39 | <?php echo _("Options") .' - '. _("Message Highlighting"); ?> |
40 | </td> |
41 | </tr> |
42 | <tr> |
43 | <td> |
44 | <table cellspacing="0" class="table1"> |
45 | <?php |
46 | if (count($current_rules) == 0) { |
47 | ?> |
48 | <tr> |
49 | <td colspan="6" class="emptyList"> |
50 | <?php echo _("No highlighting is defined"); ?> |
51 | </td> |
52 | </tr> |
53 | <?php |
54 | } |
55 | |
56 | foreach ($current_rules as $index=>$rule) { |
57 | ?> |
58 | <tr> |
59 | <td class="ruleButtons"> |
60 | <a href="<?php echo $edit_rule.$index ?>"><?php echo getIcon($icon_theme_path, 'edit.png', _("Edit"), _("Edit")); ?></a> |
61 | </td> |
62 | <td class="ruleButtons"> |
63 | <a href="<?php echo $delete_rule.$index; ?>"><?php echo getIcon($icon_theme_path, 'delete.png', _("Delete"), _("Delete")); ?></a> |
64 | </td> |
65 | <td class="ruleButtons"> |
66 | <?php |
67 | if ($index > 0) { |
68 | ?> |
69 | <a href="<?php echo $move_up.$index; ?>"><?php echo getIcon($icon_theme_path, 'up.png', _("Up"), _("Up")); ?></a> |
70 | <?php |
71 | } else { |
72 | ?> |
73 | |
74 | <?php |
75 | } |
76 | ?> |
77 | </td> |
78 | <td class="ruleButtons"> |
79 | <?php |
80 | if ($index < count($current_rules)-1) { |
81 | ?> |
82 | <a href="<?php echo $move_down.$index; ?>"><?php echo getIcon($icon_theme_path, 'down.png', _("Down"), ("Down")); ?></a> |
83 | <?php |
84 | } else { |
85 | ?> |
86 | |
87 | <?php |
88 | } |
89 | ?> |
90 | </td> |
91 | <td bgcolor="#<?php echo $rule['Color']; ?>" class="ruleName"> |
92 | <?php echo $rule['Name']; ?> |
93 | </td> |
94 | <td bgcolor="#<?php echo $rule['Color']; ?>" class="ruleDesc"> |
95 | <?php echo $rule['MatchField'].' = '.$rule['MatchValue']; ?> |
96 | </td> |
97 | </tr> |
98 | <?php |
99 | } |
100 | ?> |
101 | </table> |
102 | </td> |
103 | </tr> |
104 | <tr> |
105 | <td class="ruleButtons"> |
0b628640 |
106 | <a href="<?php echo $add_rule; ?>"><?php echo getIcon($icon_theme_path, 'plus.png', _("Add"), _("Add")); ?></a> Add Rule |
e74c82eb |
107 | </td> |
108 | </tr> |
109 | </table> |
110 | </div> |