Happy 2015
[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 *
5e5daa47 27 * @copyright 1999-2015 The SquirrelMail Project Team
9829e1d8 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?>
46489d06 37<div class="dialogbox">
301d1912 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>
46489d06 53 <td>
301d1912 54 <form method="post" action="folders.php" name="cf" id="cf">
199a9ab8 55 <input type="hidden" name="smtoken" value="<?php echo sm_generate_security_token(); ?>" />
301d1912 56 <input type="hidden" name="smaction" value="create" />
57 <input type="text" name="folder_name" size="25" value="" />
58 <br />
59 <?php echo _("as a subfolder of") ?>
60 <br />
61 <select name="subfolder">
62 <?php echo $mbx_option_list; ?>
63 </select>
64 <?php
65 if ($show_subfolders_option) {
66 ?>
67 <br />
68 <input type="checkbox" name="contain_subs" id="contain_subs" value="1" />
69 &nbsp;
70 <label for="contain_subs"><?php echo _("Let this folder contain subfolders") ?></label>
71 <br />
72 <?php
73 }
74 ?>
75 <input type="submit" value="<?php echo _("Create") ?>" />
76 </form>
77 </td>
78 </tr>
79 </table>
80 </td>
81 </tr>
82 <tr>
83 <td>
84 <table cellspacing="0">
85 <tr>
86 <td class="header2">
87 <?php echo _("Rename a Folder") ?>
88 </td>
89 </tr>
90 <tr>
46489d06 91 <td>
301d1912 92 <?php
93 if ( !empty($rendel_folder_list) ) {
94 ?>
95 <form method="post" action="folders.php" name="rf" id="rf">
b116fd78 96 <input type="hidden" name="smaction" value="rename" />
301d1912 97 <select name="old_name">
98 <option value="">[ <?php echo _("Select a folder") ?> ]</option>
99 <?php echo $rendel_folder_list ?>
100 </select>
101 <input type="submit" value="<?php echo _("Rename") ?>" />
102 </form>
103 <?php
104 } else {
105 echo _("No folders found");
106 }
107 ?>
108 </td>
109 </tr>
110 </table>
111 </td>
112 </tr>
113 <tr>
114 <td>
115 <table cellspacing="0">
116 <tr>
117 <td class="header2">
118 <?php echo _("Delete Folder") ?>
119 </td>
120 </tr>
121 <tr>
46489d06 122 <td>
301d1912 123 <?php
124 if ( !empty($rendel_folder_list) ) {
125 ?>
126 <form method="post" action="folders.php" name="df" id="df">
b116fd78 127 <input type="hidden" name="smaction" value="delete" />
301d1912 128 <select name="folder_name">
129 <option value="">[ <?php echo _("Select a folder") ?> ]</option>
130 <?php echo $rendel_folder_list ?>
131 </select>
132 <input type="submit" value="<?php echo _("Delete") ?>" />
133 </form>
134 <?php
135 } else {
136 echo _("No folders found");
137 }
138 ?>
139 </td>
140 </tr>
141 </table>
142 </td>
143 </tr>
144 <tr>
145 <td>
146 <?php
147 if ($show_only_subscribed_folders) {
148 ?>
149 <table cellspacing="0">
150 <tr>
151 <td class="header2" colspan="2">
152 <?php echo _("Unsubscribe") .'/'. _("Subscribe"); ?>
153 </td>
154 </tr>
155 <tr>
46489d06 156 <td>
301d1912 157 <?php
158 if (!empty($rendel_folder_list)) {
159 ?>
160 <form method="post" action="folders.php" name="uf" id="uf">
199a9ab8 161 <input type="hidden" name="smtoken" value="<?php echo sm_generate_security_token(); ?>" />
301d1912 162 <input type="hidden" name="smaction" value="unsubscribe" />
163 <select name="folder_names[]" multiple="multiple" size="8">
164 <?php echo $rendel_folder_list ?>
165 </select>
166 <br /><br />
167 <input type="submit" value="<?php echo _("Unsubscribe") ?>" />
168 </form>
169 <?php
170 } else {
171 echo _("No folders were found to unsubscribe from.");
172 }
173 ?>
174 </td>
46489d06 175 <td>
301d1912 176 <?php
177 if ($no_list_for_subscribe) {
178 ?>
179 <form method="post" action="folders.php" name="sf" id="sf">
199a9ab8 180 <input type="hidden" name="smtoken" value="<?php echo sm_generate_security_token(); ?>" />
b116fd78 181 <input type="hidden" name="smaction" value="subscribe" />
301d1912 182 <input type="text" name="folder_names[]" size="25" />
183 <input type="submit" value="<?php echo _("Subscribe") ?>" />
184 </form>
185 <?php
186 } elseif (!empty($subbox_option_list)) {
187 ?>
188 <form method="post" action="folders.php" name="sf" id="sf">
199a9ab8 189 <input type="hidden" name="smtoken" value="<?php echo sm_generate_security_token(); ?>" />
301d1912 190 <input type="hidden" name="smaction" value="subscribe" />
191 <div>
192 <?php
193/*
194 <select name="folder_names[]" multiple="multiple" size="8">
195 <?php echo $subbox_option_list ?>
196 </select>
197*/
198 foreach ($subbox_option_list as $folder) {
31f5ebd4 199 echo '<input type="checkbox" name="folder_names[]" id="sub_'.$folder['Value'].'" value="'.$folder['Value'].'" /> '.
200 '<label for="sub_'.$folder['Value'].'">'.$folder['Display'].'</label><br />';
301d1912 201 }
202 ?>
203 </div>
204 <br />
205 <input type="submit" value="<?php echo _("Subscribe") ?>" />
206 </form>
207 <?php
208 } else {
209 echo _("No folders were found to subscribe to.");
210 }
211 ?>
212 </td>
213 </tr>
214 </table>
215 <?php
216 }
217 ?>
79bdd888 218<?php /* Known plugins using this output point: empty_folders */ if (!empty($plugin_output['folders_bottom'])) echo $plugin_output['folders_bottom']; ?>
301d1912 219 </td>
220 </tr>
9829e1d8 221</table>
6e515418 222</div>