add purge link when folder contains subfolders.
[squirrelmail.git] / templates / default / option_groups.tpl
1 <?php
2 /**
3 * option_groups.tpl
4 *
5 * Template for rendering main option page blocks
6 *
7 * @copyright &copy; 2006 The SquirrelMail Project Team
8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
9 * @version $Id$
10 * @package squirrelmail
11 * @subpackage templates
12 */
13
14 /**
15 * This function prints out an option page row.
16 * FIXME: remove function from template
17 */
18 function print_optionpages_row($leftopt, $rightopt = false) {
19 global $color;
20
21 if ($rightopt) {
22 $rightopt_name = html_tag( 'td', '<a href="' . $rightopt['url'] . '">' . $rightopt['name'] . '</a>', 'left', $color[9], 'valign="top" width="49%"' );
23 $rightopt_desc = html_tag( 'td', $rightopt['desc'], 'left', $color[0], 'valign="top" width="49%"' );
24 } else {
25 $rightopt_name = html_tag( 'td', '&nbsp;', 'left', $color[4], 'valign="top" width="49%"' );
26 $rightopt_desc = html_tag( 'td', '&nbsp;', 'left', $color[4], 'valign="top" width="49%"' );
27 }
28
29 echo
30 html_tag( 'table', "\n" .
31 html_tag( 'tr', "\n" .
32 html_tag( 'td', "\n" .
33 html_tag( 'table', "\n" .
34 html_tag( 'tr', "\n" .
35 html_tag( 'td',
36 '<a href="' . $leftopt['url'] . '">' . $leftopt['name'] . '</a>' ,
37 'left', $color[9], 'valign="top" width="49%"' ) .
38 html_tag( 'td',
39 '&nbsp;' ,
40 'left', $color[4], 'valign="top" width="2%"' ) . "\n" .
41 $rightopt_name
42 ) . "\n" .
43 html_tag( 'tr', "\n" .
44 html_tag( 'td',
45 $leftopt['desc'] ,
46 'left', $color[0], 'valign="top" width="49%"' ) .
47 html_tag( 'td',
48 '&nbsp;' ,
49 'left', $color[4], 'valign="top" width="2%"' ) . "\n" .
50 $rightopt_desc
51 ) ,
52 '', '', 'width="100%" cellpadding="2" cellspacing="0" border="0"' ) ,
53 'left', '', 'valign="top"' )
54 ) ,
55 '', $color[4], 'width="100%" cellpadding="0" cellspacing="5" border="0"' );
56 }
57
58 /** extract variables */
59 extract($t);
60
61 /**
62 * Display error notices and other messages
63 * Maybe formating should be moved from src/options.php
64 */
65 echo $notice;
66
67 /********************************************/
68 /* Now, print out each option page section. */
69 /********************************************/
70 $first_optpage = false;
71 echo html_tag( 'table', '', '', $color[4], 'width="100%" cellpadding="0" cellspacing="5" border="0"' ) . "\n" .
72 html_tag( 'tr' ) . "\n" .
73 html_tag( 'td', '', 'left', '', 'valign="top"' ) .
74 html_tag( 'table', '', '', $color[4], 'width="100%" cellpadding="3" cellspacing="0" border="0"' ) . "\n" .
75 html_tag( 'tr' ) . "\n" .
76 html_tag( 'td', '', 'left' );
77
78 foreach ($optpage_blocks as $next_optpage) {
79 if ($first_optpage == false) {
80 $first_optpage = $next_optpage;
81 } else {
82 print_optionpages_row($first_optpage, $next_optpage);
83 $first_optpage = false;
84 }
85 }
86
87 if ($first_optpage != false) {
88 print_optionpages_row($first_optpage);
89 }
90 echo "</td></tr></table></td></tr></table>\n";
91
92
93 ?>
94 </td></tr>
95 </table>
96 </td></tr>
97 </table>