Fix organizer display for events created by xnet accounts.
[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   {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 $is_admin || $event.show_participants}
42 <p class='descr'>
43   Tu peux
44   <a href="{$platal->ns}events/admin/{$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/{$eid}" method="post">
52   {xsrf_token_field}
53   <table class="tiny" cellspacing="0" cellpadding="0">
54     {foreach from=$moments key=item_id 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           {assign var=nb value=$subs.$item_id.nb}
67           <label><input type="radio" name="moment[{$item_id}]" value="0"
68           {if !$nb}checked="checked"{/if}/>Je ne m'inscris pas</label><br />
69           {if $event.accept_nonmembre}
70               <label><input type="radio" name="moment[{$item_id}]" value="1"
71               {if $nb eq 1}checked="checked"{/if}/>Je m'inscris</label>
72           {else}
73               <label><input type="radio" name="moment[{$item_id}]" value="2" id="avec"
74               {if $nb > 0}checked="checked"{/if}/>J'inscris</label>
75                   <input size="2" name="personnes[{$item_id}]"
76                   value="{if $nb > 1}{$nb}{else}1{/if}"/><label for="avec"> personnes</label>
77           {/if}
78         {else}
79           {if !$nb}
80             Je ne viendrai pas.
81           {else}
82             J'ai inscrit {$nb} personne{if $nb > 1}s{/if}.
83           {/if}
84         {/if}
85       </td>
86     </tr>
87     {/foreach}
88
89     <tr><th>À payer</th></tr>
90     <tr>
91       <td>
92         {if $topay}
93           <div class="error">
94           {if $paid eq 0}
95           Tu dois payer {$topay|replace:'.':','}&nbsp;&euro;.
96           {elseif $paid < $topay}
97           Tu dois encore payer {math equation="a-b" a=$topay b=$paid|replace:'.':','}&nbsp;&euro;
98           (tu as déjà payé {$paid|replace:'.':','}&nbsp;&euro;).
99           {else}
100           Tu as déjà payé {$paid|replace:'.':','}&nbsp;&euro; pour ton inscription.
101           {/if}
102         </div>
103         <div>
104           {if $event.paiement_id &&  $paid < $topay}
105           <a href="{$platal->ns}payment/{$event.paiement_id}?montant={math equation="a-b" a=$topay b=$paid}">
106           {icon name=money} Payer en ligne</a>
107           {elseif $validation && $paid < $topay}
108           <br />Le télépaiement pour cet événement est en instance de validation&nbsp;:<br />
109           <input type="checkbox" name="notify_payment" {if $event.notify_payment}checked="checked"{/if} id="notify" />
110           <label for="notify">être prévenu lorsque le télépaiment pour cet événement sera disponible.</label>
111           {/if}
112         </div>
113         {else}
114         Rien à payer
115         {if $paid > 0}
116         (tu as déjà payé {$paid|replace:'.':','}&nbsp;&euro;).
117         {/if}.
118         {/if}
119       </td>
120     </tr>
121   </table>
122
123   <p style="text-align:center">
124     <input type="submit" name='submit' value="Valider mes inscriptions" />
125   </p>
126 </form>
127
128 {* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}