393a696c |
1 | <?php |
2 | /** |
3 | * options_order.tpl |
4 | * |
5 | * Template for changing message list field ordering. |
6 | * |
7 | * The following variables are available in this template: |
8 | * $fields - array containing all translated field names available |
9 | * for ordering. Array key is an integer, value is the field name |
10 | * $current_order - array containing the current ordering of fields |
11 | * $not_used - array containing fields not currently used. Array |
12 | * key is the same as in $fields, value is the translated |
13 | * field name. |
14 | * $always_show - array containing field indexes that should always be shown |
15 | * to maintain SquirrelMail functionality, e.g. Subject |
16 | * $move_up - URL foundation to move a field up in the ordering |
17 | * $move_down - URL foundation to move a field down in the ordering |
18 | * $remove - URL foundation to remove a field from the ordering. |
19 | * $add - URL foundation to add a field to the ordering. |
20 | * |
21 | * @copyright © 1999-2006 The SquirrelMail Project Team |
22 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
23 | * @version $Id$ |
24 | * @package squirrelmail |
25 | * @subpackage templates |
26 | */ |
27 | |
28 | /** add required includes **/ |
29 | include(SM_PATH . 'templates/util_global.php'); |
30 | |
31 | /** extract template variables **/ |
32 | extract($t); |
33 | |
34 | /** Begin template **/ |
35 | ?> |
36 | <div id="optionHighlight"> |
37 | <table cellspacing="0"> |
38 | <tr> |
39 | <td class="header1"> |
40 | <?php echo _("Options") .' - '. _("Index Order"); ?> |
41 | </td> |
42 | </tr> |
43 | <tr> |
44 | <td> |
45 | <?php echo _("The index order is the order that the columns are arranged in the message index. You can add, remove, and move columns around to customize them to fit your needs.");?> |
46 | </td> |
47 | </tr> |
48 | <tr> |
49 | <td> |
50 | <table cellspacing="0" class="moveFields"> |
51 | <tr> |
52 | <td colspan="4" class="divider"> |
53 | <?php echo _("Reorder indexes"); ?> |
54 | </td> |
55 | </tr> |
56 | <?php |
57 | foreach ($current_order as $order=>$index) { |
58 | echo " <tr>\n"; |
59 | |
60 | echo " <td class=\"moveLink\">\n" .($order > 0 ? '<a href="'. $move_up.$index .'">'.getIcon($icon_theme_path, 'up.png', _("up"), _("up")).'</a>' : ' '). "\n </td>\n"; |
61 | echo " <td class=\"moveLink\">\n" .($order < count($current_order)-1 ? '<a href="'. $move_down.$index .'">'.getIcon($icon_theme_path, 'down.png', _("down"), _("down")).'</a>' : ' '). "\n </td>\n"; |
62 | echo " <td class=\"moveLink\">\n" .(!in_array($index, $always_show) ? '<a href="'. $remove.$index .'">'.getIcon($icon_theme_path, 'delete.png', _("remove"), _("remove")).'</a>' : ' '). "\n </td>\n"; |
63 | echo " <td class=\"fieldName\">\n" .$fields[$index]. "\n </td>\n"; |
64 | |
65 | echo " </tr>\n"; |
66 | } |
67 | |
68 | if (count($not_used) > 0) { |
69 | ?> |
70 | <tr> |
71 | <td colspan="4" class="divider"> |
72 | <?php echo _("Add an index"); ?> |
73 | </td> |
74 | </tr> |
75 | <?php |
76 | foreach ($not_used as $field_id=>$name) { |
77 | echo "<tr>\n" . |
0b628640 |
78 | "<td colspan=\"3\" class=\"moveLink\"><a href=\"". $add.$field_id."\">".getIcon($icon_theme_path, 'plus.png', _("Add"), _("Add"))."</a></td>\n" . |
393a696c |
79 | "<td class=\"fieldName\">".htmlspecialchars($name)."</td>\n" . |
80 | "</tr>\n"; |
81 | } |
82 | ?> |
83 | </table> |
84 | </td> |
85 | </tr> |
86 | <?php |
87 | } |
88 | ?> |
89 | <tr> |
90 | <td> |
91 | <a href="../src/options.php"><?php echo _("Return to options page");?></a> |
92 | </td> |
93 | </tr> |
94 | </table> |
95 | </div> |