Adds XSRF protection to the Marketing module.
[platal.git] / templates / xnetevents / admin.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
179afa7f 3{* Copyright (C) 2003-2008 Polytechnique.org *}
0337d704 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
77af6562 23<h1>{$asso.nom}&nbsp;: <a href='{$platal->ns}events'>Événements</a> </h1>
0337d704 24
25<p>
40ca91d2
FB
26L'événement {$evt.intitule}
27{if $evt.titre} - {$evt.titre}
28{/if}
bc1dd7a1 29{if $evt.titre || count($moments) eq 1}
40ca91d2
FB
30comptera {$evt.nb_tot} personne{if $evt.nb_tot > 1}s{/if}.
31{else}
77af6562 32({$evt.nb} personne{if $evt.nb > 1}s ont réalisé leur{else} a réalisé son{/if} inscription).
40ca91d2 33{/if}
0337d704 34</p>
35
e7268252 36{if $evt.participant_list && $is_admin}
0337d704 37<p class="center">
a7de4ef7 38[<a href="mailto:?bcc={$evt.short_name}-participants@{#globals.xnet.evts_domain#}">envoyer un mail à ceux qui viennent</a>]
76bbde1c 39-
7d73bb7b 40[<a href="mailto:?bcc={$evt.short_name}-absents@{#globals.xnet.evts_domain#}">envoyer un mail aux membres non inscrits</a>]
0337d704 41</p>
42{/if}
43
5070a22d 44{if count($moments) > 1}
0337d704 45<p class="center">
04d55591
SJ
46[<a href="{$platal->ns}events/admin/{$evt.short_name|default:$evt.eid}"{if
47!$platal->argv[2]}class="erreur"{/if}>Vue générale</a>]
0337d704 48{foreach from=$moments item=m}
f6bdd218 49[<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>]
0337d704 50{/foreach}
51</p>
52{/if}
53
54<p class="center">
e979cd2b 55[<a href="{$platal->pl_self()}" {if !$smarty.request.initiale}class="erreur"{/if}>tout</a>]
0337d704 56{foreach from=$alphabet item=c}
e979cd2b 57[<a href="{$platal->pl_self()}?initiale={$c}"{if $smarty.request.initiale eq $c} class="erreur"{/if}>{$c}</a>]
0337d704 58{/foreach}
59</p>
60
d24c8a11 61{if $is_admin}{literal}
0337d704 62<script type="text/javascript">
63function remplitAuto(mail) {
64 document.getElementById('inscription').mail.value=mail;
8919c4e1 65 var f = document.getElementById('montant');
66 if (f)
67 f.mail.value=mail;
0337d704 68}
69</script>
70{/literal}
71
72{if $oublis}
73<p class="erreur">
e8439508 74Ils ont payé mais ont oublié de s'inscrire&nbsp;:
0337d704 75</p>
76
a7de4ef7 77<table summary="payé mais non inscrits" class="tinybicol">
0337d704 78 <tr>
a7de4ef7 79 <th>Prénom NOM</th>
0337d704 80 <th>Promo</th>
81 <th>Infos</th>
82 <th>Montant</th>
83 </tr>
84 {iterate from=$oubliinscription item=m}
98a7e9dc 85 <tr class="pair">
0337d704 86 <td>
d24c8a11 87 <a href="" {if $is_admin}onclick="return remplitAuto('{$m.email}')"{/if}>
88547449
FB
88 {if !$m.prenom && !$m.nom}
89 {$m.email}
90 {else}
91 {$m.prenom} {$m.nom}
92 {/if}
0337d704 93 </a>
94 </td>
95 <td>{$m.promo}</td>
96 <td>
7ac1ef77 97 <a href="https://www.polytechnique.org/profile/{$m.email}">{icon name=user_suit title="fiche"}</a>
98 <a href="https://www.polytechnique.org/vcard/{$m.email}.vcf">{icon name=vcard title="vcard"}</a>
7d73bb7b 99 <a href="mailto:{$m.email}@{#globals.mail.domain#}">{icon name=email title="mail"}</a>
0337d704 100 </td>
101 <td>{$m.montant}</td>
102 </tr>
103 {/iterate}
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>
40ca91d2 113 {if $is_admin && $evt.paiement_id && $tout}
58591700 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>
0337d704 119 {if $tout}
b479e26b 120 {if $moments}
121 {foreach from=$moments item=m}
58591700 122 <th {$height|smarty:nodefaults}>{$m.titre}</th>
b479e26b 123 {/foreach}
124 {else}
58591700 125 <th {$height|smarty:nodefaults}>Nombre</th>
b479e26b 126 {/if}
d24c8a11 127 {if $is_admin && $evt.money}
58591700 128 <th {$height|smarty:nodefaults}>Montant</th>
129 <th colspan="3">Payé</th>
0337d704 130 {/if}
131 {else}
58591700 132 <th {$height|smarty:nodefaults}>Nombre</th>
0337d704 133 {/if}
134 </tr>
40ca91d2 135 {if $is_admin && $evt.paiement_id && $tout}
58591700 136 <tr>
137 <th>Télépaiement</th>
138 <th>Autre</th>
139 <th>Total</th>
140 </tr>
141 {/if}
0337d704 142 {foreach from=$participants item=m}
ed21e24a 143 <tr>
0337d704 144 <td>
f97a955b 145 {if $is_admin}<a href="javascript:remplitAuto('{$m.email}')">{/if}
88547449 146 {if $m.femme}&bull;{/if}{if !$m.prenom && !$m.nom}{$m.email}{else}{$m.prenom} {$m.nom}{/if}
f97a955b 147 {if $is_admin}</a>{/if}
0337d704 148 </td>
149 <td>{$m.promo}</td>
150 <td>
151 {if $m.x}
7ac1ef77 152 <a href="https://www.polytechnique.org/profile/{$m.email}">{icon name=user_suit title="fiche"}</a>
153 <a href="https://www.polytechnique.org/vcard/{$m.email}.vcf">{icon name=vcard title="vcard"}</a>
7d73bb7b 154 <a href="mailto:{$m.email}@{#globals.mail.domain#}">{icon name=email title="mail"}</a>
0337d704 155 {else}
f7413044 156 <a href="mailto:{$m.email}">{icon name=email title="mail"}</a>
0337d704 157 {/if}
158 </td>
159 {if $tout}
b479e26b 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}
d24c8a11 167 {if $is_admin && $evt.money}
0337d704 168 <td {if $m.montant > $m.paid}class="erreur"{/if}>{$m.montant}&euro;</td>
58591700 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}class="erreur"{/if}>{$m.paid}&euro;</td>
0337d704 174 {/if}
175 {else}
176 <td>
177 {$m.nb}
178 </td>
179 {/if}
180 </tr>
181 {/foreach}
3eaf05e3 182 {if $is_admin && $evt.money && $tout}
e01ebe65
FB
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}
0337d704 194</table>
195
196<p class="descr">
197{foreach from=$links item=ofs key=txt}
e979cd2b 198<a href="{$platal->pl_self()}?offset={$ofs}&amp;initiale={$smarty.request.initiale}"{if $smarty.request.offset eq $ofs} class="erreur"{/if}>{$txt}</a>
0337d704 199{/foreach}
200</p>
201
61664f8b 202{if $absents->total()}
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 {iterate from=$absents item=m}
211 <tr>
212 <td>
adcc7deb 213 {if $is_admin}<a href="javascript:remplitAuto('{$m.email}')">{/if}
61664f8b 214 {if $m.sexe}&bull;{/if}{$m.prenom} {$m.nom}
adcc7deb 215 {if $is_admin}</a>{/if}
61664f8b 216 </td>
217 <td>
218 {$m.promo}
219 </td>
220 </tr>
221 {/iterate}
222</table>
223
224{/if}
225
d24c8a11 226{if $is_admin}
0337d704 227
228<p class="descr">
3eaf05e3
FB
229 <a href="{$platal->ns}events/csv/{$evt.eid}/{$platal->argv[2]}/{$evt.intitule}{if $evt.titre}.{$evt.titre}{/if}.csv">
230 {icon name=page_excel title="Télécharger au format Excel"} Télécharger le fichier Excel
231 </a>
0337d704 232</p>
233
234<hr />
235
236<p class="descr">
a7de4ef7 237En tant qu'administrateur, tu peux fixer la venue (accompagnée ou pas) d'un des membres du groupe.
ed21e24a 238Donne ici son mail, ainsi que le nombre de participants.
0337d704 239</p>
240
e979cd2b 241<form action="{$platal->pl_self()}" method="post" id="inscription">
0337d704 242 <p class="descr">
ed21e24a 243 <input type="hidden" name="adm" value="nbs" />
bd46a8e4 244
77af6562 245 Mail&nbsp;: <input name="mail" size="20" />
ed21e24a 246
247 {if $platal->argv[2]}
77af6562 248 {$evt.titre}&nbsp;: <input name="nb[{$platal->argv[2]}]" size="1" value="1" />
b479e26b 249 {else}
ed21e24a 250 {foreach from=$moments item=m}
77af6562 251 {$m.titre}&nbsp;: <input name="nb[{$m.item_id}]" size="1" value="1"/>
ed21e24a 252 {foreachelse}
77af6562 253 Nombre&nbsp;: <input name="nb[1]" size="1" value="1" />
ed21e24a 254 {/foreach}
b479e26b 255 {/if}
ed21e24a 256 <input type="submit" />
0337d704 257 </p>
258</form>
259
ed21e24a 260{if $evt.money}
261
0337d704 262<hr />
263
264<p class="descr">
a7de4ef7 265En tant qu'administrateur, tu peux entrer un paiement reçu par une autre source que le télépaiement
266du site X.org. Ce montant s'ajoutera aux montants déjà entrés. Si tu as fait une erreur, tu peux
267entrer un montant négatif.
0337d704 268</p>
269
270<p class="descr">
77af6562 271Note que tu peux cliquer sur les noms des membres pour remplir automatiquement la case ci-dessous.
0337d704 272</p>
273
e979cd2b 274<form action="{$platal->pl_self()}" method="post" id="montant">
0337d704 275 <p class="descr">
0337d704 276 <input type="hidden" name="adm" value="prix" />
77af6562
SJ
277 Mail&nbsp;: <input name="mail" size="20" />
278 montant&nbsp;: <input name="montant" size="3" value="0,00" /> &euro;
0337d704 279 <input type="submit" />
280 </p>
281</form>
282{/if}
283
ed21e24a 284{/if}
285
a7de4ef7 286{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}