Iniitial option templating.
[squirrelmail.git] / templates / default / folder_manip.tpl
CommitLineData
9829e1d8 1<?php
2/**
3 * folder_manip.tpl
4 *
5 * Template for folder management (create, rename, delete, (un)subscribe)
6 *
301d1912 7 * The following variables are available in this template:
8 * + $mbx_option_list - string containing all mailboxes as <option>'s for
9 * use in <select>'s on this page.
10 * + $rendel_folder_list - string containing all mailboxes available for
11 * delete/rename as <option>'s for use in <select>'s
12 * on this page.
13 * + $show_subfolders_option - boolean TRUE if the a folder can contain
14 * subfolders in conf.pl > Folder Options
15 * + $show_only_subscribed_folders - boolean TRUE if the user only wants
16 * to see subscribed folders.
17 * + $no_list_for_subscribe = boolean TRUE if the subscribe list should NOT
18 * be displayed in conf.pl
19 * + $subbox_option_list - array containing a list of folders that can be
20 * subscribed to. Each array element contains an
21 * array with the following elements:
22 * $el['Value'] - encoded string for the VALUE
23 * field of an input element
24 * $el['Display'] - string containing the display
25 * name for the element
26 *
9829e1d8 27 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
28 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
29 * @version $Id$
30 * @package squirrelmail
31 * @subpackage templates
32 */
33
34/* retrieve the template vars */
35extract($t);
36?>
301d1912 37<div id="folderManip">
38<table cellspacing="0" class="wrapper">
39 <tr>
40 <td class="header1">
41 <?php echo _("Folders"); ?>
42 </td>
43 </tr>
44 <tr>
45 <td>
46 <table cellspacing="0">
47 <tr>
48 <td class="header2">
49 <?php echo _("Create Folder") ?>
50 </td>
51 </tr>
52 <tr>
53 <td class="folderAction">
54 <form method="post" action="folders.php" name="cf" id="cf">
55 <input type="hidden" name="smaction" value="create" />
56 <input type="text" name="folder_name" size="25" value="" />
57 <br />
58 <?php echo _("as a subfolder of") ?>
59 <br />
60 <select name="subfolder">
61 <?php echo $mbx_option_list; ?>
62 </select>
63 <?php
64 if ($show_subfolders_option) {
65 ?>
66 <br />
67 <input type="checkbox" name="contain_subs" id="contain_subs" value="1" />
68 &nbsp;
69 <label for="contain_subs"><?php echo _("Let this folder contain subfolders") ?></label>
70 <br />
71 <?php
72 }
73 ?>
74 <input type="submit" value="<?php echo _("Create") ?>" />
75 </form>
76 </td>
77 </tr>
78 </table>
79 </td>
80 </tr>
81 <tr>
82 <td>
83 <table cellspacing="0">
84 <tr>
85 <td class="header2">
86 <?php echo _("Rename a Folder") ?>
87 </td>
88 </tr>
89 <tr>
90 <td class="folderAction">
91 <?php
92 if ( !empty($rendel_folder_list) ) {
93 ?>
94 <form method="post" action="folders.php" name="rf" id="rf">
95 <input type="hidden" name="smaction" value="rename">
96 <select name="old_name">
97 <option value="">[ <?php echo _("Select a folder") ?> ]</option>
98 <?php echo $rendel_folder_list ?>
99 </select>
100 <input type="submit" value="<?php echo _("Rename") ?>" />
101 </form>
102 <?php
103 } else {
104 echo _("No folders found");
105 }
106 ?>
107 </td>
108 </tr>
109 </table>
110 </td>
111 </tr>
112 <tr>
113 <td>
114 <table cellspacing="0">
115 <tr>
116 <td class="header2">
117 <?php echo _("Delete Folder") ?>
118 </td>
119 </tr>
120 <tr>
121 <td class="folderAction">
122 <?php
123 if ( !empty($rendel_folder_list) ) {
124 ?>
125 <form method="post" action="folders.php" name="df" id="df">
126 <input type="hidden" name="smaction" value="delete">
127 <select name="folder_name">
128 <option value="">[ <?php echo _("Select a folder") ?> ]</option>
129 <?php echo $rendel_folder_list ?>
130 </select>
131 <input type="submit" value="<?php echo _("Delete") ?>" />
132 </form>
133 <?php
134 } else {
135 echo _("No folders found");
136 }
137 ?>
138 </td>
139 </tr>
140 </table>
141 </td>
142 </tr>
143 <tr>
144 <td>
145 <?php
146 if ($show_only_subscribed_folders) {
147 ?>
148 <table cellspacing="0">
149 <tr>
150 <td class="header2" colspan="2">
151 <?php echo _("Unsubscribe") .'/'. _("Subscribe"); ?>
152 </td>
153 </tr>
154 <tr>
155 <td class="folderAction">
156 <?php
157 if (!empty($rendel_folder_list)) {
158 ?>
159 <form method="post" action="folders.php" name="uf" id="uf">
160 <input type="hidden" name="smaction" value="unsubscribe" />
161 <select name="folder_names[]" multiple="multiple" size="8">
162 <?php echo $rendel_folder_list ?>
163 </select>
164 <br /><br />
165 <input type="submit" value="<?php echo _("Unsubscribe") ?>" />
166 </form>
167 <?php
168 } else {
169 echo _("No folders were found to unsubscribe from.");
170 }
171 ?>
172 </td>
173 <td class="folderAction">
174 <?php
175 if ($no_list_for_subscribe) {
176 ?>
177 <form method="post" action="folders.php" name="sf" id="sf">
178 <input type="hidden" name="smaction" value="subscribe">
179 <input type="text" name="folder_names[]" size="25" />
180 <input type="submit" value="<?php echo _("Subscribe") ?>" />
181 </form>
182 <?php
183 } elseif (!empty($subbox_option_list)) {
184 ?>
185 <form method="post" action="folders.php" name="sf" id="sf">
186 <input type="hidden" name="smaction" value="subscribe" />
187 <div>
188 <?php
189/*
190 <select name="folder_names[]" multiple="multiple" size="8">
191 <?php echo $subbox_option_list ?>
192 </select>
193*/
194 foreach ($subbox_option_list as $folder) {
195 echo '<input type="checkbox" name="folder_names[]" value="'.$folder['Value'].'" />'.$folder['Display'].'<br />';
196 }
197 ?>
198 </div>
199 <br />
200 <input type="submit" value="<?php echo _("Subscribe") ?>" />
201 </form>
202 <?php
203 } else {
204 echo _("No folders were found to subscribe to.");
205 }
206 ?>
207 </td>
208 </tr>
209 </table>
210 <?php
211 }
212 ?>
213 </td>
214 </tr>
9829e1d8 215</table>
9829e1d8 216<?php do_hook('folders_bottom'); ?>
301d1912 217</div>