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