219edb0807a305125dd436fa66ba3c2ad8d6bbd2
[platal.git] / templates / xnetevents / index.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énements</h1>
24
25 {if $admin}
26 <p class="center">
27   [<a href="{rel}/{$platal->ns}events/edit">Annoncer un nouvel événement</a>]
28 </p>
29 {/if}
30
31 {foreach from=$evenements item=e}
32
33 <table class="bicol" cellspacing="0" cellpadding="0" {popup caption=$e.intitule text=$e.descriptif}>
34   <colgroup>
35     <col width='25%' />
36   </colgroup>
37   <tr>
38     <th colspan="2">
39       {$e.intitule}
40       {if $admin}
41       <br />
42       [<a href="{rel}/{$platal->ns}events/edit/{$e.eid}">
43         modifier
44         <img src="{rel}/images/profil.png" title="Edition de l'événement" alt="Edition" />
45       </a>]
46       &nbsp;&nbsp;&nbsp;&nbsp;
47       [<a href="javascript:dynpostkv('{rel}/{$platal->ns}events', 'del', {$e.eid})"
48         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 ?')">
49         supprimer
50         <img src="{rel}/images/del.png" alt="Suppression de {$e.intitule}" title="Suppression" />
51       </a>]
52       {/if}
53     </th>
54   </tr>
55
56   <tr>
57     <td class="titre">date :</td>
58     <td>
59       {if $e.fin and $e.fin neq $e.debut}
60         {if $e.debut_day eq $e.fin_day}
61           le {$e.debut|date_format:"%d %B %Y"} de {$e.debut|date_format:"%H:%M"} à {$e.fin|date_format:"%H:%M"}
62         {else}
63           du {$e.debut|date_format:"%d %B %Y à %H:%M"}<br />
64           au {$e.fin|date_format:"%d %B %Y à %H:%M"}
65         {/if}
66       {else}
67         le {$e.debut|date_format:"%d %B %Y à %H:%M"}
68       {/if}
69     </td>
70   </tr>
71
72   <tr>
73     <td class="titre">annonceur :</td>
74     <td>
75       <a href='https://www.polytechnique.org/profile/{$e.alias}' class='popup2'>{$e.prenom} {$e.nom} ({$e.promo})</a>
76     </td>
77   </tr>
78
79   <tr>
80     <td class="titre">Informations :</td>
81     <td class='actions'>
82       {if $admin || $e.show_participants}
83       <a href="{rel}/{$platal->ns}events/admin/{$e.eid}">
84         consulter la liste des participants
85         <img src="{rel}/images/loupe.gif" title="Liste des participants" alt="" />
86       </a><br />
87       {/if}
88       {if $e.deadline_inscription}
89         {if $e.inscr_open}
90           dernières inscriptions
91           le {$e.deadline_inscription|date_format:"%d %B %Y"}
92         {else}
93           <span class='error'>Inscriptions closes.</span><br />
94         {/if}
95       {/if}
96     </td>
97   </tr>
98
99   <tr>
100     <td class="titre">
101       État inscription
102       {if $e.inscr_open}
103         <input type="hidden" name="evt_{counter}" value="{$e.eid}" />
104       {/if}
105     </td>
106     <td>
107       {if !$e.inscrit}
108       <span class='error'>Non inscrit</span><br />
109       {else}
110         {foreach from=$e.moments item=m}
111         {if !$m.nb}
112         Tu ne viendras pas
113         {elseif $m.nb eq 1}
114         Tu viendras seul
115         {else}
116         Tu viendras avec {$m.nb} personne{if $m.nb > 2}s{/if}
117         {/if} à <em>{$m.titre}</em><br />
118         {/foreach}
119       {/if}
120
121       {if $e.topay}
122       <span class="error">
123       Tu dois payer {$e.topay|replace:'.':','}&nbsp;&euro;
124       {if $e.paid > 0}
125       (tu as déjà payé {$e.paid|replace:'.':','}&nbsp;&euro;)
126       {/if}
127       {if $e.paiement_id}
128         [<a href="https://www.polytechnique.org/payment/{$e.paiement_id}?montant={$e.topay}}">
129         Payer en ligne</a>]
130       {/if}
131       </span>
132       {/if}
133     </td>
134   </tr>
135
136   {if $e.inscr_open}
137   <tr>
138     <td colspan='2' class='center'>
139       <strong>
140       <a href='{rel}/{$platal->ns}events/sub/{$e.eid}'>
141         gérer mon inscription
142       </a>
143       </strong>
144     </td>
145   </tr>
146   {/if}
147
148 </table>
149
150 <br />
151
152 {foreachelse}
153
154 <p class="descr">
155   Aucun événement n'a été référencé par les animateurs du groupe.
156 </p>
157
158 {/foreach}
159
160 {* vim:set et sw=2 sts=2 sws=2: *}