Happy New Year!
[platal.git] / templates / carnet / notifs.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2011 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>{icon name="email"} Email</legend>
33     <label>
34       <input type='checkbox' name='mail' onclick="this.form.submit();" {if $flags->hasFlag('mail')}checked="checked"{/if} />
35       Recevoir un email hebdomadaire des événements que je n'ai pas déjà vus sur le site.
36     </label><br />
37     <input type='hidden' name='flags_mail' value='valider' />
38   </fieldset>
39 </form>
40
41 <form action="carnet/notifs" method="post">
42   {xsrf_token_field}
43   <fieldset>
44     <legend>{icon name="bell"} Événements à surveiller</legend>
45     <label>
46       <input type="checkbox" name='sub[profile]' {if $actions->hasFlag('profile')}checked="checked"{/if} />
47       Mise à jour de fiche<sup>*</sup>
48     </label><br />
49     <label>
50       <input type="checkbox" name='sub[registration]' {if $actions->hasFlag('registration')}checked="checked"{/if} />
51       Nouveaux inscrits
52     </label><br />
53     <label>
54       <input type="checkbox" name='sub[death]' {if $actions->hasFlag('death')}checked="checked"{/if} />
55       Décès
56     </label><br />
57     <label>
58       <input type="checkbox" name='sub[birthday]' {if $actions->hasFlag('birthday')}checked="checked"{/if} />
59       Anniversaires<sup>o</sup>
60     </label><br />
61     <span class='smaller'><sup>*</sup>: ne concerne pas les promos (événements très fréquents).</span><br />
62     {assign var="profile" value=$smarty.session.user->profile()}
63     <span class='smaller'><sup>o</sup>: ne concerne que les promos entre {$profile->yearpromo()-1} et {$profile->yearpromo()+1} que tu surveilles.</span>
64   </fieldset>
65   <div class='center'>
66     <input type='submit' name='subs' value='valider' />
67   </div>
68 </form>
69
70 <h1 id='middle'>Qui/Que surveiller&nbsp;?</h1>
71
72 <h2>Surveiller ses contacts</h2>
73
74 <form action="carnet/notifs#middle" method="post">
75   {xsrf_token_field}
76   <fieldset>
77     <legend>{icon name="user_suit"} Contacts</legend>
78     <label>
79       <input type='checkbox' name='contacts' onclick="this.form.submit();" {if $flags->hasFlag('contacts')}checked="checked"{/if} />
80       Surveiller mes contacts
81     </label><br />
82     <input type='hidden' name='flags_contacts' value='valider' />
83   </fieldset>
84 </form>
85
86 <br />
87
88 <h2>Surveiller des promos</h2>
89
90 <p>
91 Attention&nbsp;: pour les promos, tu n'es pas notifié des événements trop fréquents (par exemple les changements de fiche).
92 </p>
93
94 <form action="carnet/notifs/" method="post">
95   {xsrf_token_field}
96   <fieldset>
97     <legend>{icon name="group"} Ajouter une promo</legend>
98     Tu peux surveiller des promos (mettre la promo sur 4 chiffres),
99     ou des plages de promos (par ex. 1990-1992)&nbsp;:<br />
100     <input type='text' name='promo' />
101     <input type='submit' name='add_promo' value='ajouter'
102       onclick="this.form.action += 'add_promo/' + this.form.promo.value;" />
103     <input type='submit' name='del_promo' value='retirer'
104       onclick="this.form.action += 'del_promo/' + this.form.promo.value;" />
105     <br />
106     {if $promo_count eq 0}
107     <p>Tu ne surveilles actuellement aucune promo.</p>
108     {else}
109     <p>Tu surveilles {if $promo_count eq 1}la promotion suivante&nbsp;:{else}les promotions suivantes&nbsp;:{/if}</p>
110     <ul>
111     {foreach from=$promo_ranges item=promos}
112       <li>{$promos[0]}{if $promos[0] neq $promos[1]} à {$promos[1]}{/if}</li>
113     {/foreach}
114     </ul>
115     {/if}
116   </fieldset>
117 </form>
118
119 <h2>Surveiller des non inscrits</h2>
120
121 <p>
122 Si un non-inscrit que tu surveilles s'inscrit, il sera automatiquement ajouté à tes contacts.
123 </p>
124
125 <p>
126 Pour surveiller des membres non-inscrits, il faut passer par la <a href="search" class='popup'>recherche</a>
127 et cliquer sur les icones {icon name=add} pour les ajouter à cette liste.
128 </p>
129
130 <fieldset>
131   <legend>{icon name="status_offline" text="Non inscrit"} Non-inscrits</legend>
132     {if $nonins|@count eq 0}
133     Tu ne surveilles actuellement aucun non-inscrit.
134     {else}
135     Tu surveilles {if $nonins|@count eq 1}le non-inscrit{else}les non-inscrits{/if}&nbsp;:
136     <ul>
137     {foreach from=$nonins item=p}
138     <li>
139       {profile user=$p promo=true sex=true}
140       <a href="carnet/notifs/del_nonins/{$p->login()}?token={xsrf_token}">{icon name='cross' title='retirer'}</a>
141     </li>
142     {/foreach}
143   </ul>
144   {/if}
145 </fieldset>
146
147 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}