clean admin code.
[platal.git] / templates / xnetevents / admin.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2006 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='{rel}/{$platal->ns}events'>Evénements</a> </h1>
24
25 <p>
26 L'événement {$evt.intitule} {if $evt.titre} - {$evt.titre}{/if} comptera
27 {$evt.nb_tot} personne{if $evt.nb_tot > 1}s{/if}.
28 </p>
29
30 {if $evt.participant_list}
31 <p class="center">
32 [<a href="mailto:?bcc={$evt.short_name}-participants@evts.polytechnique.org">envoyer un mail à ceux qui viennent</a>]
33 -
34 [<a href="mailto:?bcc={$evt.short_name}-absents@evts.polytechnique.org">envoyer un mail aux membres non inscrits</a>]
35 </p>
36 {/if}
37
38 {if $moments}
39 <p class="center">
40 [<a href="{rel}/{$platal->ns}events/admin/{$evt.eid}"{if !$platal->argv[2]}class="erreur"{/if}>tout</a>]
41 {foreach from=$moments item=m}
42 [<a href="{rel}/{$platal->ns}events/admin/{$evt.eid}/{$m.item_id}" {if $platal->argv[2] eq $m.item_id}class="erreur"{/if}>{$m.titre}</a>]
43 {/foreach}
44 </p>
45 {/if}
46
47 <p class="center">
48 [<a href="{rel}/{$platal->path}" {if !$smarty.request.initiale}class="erreur"{/if}>tout</a>]
49 {foreach from=$alphabet item=c}
50 [<a href="{rel}/{$platal->path}?initiale={$c}"{if $smarty.request.initiale eq $c} class="erreur"{/if}>{$c}</a>]
51 {/foreach}
52 </p>
53
54 {if $admin}{literal}
55 <script type="text/javascript">
56 function remplitAuto(mail) {
57   document.getElementById('inscription').mail.value=mail;
58   document.getElementById('montant').mail.value=mail;
59   return false;
60 }
61 </script>
62 {/literal}
63
64 {if $oublis}
65 <p class="erreur">
66 Ils ont payé mais ont oublié de s'inscrire :
67 </p>
68
69 <table summary="payé mais non inscrits" class="tiny">
70   <tr>
71     <th>Prénom NOM</th>
72     <th>Promo</th>
73     <th>Infos</th>
74     <th>Montant</th>
75   </tr>
76   {iterate from=$oubliinscription item=m}
77   <tr style="background:#d0c198;">
78     <td>
79       <a href="" {if $admin}onclick="return remplitAuto('{$m.email}')"{/if}>
80       {$m.prenom} {$m.nom}
81       </a>
82     </td>
83     <td>{$m.promo}</td>
84     <td>
85       <a href="https://www.polytechnique.org/profile/{$m.email}"><img src="{rel}/images/loupe.gif" alt="[fiche]" /></a>
86       <a href="https://www.polytechnique.org/vcard/{$m.email}.vcf"><img src="{rel}/images/vcard.png" alt="[vcard]" /></a>
87       <a href="mailto:{$m.email}@polytechnique.org"><img src="{rel}/images/mail.png" alt="mail" /></a>
88     </td>
89     <td>{$m.montant}</td>
90   </tr>
91   {/iterate}
92 </table>
93
94 <hr />
95 {/if}
96
97 {/if}
98
99 <table summary="participants a l'evenement" class="{if $tout}large{else}tiny{/if}">
100   <tr>
101     <th>Prénom NOM</th>
102     <th>Promo</th>
103     <th>Info</th>
104     {if $tout}
105       {if $moments}
106         {foreach from=$moments item=m}
107           <th>{$m.titre}</th>
108         {/foreach}
109       {else}
110         <th>Nombre</th>
111       {/if}
112       {if $admin && $evt.money}
113         <th>Montant</th>
114         <th>Payé</th>
115       {/if}
116     {else}
117     <th>Nombre</th>
118     {/if}
119   </tr>
120   {foreach from=$participants item=m}
121   <tr>
122     <td>
123       <a href="" {if $admin}onclick="return remplitAuto('{$m.email}')"{/if}>
124         {if $m.femme}&bull;{/if}{$m.prenom} {$m.nom}
125       </a>
126     </td>
127     <td>{$m.promo}</td>
128     <td>
129       {if $m.x}
130       <a href="https://www.polytechnique.org/profile/{$m.email}"><img src="{rel}/images/loupe.gif" alt="[fiche]" /></a>
131       <a href="https://www.polytechnique.org/vcard/{$m.email}.vcf"><img src="{rel}/images/vcard.png" alt="[vcard]" /></a>
132       <a href="mailto:{$m.email}@polytechnique.org"><img src="{rel}/images/mail.png" alt="mail" /></a>
133       {else}
134       <a href="mailto:{$m.email}"><img src="{rel}/images/mail.png" alt="mail"></a>
135       {/if}
136     </td>
137     {if $tout}
138       {if $moments}
139         {foreach from=$moments item=i}
140           <td>{$m[$i.item_id]}</td>
141         {/foreach}
142       {else}
143         <td>{$m[1]}</td>
144       {/if}
145       {if $admin && $evt.money}
146         <td {if $m.montant > $m.paid}class="erreur"{/if}>{$m.montant}&euro;</td>
147         <td>{$m.paid}&euro;</td>
148       {/if}
149     {else}
150     <td>
151       {$m.nb}
152     </td>
153     {/if}
154   </tr>
155   {/foreach}
156 </table>
157
158 <p class="descr">
159 {foreach from=$links item=ofs key=txt}
160 <a href="{rel}/{$platal->path}?offset={$ofs}&amp;initiale={$smarty.request.initiale}"{if $smarty.request.offset eq $ofs} class="erreur"{/if}>{$txt}</a>
161 {/foreach}
162 </p>
163
164 {if $admin}
165
166 <p class="descr">
167 [<a href="{rel}/{$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>]
168 </p>
169
170 <hr />
171
172 <p class="descr">
173 En tant qu'administrateur, tu peux fixer la venue (accompagnée ou pas) d'un des membres du groupe.
174 Donne ici son mail, ainsi que le nombre de participants.
175 </p>
176
177 <form action="{rel}/{$platal->path}" method="post" id="inscription">
178   <p class="descr">
179     <input type="hidden" name="adm" value="nbs" />
180
181     Mail: <input name="mail" size="20" />
182
183     {if $platal->argv[2]}
184     {$evt.titre}: <input name="nb[{$platal->argv[2]}]" size="1" value="1" />
185     {else}
186     {foreach from=$moments item=m}
187     {$m.titre}: <input name="nb[{$m.item_id}]" size="1" value="1"/>
188     {foreachelse}
189     Nombre: <input name="nb[1]" size="1" value="1" />
190     {/foreach}
191     {/if}
192     <input type="submit" />
193   </p>
194 </form>
195
196 {if $evt.money}
197
198 <hr />
199
200 <p class="descr">
201 En tant qu'administrateur, tu peux entrer un paiement reçu par une autre source que le télépaiement
202 du site X.org. Ce montant s'ajoutera aux montants déjà entrés. Si tu as fait une erreur, tu peux
203 entrer un montant négatif.
204 </p>
205
206 <p class="descr">
207 Note que tu peux cliquer sur les noms des membres pour remplir automatiquement la case ci-dessous
208 </p>
209
210 <form action="{rel}/{$platal->path}" method="post" id="montant">
211   <p class="descr">
212   <input type="hidden" name="adm" value="prix" />
213   Mail: <input name="mail" size="20" />
214   montant: <input name="montant" size="3" value="0,00" /> &euro;
215   <input type="submit" />
216   </p>
217 </form>
218 {/if}
219
220 {/if}
221
222 {* vim:set et sw=2 sts=2 sws=2: *}