Commit | Line | Data |
---|---|---|
0337d704 | 1 | {**************************************************************************} |
2 | {* *} | |
179afa7f | 3 | {* Copyright (C) 2003-2008 Polytechnique.org *} |
0337d704 | 4 | {* http://opensource.polytechnique.org/ *} |
5 | {* *} | |
6 | {* This program is free software; you can redistribute it and/or modify *} | |
7 | {* it under the terms of the GNU General Public License as published by *} | |
8 | {* the Free Software Foundation; either version 2 of the License, or *} | |
9 | {* (at your option) any later version. *} | |
10 | {* *} | |
11 | {* This program is distributed in the hope that it will be useful, *} | |
12 | {* but WITHOUT ANY WARRANTY; without even the implied warranty of *} | |
13 | {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} | |
14 | {* GNU General Public License for more details. *} | |
15 | {* *} | |
16 | {* You should have received a copy of the GNU General Public License *} | |
17 | {* along with this program; if not, write to the Free Software *} | |
18 | {* Foundation, Inc., *} | |
19 | {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} | |
20 | {* *} | |
21 | {**************************************************************************} | |
22 | ||
23 | {if $retour == $smarty.const.ERROR_INACTIVE_REDIRECTION} | |
24 | <p class="erreur"> | |
25 | Tu ne peux pas avoir aucune adresse de redirection active, sinon ton adresse | |
26 | {$smarty.session.forlife}@{#globals.mail.domain#} ne fonctionnerait plus. | |
27 | </p> | |
28 | {/if} | |
29 | {if $retour == $smarty.const.ERROR_INVALID_EMAIL} | |
30 | <p class="erreur"> | |
31 | Erreur: l'email n'est pas valide. | |
32 | </p> | |
33 | {/if} | |
34 | {if $retour == $smarty.const.ERROR_LOOP_EMAIL} | |
35 | <p class="erreur"> | |
a7de4ef7 | 36 | Erreur: {$smarty.session.forlife}@{#globals.mail.domain#} ne doit pas être renvoyé |
37 | vers lui-même, ni vers son équivalent en {#globals.mail.domain2#} ni vers polytechnique.edu. | |
0337d704 | 38 | </p> |
39 | {/if} | |
0337d704 | 40 | <h1> |
41 | Tes adresses de redirection | |
42 | </h1> | |
43 | <p> | |
e8439508 | 44 | Tu configures ici les adresses emails vers lesquelles tes adresses (listées ci-dessous) sont dirigées : |
0337d704 | 45 | </p> |
46 | <ul> | |
47 | {if $melix} | |
48 | <li> | |
49 | <strong>{$melix}@{#globals.mail.alias_dom#}</strong>, | |
50 | <strong>{$melix}@{#globals.mail.alias_dom2#}</strong> | |
51 | </li> | |
52 | {/if} | |
53 | {foreach from=$alias item=a} | |
54 | <li> | |
55 | <strong>{$a.alias}@{#globals.mail.domain#}</strong> | |
56 | {if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format})</span>{/if} | |
57 | </li> | |
58 | {/foreach} | |
59 | </ul> | |
60 | <p> | |
a7de4ef7 | 61 | Le routage est en place pour les adresses dont la case "<strong>Actif</strong>" est cochée. |
62 | Si tu modifies souvent ton routage, tu as tout intérêt à rentrer toutes les | |
0337d704 | 63 | adresses qui sont susceptibles de recevoir ton routage, de sorte qu'en |
64 | jouant avec les cases "<strong>Actif</strong>" tu pourras facilement mettre en place les unes | |
65 | ou bien les autres. | |
66 | </p> | |
67 | <p> | |
a7de4ef7 | 68 | Enfin, la <strong>réécriture</strong> consiste à substituer à ton adresse email habituelle |
bb0727ea | 69 | (adresse gmail, orange, free, ou autre) ton adresse {#globals.mail.domain#} ou |
a7de4ef7 | 70 | {#globals.mail.domain2#} dans l'adresse d'expédition de tes messages, lorsque le courrier |
71 | passe par nos serveurs. Ceci arrive lorsque tu écris à un camarade sur son adresse {#globals.mail.domain#} ou | |
0337d704 | 72 | {#globals.mail.domain2#}, ou lorsque tu utilises notre |
483fb312 | 73 | <a href="Xorg/SMTPSecurise">service d'envoi de courrier SMTP sécurisé</a>. |
0337d704 | 74 | </p> |
b9dcbddd | 75 | |
5721c9a3 | 76 | {javascript name=ajax} |
b9dcbddd | 77 | <script type="text/javascript">//<![CDATA[ |
78 | {literal} | |
86f17197 FB |
79 | function activeEnable() |
80 | { | |
81 | var remove = $(".active_email:checked"); | |
82 | if (remove.length <= 1) { | |
83 | remove.attr("disabled", "disabled"); | |
84 | } else { | |
85 | remove.removeAttr("disabled"); | |
86 | } | |
87 | } | |
88 | ||
b9dcbddd | 89 | function redirectUpdate() |
90 | { | |
311bc3ad | 91 | showTempMessage('redirect-msg', "Tes redirections ont été mises à jour.", true); |
86f17197 | 92 | activeEnable(); |
b9dcbddd | 93 | } |
917b5172 | 94 | |
95 | function removeRedirect(link, email) | |
96 | { | |
97 | if (confirm("Supprimer l'adresse " + email + " ?")) { | |
98 | $.get(link.href, {},function() { | |
99 | $('tr[@id=line_' + email.replace('@', '_at_') + ']').remove(); | |
100 | showRemove(); | |
101 | }); | |
102 | } | |
103 | return false; | |
104 | } | |
105 | ||
106 | function showRemove() | |
107 | { | |
108 | var removeLinks = $('.remove_email'); | |
109 | if (removeLinks.length == 1) { | |
110 | removeLinks.hide(); | |
111 | } else { | |
112 | removeLinks.show(); | |
113 | } | |
114 | } | |
86f17197 | 115 | |
b9dcbddd | 116 | {/literal} |
117 | //]]></script> | |
b679ad80 | 118 | {javascript name="jquery"} |
5ff3f06b | 119 | {test_email} |
b9dcbddd | 120 | <div id="redirect-msg" style="position:absolute;"></div><br /> |
0337d704 | 121 | <div class="center"> |
122 | <table class="bicol" summary="Adresses de redirection"> | |
123 | <tr> | |
124 | <th>Email</th> | |
125 | <th>Actif</th> | |
a7de4ef7 | 126 | <th>Réécriture</th> |
0337d704 | 127 | <th> </th> |
128 | </tr> | |
b9dcbddd | 129 | {foreach from=$emails item=e name=redirect} |
b679ad80 | 130 | <tr class="{cycle values="pair,impair"}" id="line_{$e->email|replace:'@':'_at_'}"> |
dc557110 | 131 | <td> |
132 | <strong> | |
3b83212e | 133 | {if $e->broken}<span class="erreur">{assign var="erreur" value="1"}{/if} |
134 | {if $e->panne neq '0000-00-00'}{assign var="panne" value="1"}{icon name=error title="En panne"}{/if} | |
dc557110 | 135 | {$e->email} |
b832310a | 136 | {if $e->broken}</span>{/if} |
dc557110 | 137 | </strong> |
138 | </td> | |
0337d704 | 139 | <td> |
86f17197 | 140 | <input type="checkbox" value="{$e->email}" class="active_email" |
b9dcbddd | 141 | {if $e->active}checked="checked"{/if} |
142 | {if $smarty.foreach.redirect.total eq 1}disabled="disabled"{/if} | |
143 | onchange="Ajax.update_html(null,'{$globals->baseurl}/emails/redirect/'+(this.checked?'':'in')+'active/{$e->email}', redirectUpdate)" /></td> | |
0337d704 | 144 | <td> |
5ff3f06b | 145 | <select onchange="Ajax.update_html(null,'emails/redirect/rewrite/{$e->email}/'+this.value, redirectUpdate)"> |
0337d704 | 146 | <option value=''>--- aucune ---</option> |
a8c73061 | 147 | {assign var=dom1 value=#globals.mail.domain#} |
148 | {assign var=dom2 value=#globals.mail.domain2#} | |
0337d704 | 149 | {foreach from=$alias item=a} |
a8c73061 | 150 | <option {if $e->rewrite eq "`$a.alias`@`$dom1`"}selected='selected'{/if} |
d7dd70be | 151 | value='{$a.alias}@{#globals.mail.domain#}'>{$a.alias}@{#globals.mail.domain#}</option> |
a8c73061 | 152 | <option {if $e->rewrite eq "`$a.alias`@`$dom2`"}selected='selected'{/if} |
d7dd70be | 153 | value='{$a.alias}@{#globals.mail.domain2#}'>{$a.alias}@{#globals.mail.domain2#}</option> |
0337d704 | 154 | {/foreach} |
155 | </select> | |
156 | </td> | |
b679ad80 | 157 | <td> |
917b5172 | 158 | <a href="emails/redirect/remove/{$e->email}" |
159 | class="remove_email" | |
160 | onclick="return removeRedirect(this, "{$e->email}");" > | |
161 | {icon name=cross title="Supprimer"} | |
bac1e60a | 162 | </a> |
163 | </td> | |
0337d704 | 164 | </tr> |
165 | {/foreach} | |
bb0727ea VZ |
166 | {if $googleapps eq 'active'} |
167 | <tr class="{cycle values="pair,impair"}"> | |
168 | <td><strong>Compte GMail / Google Apps</strong></td> | |
169 | <td> | |
170 | <input type="checkbox" value="googleapps" disabled="disabled" | |
171 | {if in_array('googleapps', $storage)}checked="checked"{/if} /> | |
172 | </td> | |
173 | <td>-</td> | |
174 | <td> | |
175 | <a href="emails/redirect#googleapps">{icon name=information title="Plus d'informations"}</a> | |
176 | </td> | |
177 | </tr> | |
178 | {/if} | |
86f17197 | 179 | <script type="text/javascript">activeEnable(); showRemove();</script> |
1aef801a | 180 | <tr class="{cycle values="pair,impair"}"><td colspan="4"> |
b7582015 | 181 | <form action="emails/redirect" method="post"> |
182 | <div> | |
917b5172 | 183 | <br /> |
e8439508 | 184 | Ajouter une adresse email : |
917b5172 | 185 | <input type="text" size="35" maxlength="60" name="email" value="" /> |
186 | <input type="submit" value="ajouter" name="emailop" /> | |
b7582015 | 187 | </div> |
188 | </form> | |
1aef801a | 189 | </td></tr> |
0337d704 | 190 | </table> |
0337d704 | 191 | </div> |
3b83212e | 192 | {if $panne} |
dc557110 | 193 | <p class="smaller"> |
b832310a | 194 | <strong> |
195 | {icon name=error title="En panne"} | |
db9c3838 | 196 | <a href="Xorg/Pannes">Panne :</a> |
b832310a | 197 | </strong> |
a7de4ef7 | 198 | Les adresses marquées de cette icône sont des adresses de redirection pour lesquelles une panne |
199 | a été détectée. Si le problème persiste, la redirection vers ces adresses sera désactivée. | |
b832310a | 200 | </p> |
3b83212e | 201 | {/if} |
202 | {if $erreur} | |
b832310a | 203 | <p class="smaller"> |
204 | <strong> | |
205 | {icon name=error title="En panne"} | |
db9c3838 | 206 | <a href="Xorg/Pannes" style="color: #f00">Panne durable :</a> |
b832310a | 207 | </strong> |
a7de4ef7 | 208 | Les adresses en rouge sont des adresses qui ont été désactivées en raison d'un grand nombre de pannes. Si tu penses que |
209 | le problème est résolu, tu peux les réactiver, mais l'adresse sera redésactivée si les problèmes persistent. | |
dc557110 | 210 | </p> |
3b83212e | 211 | {/if} |
edbf87a7 FB |
212 | {if $smarty.session.mx_failures|@count} |
213 | <fieldset> | |
214 | <legend>{icon name=error} Des problèmes sont actuellement recontrés sur tes redirections suivantes</legend> | |
215 | {foreach from=$smarty.session.mx_failures item=mail} | |
216 | <div> | |
217 | <span class="erreur">{$mail.mail}</span> | |
218 | <div class="explication">{$mail.text}</div> | |
219 | </div> | |
220 | {/foreach} | |
221 | </fieldset> | |
222 | {/if} | |
1aef801a | 223 | |
bb0727ea VZ |
224 | {* TODO(vincent.zanotti): remove the following block of code when both IMAP and GApps will be active. *} |
225 | {if in_array('imap', $storage) neq 0 or #globals.mailstorage.imap_active# or hasPerm('admin')} | |
226 | {assign var=has_imap value=true} | |
227 | {else} | |
228 | {assign var=has_imap value=false} | |
229 | {/if} | |
230 | {if $googleapps or #globals.mailstorage.googleapps_active# or hasPerm('admin')} | |
231 | {assign var=has_googleapps value=true} | |
232 | {else} | |
233 | {assign var=has_googleapps value=false} | |
234 | {/if} | |
235 | ||
236 | {if $has_imap or $has_googleapps} | |
aab4661d | 237 | <h1>Tes comptes de stockage de courrier</h1> |
bb0727ea VZ |
238 | {/if} |
239 | {if $has_imap} | |
aab4661d VZ |
240 | <p> |
241 | Polytechnique.org te propose de conserver les mails que tu reçois, pendant une durée limitée (environ 30 jours). | |
242 | Grâce à ce service, tu disposes d'une sauvegarde de tes mails en secours, au cas où, par exemple, tu effacerais | |
243 | un mail par erreur.<br /> | |
244 | <strong>Attention :</strong> il ne s'agit que d'un service de secours, dont la disponibilité n'est pas garantie. | |
245 | </p> | |
246 | ||
247 | <table class="bicol" summary="Compte de stockage"> | |
bb0727ea VZ |
248 | <col width="75%" /> |
249 | <col width="25%" /> | |
aab4661d VZ |
250 | <tr> |
251 | <th colspan="2">Compte de stockage</th> | |
252 | </tr> | |
253 | <tr class="pair"> | |
254 | <td> | |
bb0727ea | 255 | <a href="Xorg/IMAP"> |
aab4661d VZ |
256 | <strong>Accès de secours aux emails (IMAP)</strong> |
257 | </a><br />Hébergé par Polytechnique.org | |
258 | </td> | |
bb0727ea | 259 | <td style="text-align: center; vertical-align: middle"> |
aab4661d VZ |
260 | <form action="emails/redirect/storage/imap/{if in_array('imap', $storage)}inactive{else}active{/if}" method="post"> |
261 | {if in_array('imap', $storage)} | |
262 | <input type="submit" value="Désactiver" /> | |
263 | {else} | |
264 | <input type="submit" value="Activer" /> | |
265 | {/if} | |
266 | </form> | |
267 | </td> | |
268 | </tr> | |
269 | </table> | |
fb31ee6b | 270 | {/if} |
aab4661d | 271 | |
bb0727ea VZ |
272 | {if $has_googleapps} |
273 | <br /> | |
274 | <p> | |
275 | Grâce à un partenariat avec Google, Polytechnique.org te propose également un compte | |
276 | <b>Google Apps</b>, qui te permet de disposer des services Google (GMail pour | |
277 | tes emails, Google Calendar, Google Docs, ...) sur une adresse polytechnique.org. | |
278 | </p> | |
279 | ||
280 | <table class="bicol" summary="Compte de stockage" id="googleapps"> | |
281 | <col width="75%" /> | |
282 | <col width="25%" /> | |
283 | <tr> | |
284 | <th colspan="2">Compte de stockage</th> | |
285 | </tr> | |
286 | <tr class="pair"> | |
287 | {if $googleapps eq 'active'} | |
288 | <td> | |
289 | <a href="googleapps"> | |
290 | <strong>Redirection des emails vers GMail / Google Apps</strong> | |
291 | </a><br />Hébergé par Google | |
292 | </td> | |
293 | <td style="text-align: center; vertical-align: middle"> | |
294 | <form action="emails/redirect/storage/googleapps/{if in_array('googleapps', $storage)}inactive{else}active{/if}" method="post"> | |
295 | {if in_array('googleapps', $storage)} | |
296 | <input type="submit" value="Désactiver" /> | |
297 | {else} | |
298 | <input type="submit" value="Activer" /> | |
299 | {/if} | |
300 | </form> | |
301 | </td> | |
302 | {else} | |
303 | <td colspan="2"> | |
304 | {if $googleapps eq 'disabled'} | |
305 | Ton compte Google Apps est actuellement inactif.<br /> | |
306 | {else} | |
307 | Tu n'as pas encore de compte Google Apps sur Polytechnique.org.<br /> | |
308 | {/if} | |
309 | <a href="googleapps">Plus d'informations …</a> | |
310 | </td> | |
311 | {/if} | |
312 | </tr> | |
313 | </table> | |
314 | {/if} | |
315 | ||
3b83212e | 316 | {if $eleve} |
a7de4ef7 | 317 | <h1>Pour les Élèves (non encore diplômés)</h1> |
1aef801a | 318 | <p> |
a7de4ef7 | 319 | L'X te fournit aussi une adresse à vie en <strong>«prenom.nom»@polytechnique.edu</strong> qui par défaut est |
320 | une redirection vers «login»@poly.polytechnique.fr. <a href="https://www.mail.polytechnique.edu/"> | |
1aef801a | 321 | Tu peux modifier cette redirection</a> et la faire pointer vers ton adresse |
322 | {$smarty.session.forlife}@{#globals.mail.domain#} (attention, cela demande de la concentration). | |
323 | </p> | |
324 | <p> | |
a7de4ef7 | 325 | Si tu utilises le service POP de poly pour récupérer tes mails dans ton logiciel de courrier, |
e8439508 | 326 | l'équipe de Polytechnique.org te conseille de rediriger : |
1aef801a | 327 | </p> |
328 | <ul> | |
483fb312 | 329 | <li>«prenom.nom»@polytechnique.edu vers {$smarty.session.forlife}@{#globals.mail.domain#} ;</li> |
330 | <li>{$smarty.session.forlife}@{#globals.mail.domain#} vers «login»@poly.polytechnique.fr.</li> | |
1aef801a | 331 | </ul> |
425f6f37 | 332 | <p> |
a7de4ef7 | 333 | Attention à ne pas faire une boucle quand tu manipules tes redirections ! Tes emails seraient |
334 | alors perdus, jusqu'à ce que tu règles le problème. | |
425f6f37 | 335 | </p> |
3b83212e | 336 | {/if} |
1aef801a | 337 | |
a7de4ef7 | 338 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |