Integrates external readers to the rss feeds and the iCal calendars.
[platal.git] / templates / events / index.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
179afa7f 3{* Copyright (C) 2003-2008 Polytechnique.org *}
0337d704 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
0337d704 23{if $ask_naissance}
24
25{include file='include/form_naissance.tpl'}
26
27{else}
28
1f7c3690 29<h1 id='pagetop'>
d8de39c2 30Bienvenue {$smarty.session.prenom}{if $birthday}
9e92370d 31 &nbsp;et joyeux anniversaire de la part de toute l'équipe !
d8de39c2 32{else},
0337d704 33{/if}
34</h1>
35
ccdbc270 36{if $smarty.session.host}
0337d704 37<div class="smaller">
d8de39c2 38 {if $birthday}T{else}t{/if}a connexion précédente date du
9e1743cd 39 <strong>{$smarty.session.lastlogin|date_format:"%x, %X"}</strong>
9e92370d 40 depuis la machine <strong>{$smarty.session.host}</strong>.
0337d704 41</div>
ccdbc270 42{/if}
43
44{if $smarty.session.no_redirect}
45<p class="erreur">
46 Tu n'as plus de redirection valide ce qui rend ton adresse Polytechnique.org
9e92370d 47 inutilisable. Rends-toi au plus vite sur <a href="emails/redirect">la page de
a7de4ef7 48 gestion des emails</a> pour corriger ce problème.
ccdbc270 49</p>
50{/if}
51
3083bd93 52{if $smarty.session.mx_failures|@count}
ccdbc270 53<fieldset>
edbf87a7 54 <legend>{icon name=error} Des problèmes sont actuellement recontrés sur tes redirections suivantes</legend>
ccdbc270 55 {foreach from=$smarty.session.mx_failures item=mail}
56 <div>
57 <span class="erreur">{$mail.mail}</span>
58 <div class="explication">{$mail.text}</div>
59 </div>
edbf87a7
FB
60 {/foreach}
61 <div><a href="emails/redirect">Gérer mes adresses de redirection</a></div>
ccdbc270 62</fieldset>
63{/if}
64
0337d704 65{if $fiche_incitation}
a7de4ef7 66 <p>La dernière mise à jour de ta
7b2413f6 67 <a href="profile/{$smarty.session.forlife}" class="popup2">fiche</a>
0337d704 68 date du {$fiche_incitation|date_format}.
a7de4ef7 69 Il est possible qu'elle ne soit pas à jour.
7b2413f6 70 Si tu souhaites la modifier, <a href="profile/edit">clique ici !</a>
0337d704 71 </p>
72{/if}
73
74{if $photo_incitation}
75 <p>
76 Tu n'as pas mis de photo de toi sur ta fiche, c'est dommage.
7b2413f6 77 Clique <a href="photo/change">ici</a> si tu souhaites en ajouter une.
0337d704 78 </p>
79{/if}
80
81{if $geoloc_incitation > 0}
82 <p>
2f678da1 83 Parmi tes adresses, il y en a {$geoloc_incitation} que nous n'avons pas pu localiser.
7b2413f6 84 Clique <a href="profile/edit/adresses">ici</a> pour rectifier.
0337d704 85 </p>
86{/if}
0337d704 87
dc767839 88{include file="include/tips.tpl" full=true}
f75b2292 89
02838718 90 <table class="tinybicol" id="menu-evts">
91 {foreach from=$events name=events key=category item=evenement}
92 <tr class="pair" style="height: 18px">
93 <td class="half titre" style="height: 18px; padding-top: 1px; padding-bottom: 1px;">
94 {if $smarty.foreach.events.first}
2200e510 95 {if $smarty.session.core_rss_hash}
769dc7d5 96 <a href="rss/{$smarty.session.forlife}/{$smarty.session.core_rss_hash}/rss.xml" style="display:block;float:right" title="Annonces">
2200e510 97 {icon name=feed title='fil rss'}
98 </a>
99 {else}
100 <a href='prefs/rss?referer=events' style="display:block;float:right">
101 {icon name=feed_add title='Activer mon fil rss'}
102 </a>
02838718 103 {/if}
104 {/if}
9ed396c0 105 {if $category eq 'important'}
106 {icon name=error} Informations prioritaires&nbsp;:
107 {elseif $category eq 'news'}
d0e45ced 108 {icon name=bell} Nouvelles annonces&nbsp;:
109 {elseif $category eq 'end'}
110 {icon name=clock} Dernières minutes&nbsp;:
111 {else}
112 {icon name=magnifier} Mais encore...
113 {/if}
114 </td>
115 </tr>
c321aa99 116 {foreach item=ev from=$evenement}
d0e45ced 117 <tr class="impair">
f75b2292 118 <td class="half">
119 &bull;
a4a3af33 120 <a href="events{if !$ev.nonlu}/unread/{$ev.id}{else}#newsid{$ev.id}{/if}" id="link-evt{$ev.id}">
f75b2292 121 {if $ev.nonlu}<strong>{/if}
122 {tidy}
123 {$ev.titre|nl2br}
124 {/tidy}
125 {if $ev.nonlu}</strong>{/if}
126 </a>
127 </td>
128 </tr>
679c68da 129 {assign var="has_evts" value=true}
c321aa99 130 {/foreach}
d0e45ced 131 {/foreach}
679c68da 132 {if !$has_evts}
133 <tr>
134 <td class="half">Aucun article actuellement</td>
135 </tr>
136 {/if}
f75b2292 137 </table>
138
a4a3af33 139 <script type="text/javascript">
140 {literal}
20ac3913 141 <!--
a4a3af33 142 function readEvent(id) {
143 document.getElementById('content-evt'+id).style.display='none';
144 var link = document.getElementById('link-evt'+id);
145 link.setAttribute('href','events/unread/'+id);
146 for (var i=0; i < link.childNodes.length; i++)
147 if (link.childNodes[i].nodeName == 'STRONG') {
148 link.replaceChild(link.childNodes[i].firstChild,link.childNodes[i]);
149 }
150 Ajax.update_html(null, 'events/read/'+id);
151 return false;
152 }
20ac3913 153 -->
a4a3af33 154 {/literal}
155 </script>
d0e45ced 156
157 {foreach from=$events key=category item=evenement}
c321aa99
FB
158 {foreach item=ev from=$evenement}
159 {if $ev.nonlu}
a4a3af33 160 <div id="content-evt{$ev.id}">
8e95ff41 161 <br />
162
163 <table class="bicol">
164 <tr>
165 <th>
d0e45ced 166 <div style="float: left">
9ed396c0 167 {if $category eq 'important'}
168 {icon name=error title="Important"}
169 {elseif $category eq 'news'}
d0e45ced 170 {icon name=bell title="Nouvelle annonce"}
171 {elseif $category eq 'end'}
172 {icon name=clock title="Bientôt fini"}
173 {else}
174 {icon name=magnifier title="Annonce"}
175 {/if}
176 </div>
8e95ff41 177 <div style="float:right">
908db125 178 {if hasPerm('admin')}
8e95ff41 179 <a href="admin/events/edit/{$ev.id}">{icon name=page_edit title="Editer cet article"}</a>
180 {/if}
a4a3af33 181 <a href="events/read/{$ev.id}{if $previd}/newsid{$previd}{/if}" onclick="return readEvent('{$ev.id}')">{icon name=cross title="Cacher cet article"}</a>
8e95ff41 182 </div>
183 {assign var="previd" value=$ev.id}
184 <a id="newsid{$ev.id}"></a>
185 {tidy}
186 {$ev.titre|nl2br}
187 {/tidy}
188 </th>
189 </tr>
02838718 190 {cycle values="left,right" assign=position}
191 <tr class="impair">
192 <td class="half">
193 <div>
b2bffbe6 194 {if $ev.img}
02838718 195 <div style="float: {$position}; padding-{if $position eq right}left{else}right{/if}: 0.5em">
196 <img src="events/photo/{$ev.id}" alt="{$ev.title}" />
197 </div>
b2bffbe6 198 {/if}
02838718 199 <div style="text-align: justify">
794feea7 200 {if !$ev.wiki}
47ea918c 201 {$ev.texte|smarty:nodefaults|nl2br}
794feea7
FB
202 {else}
203 {$ev.texte|miniwiki|smarty:nodefaults}
204 {/if}
02838718 205 </div>
206 </div>
207 </td>
208 </tr>
209 <tr class="pair">
b2bffbe6 210 <td class="half smaller">
211 <div style="display:block; float: right; padding-left:1em">
b2bffbe6 212 {if $ev.post_id}
213 <a href="banana/{#globals.banana.event_reply#|default:#globals.banana.event_forum#}/read/{$ev.post_id}">
214 {icon name="comments" title="Discussion"}Suivre la discussion
215 </a> &bull;
216 {/if}
217 <a href="events#pagetop">
218 <img alt="Sommaire" title="Remonter tout en haut" src="images/up.png"/>
02838718 219 </a>
b2bffbe6 220 </div>
221 Annonce proposée par
222 <a href="profile/{$ev.forlife}" class="popup2">
223 {$ev.prenom} {$ev.nom} X{$ev.promo}
224 </a>
8e95ff41 225 </td>
226 </tr>
227 </table>
a4a3af33 228 </div>
c321aa99
FB
229 {/if}
230 {/foreach}
d0e45ced 231 {/foreach}
8e95ff41 232
0337d704 233 <p class="smaller">
e8439508 234 Nota Bene&nbsp;: les informations présentées ici n'engagent que leurs auteurs
a7de4ef7 235 respectifs et sont publiées à leur initiative. L'association Polytechnique.org
236 ne pourrait en aucun cas être tenue responsable de la nature des propos relatés
237 sur cet espace d'expression et d'information. Elle se réserve le droit de
238 refuser ou de retirer toute information de nature diffamante ou pouvant être
239 interprétée comme polémique par un membre de la communauté polytechnicienne.
0337d704 240 </p>
241
d1c97e42 242 <p class="center">
1970c12b 243 {icon name=page_edit}&nbsp;
a7de4ef7 244 <a href="events/submit">Proposer une information événementielle</a>&nbsp;&bull;
1970c12b 245 <a href="nl/submit">Proposer un article pour la Lettre mensuelle</a>
0337d704 246 </p>
0337d704 247{/if}
248
a7de4ef7 249{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}