Merge remote branch 'origin/platal-0.10.2'
[platal.git] / templates / carnet / notifs.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2010 Polytechnique.org                             *}
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
24 <h1>Notifications automatiques</h1>
25
26 <p>Les emails sont hebdomadaires (pour éviter une trop grosse charge du serveur d'envoi et de ta boite email).
27 S'il n'y a rien à te signaler l'email ne t'est pas envoyé.</p>
28
29 <form action="carnet/notifs" method="post">
30   {xsrf_token_field}
31   <fieldset>
32     <legend>Email</legend>
33     <label><input type='checkbox' name='mail' onclick="this.form.submit();" {if $watch->watch_mail}checked="checked"{/if} />
34     Recevoir un email hebdomadaire des événements que je n'ai pas déjà vus sur le site.</label><br />
35     <input type='hidden' name='flags_mail' value='valider' />
36   </fieldset>
37 </form>
38
39 <form action="carnet/notifs" method="post">
40   {xsrf_token_field}
41   <fieldset>
42     <legend>Événements à surveiller</legend>
43     {foreach from=$watch->cats() item=s key=i}
44     <label><input type='checkbox' name='sub[{$i}]' {if $watch->subs($i)}checked="checked"{/if} />
45     {$s.short} {if $s.type eq near}<sup>o</sup>{elseif $s.type eq often}<sup>*</sup>{/if}</label><br />
46     {/foreach}
47     <span class='smaller'><sup>*</sup>: ne concerne pas les promos (événements très fréquents).</span><br />
48     <span class='smaller'><sup>o</sup>: ne concerne que les promos entre {$smarty.session.promo-1} et {$promo_sortie-2} que tu surveilles.</span>
49   </fieldset>
50   <div class='center'>
51     <input type='submit' name='subs' value='valider' />
52   </div>
53 </form>
54
55 <h1 id='middle'>Qui/Que surveiller&nbsp;?</h1>
56
57 <h2>Surveiller ses contacts</h2>
58
59 <form action="carnet/notifs#middle" method="post">
60   {xsrf_token_field}
61   <fieldset>
62     <legend>Contacts</legend>
63     <label><input type='checkbox' name='contacts' onclick="this.form.submit();" {if
64     $watch->watch_contacts}checked="checked"{/if} /> Surveiller mes contacts</label><br />
65     <input type='hidden' name='flags_contacts' value='valider' />
66   </fieldset>
67 </form>
68
69 <br />
70
71 <h2>Surveiller des promos</h2>
72
73 <p>
74 Attention&nbsp;: pour les promos, tu n'es pas notifié des événements trop fréquents (par exemple les changements de fiche).
75 </p>
76
77 <form action="carnet/notifs/" method="post">
78   {xsrf_token_field}
79   <fieldset>
80     <legend>Ajouter une promo</legend>
81     Tu peux surveiller des promos (mettre la promo sur 4 chiffres),
82     ou des plages de promos (par ex. 1990-1992)&nbsp;:<br />
83     <input type='text' name='promo' />
84     <input type='submit' name='add_promo' value='ajouter'
85       onclick="this.form.action += 'add_promo/' + this.form.promo.value;" />
86     <input type='submit' name='del_promo' value='retirer'
87       onclick="this.form.action += 'del_promo/' + this.form.promo.value;" />
88     <br />
89     {if $watch->promos()|@count eq 0}
90     <p>Tu ne surveilles actuellement aucune promo.</p>
91     {else}
92     <p>Tu surveilles les promos suivantes&nbsp;:</p>
93     <ul>
94       {foreach from=$watch->promos() item=p}
95       <li>{if $p.0 eq $p.1}{$p.0}{else}{$p.0} à {$p.1}{/if}</li>
96       {/foreach}
97     </ul>
98     {/if}
99   </fieldset>
100 </form>
101
102 <h2>Surveiller des non inscrits</h2>
103
104 <p>
105 Si un non-inscrit que tu surveilles s'inscrit, il sera automatiquement ajouté à tes contacts.
106 </p>
107
108 <p>
109 Pour surveiller des membres non-inscrits, il faut passer par la <a href="search" class='popup'>recherche</a>
110 et cliquer sur les icones {icon name=add} pour les ajouter à cette liste.
111 </p>
112
113 <fieldset>
114   <legend>Non-inscrits</legend>
115     {if $watch->nonins()|@count eq 0}
116     Tu ne surveilles actuellement aucun non-inscrit.
117     {elseif $watch->nonins()|@count}
118     Tu surveilles {if $watch->nonins()|@count eq 1}le non-inscrit{else}les non-inscrits{/if}&nbsp;:
119     <ul>
120     {foreach from=$watch->nonins() item=p}
121     <li>
122       {$p.prenom} {$p.nom} ({$p.promo}) <a href="carnet/notifs/del_nonins/{$p.user_id}?token={xsrf_token}">{icon name='cross' title='retirer'}</a>
123     </li>
124     {/foreach}
125   </ul>
126   {/if}
127 </fieldset>
128
129 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}