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