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