backport : demande de confirmation pour la suppression d'un evenement
[platal.git] / templates / xnet / groupe / evenements.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2004 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} :
24 Evénements
25 </h1>
26
27 {if !$logged}
28   <p class="descr">
29      Aucune manifestation publique n'a été saisie par ce groupe pour l'instant...
30   </p>
31 {else}
32
33   {if $admin}
34   <p class="center">
35   [<a href="evt-modif.php?add=1">Annoncer un nouvel événement</a>]
36   </p>
37   {/if}
38
39   {if $nb_evt eq 0}
40
41   <p class="descr">
42     Aucun événement n'a été référencé par les animateurs du groupe.
43   </p>
44
45   {else}
46
47   <form action="{$smarty.server.PHP_SELF}" method="post">
48   {foreach from=$evenements item=e}
49   <table class="tiny" cellspacing="0" cellpadding="0">
50     <tr {popup caption=$e.intitule" text=$e.descriptif}>
51       <th colspan="2">
52         {$e.intitule}
53         {if $admin}
54         <a href="evt-modif.php?mod=1&amp;eid={$e.eid}"><img src="{rel}/images/profil.png" title="Edition de l'événement" alt="Edition de l'événement" /></a>
55         <a href="evt-modif.php?sup=1&amp;eid={$e.eid}" 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 ?')"><img src="{rel}/images/del.png" alt="Suppression de {$e.intitule}" title="Suppression de {$e.intitule}" /></a>
56         {/if}
57       </th>
58     </tr>
59     <tr {popup caption=$e.intitule text=$e.descriptif}>
60       <td class="titre">date :</td>
61       <td>
62         {if $e.fin and $e.fin neq $e.debut}
63           {if $e.debut_day eq $e.fin_day}
64             le {$e.debut|date_format:"%d %B %Y"} de {$e.debut|date_format:"%H:%M"} à {$e.fin|date_format:"%H:%M"}
65           {else}
66             du {$e.debut|date_format:"%d %B %Y à %H:%M"}<br />
67             au {$e.fin|date_format:"%d %B %Y à %H:%M"}
68           {/if}
69         {else}
70           le {$e.debut|date_format:"%d %B %Y à %H:%M"}
71         {/if}
72       </td>
73     </tr>
74     <tr {popup caption=$e.intitule text=$e.descriptif}>
75       <td class="titre">annonceur :</td>
76       <td>
77         <a href='https://polytechnique.org/fiche.php?user={$e.alias}' class='popup2'>{$e.prenom} {$e.nom} ({$e.promo})</a>
78       </td>
79     </tr>
80     {if $admin || $e.show_participants}
81     <tr {popup caption=$e.intitule text=$e.descriptif}>
82       <td class="titre" colspan="2">
83         <a href="evt-admin.php?eid={$e.eid}">
84           Liste des participants
85           <img src="{rel}/images/loupe.gif" title="Liste des participants" alt="Liste des participants" />
86         </a>
87       </td>
88     </tr>
89     {/if}
90     {assign var="montant" value=0}
91     {if !$e.membres_only or $is_member or $e.inscrit}
92       {if $e.inscr_open}
93         <tr>
94           <td colspan="2">
95             Je viendrai...
96             <input type="hidden" name="evt_{counter}" value="{$e.eid}" />
97           </td>
98         </tr>
99       {/if}
100       {iterate from=$e.moments item=m}
101         {assign var="montant" value=$montant+$m.montant*$m.nb}
102         <tr {if $m.titre or $m.details or $m.montant}{popup caption="`$m.titre` (`$m.montant` &#x20AC;)"  text=" `$m.details` "}{/if}>
103           <td>{$m.titre}</td>
104           <td>
105             {if $e.inscr_open}
106               <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="0"
107               {if !$m.nb}checked="checked"{/if}/>non
108               <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="1"
109               {if $m.nb eq 1}checked="checked"{/if}/>seul<br />
110               <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="2"
111               {if $m.nb > 1}checked="checked"{/if}/>avec <input size="2" name="personnes{$e.eid}_{$m.item_id}" value="{if $m.nb > 1}{math equation="x - y" x=$m.nb y=1}{else}1{/if}"/> personnes
112             {else}
113               {if !$m.nb}
114                 Je ne viendrai pas.
115               {elseif $m.nb eq 1}
116                 Je viendrai seul.
117               {else}
118                 Je viendrai avec {$m.nb} personne{if $m.nb > 2}s{/if}
119               {/if}
120             {/if}
121           </td>
122         </tr>
123       {/iterate}
124       {if $e.deadline_inscription}
125         <tr>
126           <td colspan="2" class="center">
127             {if $e.inscr_open}
128               dernières inscriptions
129               le {$e.deadline_inscription|date_format:"%d %B %Y"}
130             {else}
131               Inscriptions closes.
132             {/if}
133           </td>
134         </tr>
135       {/if}
136       {if $montant > 0 || $e.paid > 0}
137       <tr>
138         <td colspan="2" {if $montant > $e.paid}class="erreur"{/if}>
139           Tu dois payer {$montant|replace:'.':','}&nbsp;&euro;{if $e.paid > 0}, et tu as déjà payé {$e.paid|replace:'.':','}&nbsp;&euro;{/if}.
140           {if $e.paiement_id && $montant > $e.paid}
141             [<a href="https://www.polytechnique.org/paiement/?ref={$e.paiement_id}&amp;montant={math equation="x - y" x=$montant y=$e.paid}">Payer en ligne</a>]
142           {/if}
143         </td>
144       </tr>
145       {/if}
146     {/if}
147   </table>
148   {if (!$e.membres_only or $is_member or $e.inscrit) and $e.inscr_open}
149     <p style="text-align:center">
150       <input type="submit" value="Valider mes inscriptions" />
151     </p>
152   {else}
153     <p>&nbsp;</p>
154   {/if}
155   {/foreach}
156
157   <div>
158     <input type="hidden" name="ins" />
159   </div>
160   </form>
161   {/if}
162
163 {/if}
164
165 {* vim:set et sw=2 sts=2 sws=2: *}