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