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