Rewrites xnetevents index page.
[platal.git] / templates / xnetevents / index.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 {if $is_admin}
24 <table class='warnings'>
25   <tr>
26     <td class='center'>Choisis l'ordre d'affichage des événements pour ton groupe :</td>
27     <td class='center'>
28       <form method="post" action="{$platal->ns}events">
29         <select name="order" onchange="this.form.submit()">
30           <option value="desc"{if $order eq 'desc'}selected="selected"{/if}>Anti-chronologique</option>
31           <option value="asc"{if $order eq 'asc'}selected="selected"{/if}>Chronologique</option>
32         </select>
33       </form>
34     </td>
35   </tr>
36   <tr><td colspan=2 class='center'>Attention, ton choix s'appliquera à tous les utilisateurs !</td></tr>
37 </table>
38 <br />
39 {/if}
40
41 {if !$is_admin}
42 <h1>{$asso->nom}&nbsp;: Événements</h1>
43 {else}
44 <h1>
45   {$asso->nom}&nbsp;:
46   {if $archive}[<a href="{$platal->ns}events">Événements</a>] {else}Événements {/if}
47   {if $archive}Archives {else}[<a href="{$platal->ns}events/archive">Archives</a>] {/if}
48 </h1>
49
50 {if t($updated) && $updated}
51 <p class='error'>
52   La modification de l'inscription a été prise en compte&nbsp;!
53   {if $updated.topay > $updated.paid}
54     <br/>N'oublie pas de payer {math equation="a-b" a=$updated.topay b=$updated.paid}&nbsp;&euro;
55     {if $updated.paid > 0}
56     (tu as déjà payé {$updated.paid|replace:'.':','}&nbsp;&euro;)
57     {/if}
58     {if $updated.paiement_id}
59     [<a href="{$platal->ns}payment/{$updated.paiement_id}?montant={math equation="a-b" a=$updated.topay b=$updated.paid}">
60     Payer en ligne</a>]
61     {/if}
62   {/if}
63 </p>
64 {/if}
65
66 {if !$archive}
67 <p class="center">
68   [<a href="{$platal->ns}events/edit">Annoncer un nouvel événement</a>]
69 </p>
70 {/if}
71 {/if}
72
73 {foreach from=$evenements key=eid item=e}
74 <table class="bicol" cellspacing="0" cellpadding="0">
75   <colgroup>
76     <col width='25%' />
77   </colgroup>
78   <tr>
79     <th colspan="2"{if !$e.inscr_open} class="grayed"{/if}>
80       <a href="{$platal->ns}events/ical/{$eid}/{$eid}.ics" style="display: block; float: left;">
81         {icon name=calendar_view_day title="Événement iCal"}
82       </a>
83       {$e.intitule}
84       {if !$e.inscr_open}
85       (<span class="error">Inscriptions closes</span>)
86       {/if}
87       {if $is_admin}
88       <br />
89       [<a href="{$platal->ns}events/edit/{$eid}">
90         modifier
91         {icon name=date_edit title="Édition de l'événement"}</a>]
92       &nbsp;
93       [<a href="javascript:$.dynPost('{$platal->pl_self()}?token={xsrf_token}',{if !$archive}'archive'{else}'unarchive'{/if},{$eid})">
94         {if !$archive}
95           archiver
96           {icon name=package_add title="Archivage"}</a>]
97         {else}
98           désarchiver
99           {icon name=package_delete title="Désarchivage"}</a>]
100         {/if}
101       &nbsp;
102       [<a href="javascript:$.dynPost('{$platal->ns}events?token={xsrf_token}','del',{$eid})"
103         onclick="return confirm('Supprimer l\'événement effacera la liste des inscrits et des paiements.\n Es-tu sûr de vouloir supprimer l\'événement&nbsp;?')">
104         supprimer
105       {icon name=delete title='Suppression'}</a>]
106       {/if}
107     </th>
108   </tr>
109
110   <tr>
111     <td class="titre">Date&nbsp;:</td>
112     <td>{$e.date}</td>
113   </tr>
114
115   <tr>
116     <td class="titre">Annonceur&nbsp;:</td>
117     <td>{profile user=$e.uid promo=true groupperms=false}</td>
118   </tr>
119
120   {if $is_admin || $e.show_participants || ($e.deadline_inscription && $e.inscr_open)}
121   <tr>
122     <td class="titre">Informations&nbsp;:</td>
123     <td class='actions'>
124       {if $is_admin || $e.show_participants}
125       <a href="{$platal->ns}events/admin/{$eid}">
126         consulter la liste des participants
127         {icon name=group title="Liste des participants"}
128       </a><br />
129       {/if}
130       {if $e.deadline_inscription && $e.inscr_open}
131         dernières inscriptions
132         le {$e.deadline_inscription|date_format:"%d %B %Y"}
133       {/if}
134     </td>
135   </tr>
136   {/if}
137
138   <tr>
139     <td class="titre">
140       État inscription&nbsp;:
141       {if $e.inscr_open}
142         <input type="hidden" name="evt_{counter}" value="{$eid}" />
143       {/if}
144     </td>
145     <td>
146       {if !$e.inscrit}
147       <span class='error'>Non inscrit</span><br />
148       {else}
149         {foreach from=$e.items key=item_id item=m}
150         {if !t($e.sub.$item_id) || !$e.sub.$item_id.nb}
151         Tu ne viendras pas
152         {else}
153         Tu as inscrit {$e.sub.$item_id.nb} personne{if $e.sub.$item_id.nb > 1}s{/if}
154         {/if} à <em>{$m.titre}</em>.<br />
155         {/foreach}
156       {/if}
157
158       {if $e.topay}
159       <span class="error">
160         {if $e.paid eq '0.00'}
161         Tu dois payer {$e.topay|replace:'.':','}&nbsp;&euro;.
162         {elseif $e.paid < $e.topay}
163         Tu dois encore payer {math equation="a-b" a=$e.topay b=$e.paid|replace:'.':','}&nbsp;&euro;
164         (tu as déjà payé {$e.paid|replace:'.':','}&nbsp;&euro;).
165         {else}
166         Tu as déjà payé les {$e.paid|replace:'.':','}&nbsp;&euro; de ton inscription.
167         {/if}
168         {if t($e.paiement_id) &&  $e.paid < $e.topay}
169         [<a href="{$platal->ns}payment/{$e.paiement_id}?montant={math equation="a-b" a=$e.topay b=$e.paid}">
170         Payer en ligne</a>]
171         {/if}
172       </span>
173       {/if}
174     </td>
175   </tr>
176
177   {if $e.inscr_open}
178   <tr>
179     <td colspan='2' class='center'>
180       <strong>
181       <a href='{$platal->ns}events/sub/{$eid}'>
182         Gérer mon inscription et voir les détails de l'événement.
183       </a>
184       </strong>
185     </td>
186   </tr>
187   {/if}
188
189 </table>
190
191 <br />
192
193 {foreachelse}
194
195 <p class="descr">
196 {if $archive}
197   Aucun événement n'a été archivé par les animateurs du groupe.
198 {else}
199   Aucun événement n'a été référencé par les animateurs du groupe.
200 {/if}
201 </p>
202
203 {/foreach}
204
205 {if $undisplayed_events neq 0}
206 <p class="descr">
207   Il y a {$undisplayed_events} événement{if $undisplayed_events > 1}s non affichés car ils sont réservés
208   {else} non affiché car il est réservé{/if} aux membres de ce groupe.
209 </p>
210 {/if}
211
212 {if $evenements}
213 <p class="descr">
214   En cliquant sur l'icône {icon name=calendar_view_day title="Événement iCal"} associée à un événement,
215   tu peux télécharger la version iCal de l'événement qui permet de l'ajouter dans ton agenda électronique.
216 </p>
217 {/if}
218
219 {* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}