Merge remote-tracking branch 'origin/xorg/maint' into xorg/master
[platal.git] / templates / xnetevents / admin.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2013 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 <h1>{$asso->nom}&nbsp;: <a href='{$platal->ns}events'>Événements</a> </h1>
24
25 {if $tout}
26 <p>
27   {$evt.nb_tot} personne{if $evt.nb_tot > 1}s ont réalisé leur {else} a réalisé son {/if}
28   inscription à l'événement {$evt.intitule} {if $evt.titre}- {$evt.titre} {/if}
29   qui aura lieu {$evt.date}.
30 </p>
31 {else}
32 <p>
33   {$evt.nb_tot} personne{if $evt.nb_tot > 1}s participeront {else} participera {/if}
34   à {$evt.intitule} - {$evt.titre}
35 </p>
36 {/if}
37
38 {if $evt.short_name && $participants|@count && $is_admin}
39 <p class="center">
40   [<a href="mailto:?bcc={$evt.short_name}-participants@{#globals.xnet.evts_domain#}">envoyer un email à ceux qui viennent</a>]
41   <br />
42   [<a href="mailto:?bcc={$evt.short_name}-absents@{#globals.xnet.evts_domain#}">envoyer un email aux membres du groupe n'ayant pas répondu</a>]
43   <br />
44   [<a href="mailto:?bcc={$evt.short_name}-paye@{#globals.xnet.evts_domain#}">envoyer un email aux personnes ayant payé</a>]
45   <br />
46   [<a href="mailto:?bcc={$evt.short_name}-participants-non-paye@{#globals.xnet.evts_domain#}">envoyer un email aux inscrits n'ayant pas encore payé</a>]
47 </p>
48 {/if}
49
50 {if count($moments) > 1}
51 <p class="center">
52 [<a href="{$platal->ns}events/admin/{$evt.short_name|default:$evt.eid}"{if
53 !$platal->argv[2]}class="erreur"{/if}>Vue générale</a>]
54 {foreach from=$moments item=m}
55 [<a href="{$platal->ns}events/admin/{$evt.short_name|default:$evt.eid}/{$m.item_id}" {if $platal->argv[2] eq $m.item_id}class="erreur"{/if}>{$m.titre}</a>]
56 {/foreach}
57 </p>
58 {/if}
59
60 <p class="center">
61 [<a href="{$platal->pl_self()}" {if !$smarty.request.initiale}class="erreur"{/if}>tout</a>]
62 {foreach from=$alphabet item=c}
63 [<a href="{$platal->pl_self()}?initiale={$c}"{if $smarty.request.initiale eq $c} class="erreur"{/if}>{$c}</a>]
64 {/foreach}
65 </p>
66
67 {if $is_admin}{literal}
68 <script type="text/javascript">
69 function remplitAuto(mail) {
70   document.getElementById('inscription').mail.value=mail;
71   var f = document.getElementById('montant');
72   if (f)
73       f.mail.value=mail;
74 }
75 </script>
76 {/literal}
77
78 {if $oublis}
79 <p class="erreur">
80 Ils ont payé mais ont oublié de s'inscrire&nbsp;:
81 </p>
82
83 <table summary="payé mais non inscrits" class="tinybicol">
84   <tr>
85     <th>Prénom NOM</th>
86     <th>Promo</th>
87     <th>Infos</th>
88     <th>Montant</th>
89   </tr>
90   {foreach from=$oubliinscription item=m}
91   <tr class="pair">
92     <td>
93       {if $is_admin}<a href="javascript:remplitAuto('{$m.user->login()}')">{/if}
94         {profile user=$m.user link=false}
95       {if $is_admin}</a>{/if}
96     </td>
97     <td>{$m.user->promo()}</td>
98     <td>
99       <a href="https://www.polytechnique.org/profile/{$m.user->login()}">{icon name=user_suit title="fiche"}</a>
100       <a href="https://www.polytechnique.org/vcard/{$m.user->login()}.vcf">{icon name=vcard title="vcard"}</a>
101       <a href="mailto:{$m.user->bestEmail()}">{icon name=email title="email"}</a>
102     </td>
103     <td>{$m.amount|replace:'.':','} &euro;</td>
104   </tr>
105   {/foreach}
106 </table>
107
108 <hr />
109 {/if}
110
111 {/if}
112
113 <table summary="participants a l'evenement" class="{if $tout}large{else}tiny{/if}">
114   <tr>
115     {if $is_admin && $evt.paiement_id && $tout}
116       {assign var=height value='rowspan="2"'}
117     {/if}
118     <th {$height|smarty:nodefaults}>Prénom NOM</th>
119     <th {$height|smarty:nodefaults}>Promo</th>
120     <th {$height|smarty:nodefaults}>Info</th>
121     {if $tout}
122       {if $moments}
123         {foreach from=$moments item=m}
124           <th {$height|smarty:nodefaults}>{$m.titre}</th>
125         {/foreach}
126       {else}
127         <th {$height|smarty:nodefaults}>Nombre</th>
128       {/if}
129       {if $is_admin && $evt.money}
130         <th {$height|smarty:nodefaults}>Montant</th>
131         <th colspan="3">Payé</th>
132       {/if}
133     {else}
134     <th {$height|smarty:nodefaults}>Nombre</th>
135     {/if}
136   </tr>
137   {if $is_admin && $evt.paiement_id && $tout}
138   <tr>
139     <th>Télépaiement</th>
140     <th>Autre</th>
141     <th>Total</th>
142   </tr>
143   {/if}
144   {foreach from=$participants item=m}
145   <tr>
146     <td>
147       {if $is_admin}<a href="javascript:remplitAuto('{$m.user->login()}')">{/if}
148         {profile user=$m.user promo=false link=false}
149       {if $is_admin}</a>{/if}
150     </td>
151     <td>{$m.user->promo()}</td>
152     <td>
153       {if $m.user->hasProfile()}
154       <a href="https://www.polytechnique.org/profile/{$m.user->login()}">{icon name=user_suit title="fiche"}</a>
155       <a href="https://www.polytechnique.org/vcard/{$m.user->login()}.vcf">{icon name=vcard title="vcard"}</a>
156       <a href="mailto:{$m.user->bestEmail()}">{icon name=email title="email"}</a>
157       {else}
158       <a href="mailto:{$m.user->bestEmail()}">{icon name=email title="email"}</a>
159       {/if}
160     </td>
161     {if $tout}
162       {if $moments}
163         {foreach from=$moments item=i}
164           <td>{$m[$i.item_id]}</td>
165         {/foreach}
166       {else}
167         <td>{$m[1]}</td>
168       {/if}
169       {if $is_admin && $evt.money}
170         <td {if $m.montant > $m.paid}class="erreur"{/if}>{$m.montant}&euro;</td>
171         {if $evt.paiement_id}
172           <td>{$m.telepayment|default:0}&euro;</td>
173           <td>{$m.adminpaid|default:0}&euro;</td>
174         {/if}
175         <td{if $m.montant < $m.paid} style="color: maroon"{/if}>{$m.paid}&euro;</td>
176       {/if}
177     {else}
178     <td>
179       {$m.nb}
180     </td>
181     {/if}
182   </tr>
183   {/foreach}
184   {if $is_admin && $evt.money && $tout}
185   <tr>
186     {assign var=cols value=$moments|@count}
187     <td colspan="{$cols+3}" class="right"><strong>Total</strong></td>
188     <td>{$evt.topay}&euro;</td>
189     {if $evt.paiement_id}
190     <td>{$evt.telepaid|default:0}&euro;</td>
191     <td>{$evt.adminpaid|default:0}&euro;</td>
192     {/if}
193     <td>{$evt.paid}&euro;</td>
194   </tr>
195   {/if}
196 </table>
197
198 <p class="descr">
199 {foreach from=$links item=ofs key=txt}
200 <a href="{$platal->pl_self()}?offset={$ofs}&amp;initiale={$smarty.request.initiale}"{if $smarty.request.offset eq $ofs} class="erreur"{/if}>{$txt}</a>
201 {/foreach}
202 </p>
203
204 {if $absents|@count}
205
206 <hr />
207
208 <p>Les personnes suivantes ont indiqué qu'elles ne viendraient pas à l'événement&nbsp;:</p>
209
210 <table class="tinybicol">
211   <tr><th>Prénom NOM</th><th>Origine</th></tr>
212   {foreach from=$absents item=m}
213   <tr>
214     <td>
215       {if $is_admin}<a href="javascript:remplitAuto('{$m->login()}')">{/if}
216       {profile user=$m link=false promo=false}
217       {if $is_admin}</a>{/if}
218     </td>
219     <td>
220       {$m->promo()}
221     </td>
222   </tr>
223   {/foreach}
224 </table>
225
226 {/if}
227
228 {if $is_admin}
229
230 <p class="descr">
231   {include file="include/csv.tpl" url="`$platal->ns`events/csv/`$evt.eid`/`$platal->argv[2]`/`$evt.csv_name`.csv"}
232 </p>
233
234 <hr />
235
236 <p class="descr">
237 En tant qu'administrateur, tu peux fixer la venue (accompagnée ou pas) d'un des membres du groupe.
238 Donne ici son email, ainsi que le nombre de participants.
239 </p>
240
241 <form action="{$platal->pl_self()}" method="post" id="inscription">
242   {xsrf_token_field}
243   <p class="descr">
244     <input type="hidden" name="adm" value="nbs" />
245
246     Email&nbsp;: <input name="mail" size="20" />
247
248     {if $platal->argv[2]}
249     {$evt.titre}&nbsp;: <input name="nb[{$platal->argv[2]}]" size="1" value="1" />
250     {else}
251     {foreach from=$moments item=m}
252     {$m.titre}&nbsp;: <input name="nb[{$m.item_id}]" size="1" value="1"/>
253     {foreachelse}
254     Nombre&nbsp;: <input name="nb[1]" size="1" value="1" />
255     {/foreach}
256     {/if}
257     <input type="submit" />
258   </p>
259   <p class="descr">
260     Tu peux aussi enlever toute trace de son inscription ou de sa décision de ne pas s'insscrire (s'il n'a rien payé).
261     <div class="center">
262       <input type="submit" name="cancel" value="Annuler l'inscription" />
263     </div>
264   </p>
265 </form>
266
267 {if $evt.money}
268
269 <hr />
270
271 <p class="descr">
272 En tant qu'administrateur, tu peux entrer un paiement reçu par une autre source que le télépaiement
273 du site X.org. Ce montant s'ajoutera aux montants déjà entrés. Si tu as fait une erreur, tu peux
274 entrer un montant négatif.
275 </p>
276
277 <p class="descr">
278 Note que tu peux cliquer sur les noms des membres pour remplir automatiquement la case ci-dessous.
279 </p>
280
281 <form action="{$platal->pl_self()}" method="post" id="montant">
282   {xsrf_token_field}
283   <p class="descr">
284   <input type="hidden" name="adm" value="prix" />
285   Email&nbsp;: <input name="mail" size="20" />
286   montant&nbsp;: <input name="montant" size="3" value="0,00" /> &euro;
287   <input type="submit" />
288   </p>
289 </form>
290 {/if}
291
292 {/if}
293
294 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}