20ec3d4b5ab4a3ea4fc74ed67e4b4556363b8563
[platal.git] / templates / xnetevents / subscribe.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2014 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}&nbsp;: Evénement {$event.intitule}</h1>
24
25 <p>
26   [<a href="{$platal->ns}events">Revenir à la liste des événements</a>]
27 </p>
28
29 <p class='descr'>
30   Cet événement a lieu <strong>{$event.date}</strong> et a été proposé par
31   <a href='https://www.polytechnique.org/profile/{$event.organizer->hrpid}' class='popup2'>
32     {$event.organizer->fullName('promo')}
33   </a>.
34 </p>
35
36 <p class='descr'>
37   {$event.descriptif|nl2br}
38 </p>
39
40 {if $is_admin || $event.show_participants}
41 <p class='descr'>
42   Tu peux
43   <a href="{$platal->ns}events/admin/{$eid}">
44     consulter la liste des participants
45     {icon name=group title="Liste des participants"}</a>
46   déjà inscrits.
47 </p>
48 {/if}
49
50 <form action="{$platal->ns}events/sub/{$eid}" method="post">
51   {xsrf_token_field}
52   <table class="tiny" cellspacing="0" cellpadding="0">
53     {foreach from=$moments key=item_id item=m}
54     <tr><th>{$m.titre} ({$m.montant} &euro;)</th></tr>
55     {if $m.details}
56     <tr>
57       <td>
58       {$m.details|nl2br}
59       </td>
60     </tr>
61     {/if}
62     <tr>
63       <td>
64         {if $event.inscr_open}
65           {assign var=nb value=$subs.$item_id.nb}
66           <label><input type="radio" name="moment[{$item_id}]" value="0"
67           {if !$nb}checked="checked"{/if}/>Je ne m'inscris pas</label><br />
68           {if $event.accept_nonmembre}
69               <label><input type="radio" name="moment[{$item_id}]" value="1"
70               {if $nb eq 1}checked="checked"{/if}/>Je m'inscris</label>
71           {else}
72               <label><input type="radio" name="moment[{$item_id}]" value="2" id="avec"
73               {if $nb > 0}checked="checked"{/if}/>J'inscris</label>
74                   <input size="2" name="personnes[{$item_id}]"
75                   value="{if $nb > 1}{$nb}{else}1{/if}"/><label for="avec"> personnes</label>
76           {/if}
77         {else}
78           {if !$nb}
79             Je ne viendrai pas.
80           {else}
81             J'ai inscrit {$nb} personne{if $nb > 1}s{/if}.
82           {/if}
83         {/if}
84       </td>
85     </tr>
86     {/foreach}
87
88     <tr><th>À payer</th></tr>
89     <tr>
90       <td>
91         {if $topay}
92           <div class="error">
93           {if $paid eq 0}
94           Tu dois payer {$topay|replace:'.':','}&nbsp;&euro;.
95           {elseif $paid < $topay}
96           Tu dois encore payer {math equation="a-b" a=$topay b=$paid|replace:'.':','}&nbsp;&euro;
97           (tu as déjà payé {$paid|replace:'.':','}&nbsp;&euro;).
98           {else}
99           Tu as déjà payé {$paid|replace:'.':','}&nbsp;&euro; pour ton inscription.
100           {/if}
101         </div>
102         <div>
103           {if $event.paiement_id &&  $paid < $topay}
104           <a href="{$platal->ns}payment/{$event.paiement_id}?montant={math equation="a-b" a=$topay b=$paid}">
105           {icon name=money} Payer en ligne</a>
106           {elseif $validation && $paid < $topay}
107           <br />Le télépaiement pour cet événement est en instance de validation&nbsp;:<br />
108           <input type="checkbox" name="notify_payment" {if $event.notify_payment}checked="checked"{/if} id="notify" />
109           <label for="notify">être prévenu lorsque le télépaiment pour cet événement sera disponible.</label>
110           {/if}
111         </div>
112         {else}
113         Rien à payer
114         {if $paid > 0}
115         (tu as déjà payé {$paid|replace:'.':','}&nbsp;&euro;).
116         {/if}.
117         {/if}
118       </td>
119     </tr>
120   </table>
121
122   <p style="text-align:center">
123     <input type="submit" name='submit' value="Valider mes inscriptions" />
124   </p>
125 </form>
126
127 {* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}