amelioration du lien paiement / evenements + choix pour la synchro ax dans le profil
[platal.git] / templates / xnet / groupe / evt-detail.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2004 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 {if $smarty.request.ins && !$no_ins}
24   {if $participate}
25     Tu es maintenant inscrit à l'évenement.
26     {if $evt.paiement_id} Suis le lien en bas si tu souhaites procéder à un paiement par le web.{/if}
27   {else}
28     Tu es maintenant désinscrit de cet évenement.
29   {/if}
30 {/if}
31
32 <h1>{$asso.nom} : <a href="{$smarty.server.PHP_SELF}">Evénements</a></h1>
33
34 <h2>{$evt.intitule}</h2>
35
36 <form method='post' action='{$smarty.server.REQUEST_URI}'>
37   <table class="tiny" cellspacing="0" cellpadding="0">
38     <tr>
39       <td class="titre">Annoncé par</td>
40       <td>{$evt.prenom} {$evt.nom} (X{$evt.promo})</td>
41     </tr>
42     <tr>
43       <td class="titre">Description</td>
44       <td>{$evt.descriptif}</td>
45     </tr>
46     <tr>
47       <td class="titre">Date</td>
48       <td>
49         {if $evt.fin}
50         du {$evt.deb|date_format:"%d %B %Y à %H:%M"}<br />
51         au {$evt.fin|date_format:"%d %B %Y à %H:%M"}
52         {else}
53         le {$evt.deb|date_format:"%d %B %Y à %H:%M"}
54         {/if}
55       </td>
56     </tr>
57   </table>
58
59   <div><br /><br /></div>
60
61   {assign var="montant" value=0}
62
63   <table class="bicol" cellpadding="0" cellspacing="0">
64     {iterate from=$moments item=m}
65     {assign var="montant" value=$montant+$m.montant*$m.nb}
66     {if $m.titre || $m.montant}
67     <tr>
68       <th>
69         <input type="hidden" name="item_id{counter}" value="{$m.item_id}" />
70         <input type="hidden" name="eid" value="{$evt.eid}" />
71         <strong>{$m.titre} - {if $m.montant > 0}{$m.montant}&euro;{else}gratuit{/if}</strong>
72       </th>
73     </tr>
74     {/if}
75     <tr>
76       <td>{$m.details}</td>
77     </tr>
78     <tr>
79       <td>
80         <input name='item_{$m.item_id}' value='0' type='radio' {if $m.nb eq 0}checked="checked"{/if} /> je ne participe pas<br />
81         <input name='item_{$m.item_id}' value='1' type='radio' {if $m.nb eq 1}checked="checked"{/if} /> je participe, seul<br />
82         <input name='item_{$m.item_id}' value='+' type='radio' {if $m.nb > 1}checked{/if} /> je viens, et serai accompagné de
83           <input type='text' name='itemnb_{$m.item_id}' value='{if $m.nb < 2}0{else}{$m.nb-1}{/if}' size="2" maxlength="2" /> personnes
84       </td>
85     </tr>
86     {/iterate}
87   </table>
88   
89   {if $montant > 0 || $paid > 0}
90   <p {if $montant > $paid}class="erreur"{/if}>
91   Pour cet événement tu dois payer {$montant|replace:'.':','}&nbsp;&euro; {if $paid > 0}, et tu as déjà payé {$paid|replace:'.':','}&nbsp;&euro;{/if}
92   {if $evt.paiement_id && $montant > $paid} [<a href="https://www.polytechnique.org/paiement/?ref={$evt.paiement_id}&montant={math equation="x - y" x=$montant y=$paid}">Effectuer le paiement</a>]{/if}
93   </p>
94   {/if}
95   <div class="center">
96     <input type='submit' name='ins' value='valider ma participation' />
97     <input type='reset' value='annuler' />
98   </div>
99 </form>
100
101 {* vim:set et sw=2 sts=2 sws=2: *}