4d12aed155c26392c9d80ab2127b0db9bec6cdb8
[platal.git] / templates / xnetevents / subscribe.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} : Evénement {$event.intitule}</h1>
24
25 <p>
26   [<a href="{rel}/{$platal->ns}events">Revenir à la liste des événements</a>]
27 </p>
28
29 <p class='descr'>
30   Cet événement a lieu 
31   <strong>
32   {if $event.fin and $event.fin neq $event.debut}
33     {if $event.debut_day eq $event.fin_day}
34       le {$event.debut|date_format:"%d %B %Y"} de {$event.debut|date_format:"%H:%M"} à {$event.fin|date_format:"%H:%M"}
35     {else}
36       du {$event.debut|date_format:"%d %B %Y à %H:%M"}<br />
37       au {$event.fin|date_format:"%d %B %Y à %H:%M"}
38     {/if}
39   {else}
40     le {$event.debut|date_format:"%d %B %Y à %H:%M"}
41   {/if}
42   </strong>
43   et a été proposé par
44   <a href='https://www.polytechnique.org/profile/{$event.alias}' class='popup2'>
45     {$event.prenom} {$event.nom} ({$event.promo})
46   </a>
47 </p>
48
49 <p class='descr'>
50   {$event.descriptif|nl2br}
51 </p>
52
53 {if $admin || $event.show_participants}
54 <p class='descr'>
55   Tu peux 
56   <a href="{rel}/{$platal->ns}events/admin/{$event.eid}">
57     consulster liste des participants
58     <img src="{rel}/images/loupe.gif" title="Liste des participants" alt="Liste des participants" />
59   </a>
60   déjà inscrits.
61 </p>
62 {/if}
63
64 <form action="{rel}/{$platal->ns}events/sub/{$event.eid}" method="post">
65   <table class="tiny" cellspacing="0" cellpadding="0">
66     {foreach from=$event.moments item=m}
67     <tr><th>{$m.titre} ({$m.montant} &euro;)</th></tr>
68     {if $m.details}
69     <tr>
70       <td>
71       {$m.details|nl2br}
72       </td>
73     </tr>
74     {/if}
75     <tr>
76       <td>
77         {if $event.inscr_open}
78           <input type="radio" name="moment[{$m.item_id}]" value="0"
79           {if !$m.nb}checked="checked"{/if}/>non
80           {if $event.noinvite}
81               <input type="radio" name="moment[{$m.item_id}]" value="1"
82               {if $m.nb eq 1}checked="checked"{/if}/>oui
83           {else}
84               <input type="radio" name="moment[{$m.item_id}]" value="1"
85               {if $m.nb eq 1}checked="checked"{/if}/>seul<br />
86               <input type="radio" name="moment[{$m.item_id}]" value="2"
87               {if $m.nb > 1}checked="checked"{/if}/>avec
88                 <input size="2" name="personnes[{$m.item_id}]"
89                   value="{if $m.nb > 1}{math equation='x - 1' x=$m.nb}{else}1{/if}"/> personnes
90           {/if}
91         {else}
92           {if !$m.nb}
93             Je ne viendrai pas.
94           {elseif $m.nb eq 1}
95             Je viendrai{if !$event.noinvite} seul{/if}.
96           {else}
97             Je viendrai avec {$m.nb} personne{if $m.nb > 2}s{/if}
98           {/if}
99         {/if}
100       </td>
101     </tr>
102     {/foreach}
103
104     <tr><th>À payer</th></tr>
105     <tr>
106       <td>
107         {if $event.topay}
108         <span class="error">
109         Tu dois payer {$event.topay|replace:'.':','}&nbsp;&euro;
110         {if $event.paid > 0}
111         (tu as déjà payé {$event.paid|replace:'.':','}&nbsp;&euro;)
112         {/if}.
113         {if $event.paiement_id}
114           [<a href="https://www.polytechnique.org/payment/{$event.paiement_id}?montant={$event.topay}}">
115           Payer en ligne</a>]
116         {/if}
117         </span>
118         {else}
119         Rien à payer
120         {if $event.paid > 0}
121         (tu as déjà payé {$event.paid|replace:'.':','}&nbsp;&euro;)
122         {/if}.
123         {/if}
124       </td>
125     </tr>
126   </table>
127
128   <p style="text-align:center">
129     <input type="submit" name='submit' value="Valider mes inscriptions" />
130   </p>
131 </form>
132
133 {* vim:set et sw=2 sts=2 sws=2: *}