Merge commit 'origin/master' into account
[platal.git] / templates / xnetevents / admin.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
9f5bd98e 3{* Copyright (C) 2003-2010 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
34ade5a6 23<h1>{$asso->nom}&nbsp;: <a href='{$platal->ns}events'>Événements</a> </h1>
0337d704 24
25<p>
20c5c7e6
SJ
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}.
0337d704 33</p>
34
e7268252 35{if $evt.participant_list && $is_admin}
0337d704 36<p class="center">
9ff5b337
SJ
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 <br />
41 [<a href="mailto:?bcc={$evt.short_name}-paye@{#globals.xnet.evts_domain#}">envoyer un email aux personnes ayant payé</a>]
42 <br />
43 [<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>]
0337d704 44</p>
45{/if}
46
5070a22d 47{if count($moments) > 1}
0337d704 48<p class="center">
04d55591
SJ
49[<a href="{$platal->ns}events/admin/{$evt.short_name|default:$evt.eid}"{if
50!$platal->argv[2]}class="erreur"{/if}>Vue générale</a>]
0337d704 51{foreach from=$moments item=m}
f6bdd218 52[<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 53{/foreach}
54</p>
55{/if}
56
57<p class="center">
e979cd2b 58[<a href="{$platal->pl_self()}" {if !$smarty.request.initiale}class="erreur"{/if}>tout</a>]
0337d704 59{foreach from=$alphabet item=c}
e979cd2b 60[<a href="{$platal->pl_self()}?initiale={$c}"{if $smarty.request.initiale eq $c} class="erreur"{/if}>{$c}</a>]
0337d704 61{/foreach}
62</p>
63
d24c8a11 64{if $is_admin}{literal}
0337d704 65<script type="text/javascript">
66function remplitAuto(mail) {
67 document.getElementById('inscription').mail.value=mail;
8919c4e1 68 var f = document.getElementById('montant');
69 if (f)
70 f.mail.value=mail;
0337d704 71}
72</script>
73{/literal}
74
75{if $oublis}
76<p class="erreur">
e8439508 77Ils ont payé mais ont oublié de s'inscrire&nbsp;:
0337d704 78</p>
79
a7de4ef7 80<table summary="payé mais non inscrits" class="tinybicol">
0337d704 81 <tr>
a7de4ef7 82 <th>Prénom NOM</th>
0337d704 83 <th>Promo</th>
84 <th>Infos</th>
85 <th>Montant</th>
86 </tr>
87 {iterate from=$oubliinscription item=m}
98a7e9dc 88 <tr class="pair">
0337d704 89 <td>
e46cf8c4 90 {if $is_admin}<a href="javascript:remplitAuto('{$m.user->login()}')">{/if}
07eb5b0e 91 {profile user=$m.user link=false}
ad40e162 92 {if $is_admin}</a>{/if}
0337d704 93 </td>
07eb5b0e 94 <td>{$m.user->promo()}</td>
0337d704 95 <td>
07eb5b0e
FB
96 <a href="https://www.polytechnique.org/profile/{$m.user->login()}">{icon name=user_suit title="fiche"}</a>
97 <a href="https://www.polytechnique.org/vcard/{$m.user->login()}.vcf">{icon name=vcard title="vcard"}</a>
98 <a href="mailto:{$m.user->bestEmail()}">{icon name=email title="email"}</a>
0337d704 99 </td>
100 <td>{$m.montant}</td>
101 </tr>
102 {/iterate}
103</table>
104
105<hr />
106{/if}
107
108{/if}
109
110<table summary="participants a l'evenement" class="{if $tout}large{else}tiny{/if}">
111 <tr>
40ca91d2 112 {if $is_admin && $evt.paiement_id && $tout}
58591700 113 {assign var=height value='rowspan="2"'}
114 {/if}
115 <th {$height|smarty:nodefaults}>Prénom NOM</th>
116 <th {$height|smarty:nodefaults}>Promo</th>
117 <th {$height|smarty:nodefaults}>Info</th>
0337d704 118 {if $tout}
b479e26b 119 {if $moments}
120 {foreach from=$moments item=m}
58591700 121 <th {$height|smarty:nodefaults}>{$m.titre}</th>
b479e26b 122 {/foreach}
123 {else}
58591700 124 <th {$height|smarty:nodefaults}>Nombre</th>
b479e26b 125 {/if}
d24c8a11 126 {if $is_admin && $evt.money}
58591700 127 <th {$height|smarty:nodefaults}>Montant</th>
128 <th colspan="3">Payé</th>
0337d704 129 {/if}
130 {else}
58591700 131 <th {$height|smarty:nodefaults}>Nombre</th>
0337d704 132 {/if}
133 </tr>
40ca91d2 134 {if $is_admin && $evt.paiement_id && $tout}
58591700 135 <tr>
136 <th>Télépaiement</th>
137 <th>Autre</th>
138 <th>Total</th>
139 </tr>
140 {/if}
0337d704 141 {foreach from=$participants item=m}
ed21e24a 142 <tr>
0337d704 143 <td>
07eb5b0e
FB
144 {if $is_admin}<a href="javascript:remplitAuto('{$m.user->login()}')">{/if}
145 {profile user=$m.user promo=false link=false}
f97a955b 146 {if $is_admin}</a>{/if}
0337d704 147 </td>
07eb5b0e 148 <td>{$m.user->promo()}</td>
0337d704 149 <td>
07eb5b0e
FB
150 {if $m.user->hasProfile()}
151 <a href="https://www.polytechnique.org/profile/{$m.user->login()}">{icon name=user_suit title="fiche"}</a>
152 <a href="https://www.polytechnique.org/vcard/{$m.user->login()}.vcf">{icon name=vcard title="vcard"}</a>
153 <a href="mailto:{$m.user->bestEmail()}">{icon name=email title="email"}</a>
0337d704 154 {else}
07eb5b0e 155 <a href="mailto:{$m.user->bestEmail()}">{icon name=email title="email"}</a>
0337d704 156 {/if}
157 </td>
158 {if $tout}
b479e26b 159 {if $moments}
160 {foreach from=$moments item=i}
161 <td>{$m[$i.item_id]}</td>
162 {/foreach}
163 {else}
164 <td>{$m[1]}</td>
165 {/if}
d24c8a11 166 {if $is_admin && $evt.money}
0337d704 167 <td {if $m.montant > $m.paid}class="erreur"{/if}>{$m.montant}&euro;</td>
58591700 168 {if $evt.paiement_id}
169 <td>{$m.telepayment|default:0}&euro;</td>
170 <td>{$m.adminpaid|default:0}&euro;</td>
171 {/if}
43863a7f 172 <td{if $m.montant < $m.paid} style="color: maroon"{/if}>{$m.paid}&euro;</td>
0337d704 173 {/if}
174 {else}
175 <td>
176 {$m.nb}
177 </td>
178 {/if}
179 </tr>
180 {/foreach}
3eaf05e3 181 {if $is_admin && $evt.money && $tout}
e01ebe65
FB
182 <tr>
183 {assign var=cols value=$moments|@count}
184 <td colspan="{$cols+3}" class="right"><strong>Total</strong></td>
185 <td>{$evt.topay}&euro;</td>
186 {if $evt.paiement_id}
187 <td>{$evt.telepaid|default:0}&euro;</td>
188 <td>{$evt.adminpaid|default:0}&euro;</td>
189 {/if}
190 <td>{$evt.paid}&euro;</td>
191 </tr>
192 {/if}
0337d704 193</table>
194
195<p class="descr">
196{foreach from=$links item=ofs key=txt}
e979cd2b 197<a href="{$platal->pl_self()}?offset={$ofs}&amp;initiale={$smarty.request.initiale}"{if $smarty.request.offset eq $ofs} class="erreur"{/if}>{$txt}</a>
0337d704 198{/foreach}
199</p>
200
07eb5b0e 201{if $absents|@count}
61664f8b 202
203<hr />
204
205<p>Les personnes suivantes ont indiqué qu'elles ne viendraient pas à l'événement&nbsp;:</p>
206
207<table class="tinybicol">
208 <tr><th>Prénom NOM</th><th>Origine</th></tr>
07eb5b0e 209 {foreach from=$absents item=m}
61664f8b 210 <tr>
211 <td>
07eb5b0e
FB
212 {if $is_admin}<a href="javascript:remplitAuto('{$m->login()}')">{/if}
213 {profile user=$m link=false promo=false}
adcc7deb 214 {if $is_admin}</a>{/if}
61664f8b 215 </td>
216 <td>
07eb5b0e 217 {$m->promo()}
61664f8b 218 </td>
219 </tr>
07eb5b0e 220 {/foreach}
61664f8b 221</table>
222
223{/if}
224
d24c8a11 225{if $is_admin}
0337d704 226
227<p class="descr">
3eaf05e3
FB
228 <a href="{$platal->ns}events/csv/{$evt.eid}/{$platal->argv[2]}/{$evt.intitule}{if $evt.titre}.{$evt.titre}{/if}.csv">
229 {icon name=page_excel title="Télécharger au format Excel"} Télécharger le fichier Excel
230 </a>
0337d704 231</p>
232
233<hr />
234
235<p class="descr">
a7de4ef7 236En tant qu'administrateur, tu peux fixer la venue (accompagnée ou pas) d'un des membres du groupe.
faefdbb7 237Donne ici son email, ainsi que le nombre de participants.
0337d704 238</p>
239
e979cd2b 240<form action="{$platal->pl_self()}" method="post" id="inscription">
4fcbb455 241 {xsrf_token_field}
0337d704 242 <p class="descr">
ed21e24a 243 <input type="hidden" name="adm" value="nbs" />
bd46a8e4 244
faefdbb7 245 Email&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">
4fcbb455 275 {xsrf_token_field}
0337d704 276 <p class="descr">
0337d704 277 <input type="hidden" name="adm" value="prix" />
faefdbb7 278 Email&nbsp;: <input name="mail" size="20" />
77af6562 279 montant&nbsp;: <input name="montant" size="3" value="0,00" /> &euro;
0337d704 280 <input type="submit" />
281 </p>
282</form>
283{/if}
284
ed21e24a 285{/if}
286
a7de4ef7 287{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}