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