Merge branch 'master' into fusionax
[platal.git] / templates / events / index.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
8d84c630 3{* Copyright (C) 2003-2009 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'>
1b408064 30Bienvenue {$smarty.session.yourself_name}{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
fb0ee2e8 44{if $reminder}
4b0cb388
VZ
45{include file="reminder/base.tpl"}
46{else}
dc767839 47{include file="include/tips.tpl" full=true}
0337d704 48{/if}
0337d704 49
02838718 50 <table class="tinybicol" id="menu-evts">
51 {foreach from=$events name=events key=category item=evenement}
52 <tr class="pair" style="height: 18px">
53 <td class="half titre" style="height: 18px; padding-top: 1px; padding-bottom: 1px;">
54 {if $smarty.foreach.events.first}
2200e510 55 {if $smarty.session.core_rss_hash}
c52838d6 56 <a href="rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/rss.xml" style="display:block;float:right" title="Annonces">
2200e510 57 {icon name=feed title='fil rss'}
58 </a>
59 {else}
60 <a href='prefs/rss?referer=events' style="display:block;float:right">
61 {icon name=feed_add title='Activer mon fil rss'}
62 </a>
02838718 63 {/if}
64 {/if}
9ed396c0 65 {if $category eq 'important'}
66 {icon name=error} Informations prioritaires&nbsp;:
67 {elseif $category eq 'news'}
d0e45ced 68 {icon name=bell} Nouvelles annonces&nbsp;:
69 {elseif $category eq 'end'}
70 {icon name=clock} Dernières minutes&nbsp;:
71 {else}
72 {icon name=magnifier} Mais encore...
73 {/if}
74 </td>
75 </tr>
c321aa99 76 {foreach item=ev from=$evenement}
d0e45ced 77 <tr class="impair">
f75b2292 78 <td class="half">
79 &bull;
a4a3af33 80 <a href="events{if !$ev.nonlu}/unread/{$ev.id}{else}#newsid{$ev.id}{/if}" id="link-evt{$ev.id}">
f75b2292 81 {if $ev.nonlu}<strong>{/if}
82 {tidy}
83 {$ev.titre|nl2br}
84 {/tidy}
85 {if $ev.nonlu}</strong>{/if}
86 </a>
87 </td>
88 </tr>
679c68da 89 {assign var="has_evts" value=true}
c321aa99 90 {/foreach}
d0e45ced 91 {/foreach}
679c68da 92 {if !$has_evts}
93 <tr>
4c5aa36a
FB
94 <td class="half">
95 {if $smarty.session.core_rss_hash}
c52838d6 96 <a href="rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/rss.xml" style="display:block;float:right" title="Annonces">
4c5aa36a
FB
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>
103 {/if}
104 Aucun article actuellement
105 </td>
679c68da 106 </tr>
107 {/if}
f75b2292 108 </table>
109
a4a3af33 110 <script type="text/javascript">
111 {literal}
20ac3913 112 <!--
a4a3af33 113 function readEvent(id) {
114 document.getElementById('content-evt'+id).style.display='none';
115 var link = document.getElementById('link-evt'+id);
116 link.setAttribute('href','events/unread/'+id);
117 for (var i=0; i < link.childNodes.length; i++)
118 if (link.childNodes[i].nodeName == 'STRONG') {
119 link.replaceChild(link.childNodes[i].firstChild,link.childNodes[i]);
120 }
121 Ajax.update_html(null, 'events/read/'+id);
122 return false;
123 }
20ac3913 124 -->
a4a3af33 125 {/literal}
126 </script>
b7cce896 127
d0e45ced 128 {foreach from=$events key=category item=evenement}
c321aa99
FB
129 {foreach item=ev from=$evenement}
130 {if $ev.nonlu}
a4a3af33 131 <div id="content-evt{$ev.id}">
8e95ff41 132 <br />
133
134 <table class="bicol">
135 <tr>
136 <th>
d0e45ced 137 <div style="float: left">
9ed396c0 138 {if $category eq 'important'}
139 {icon name=error title="Important"}
140 {elseif $category eq 'news'}
d0e45ced 141 {icon name=bell title="Nouvelle annonce"}
142 {elseif $category eq 'end'}
143 {icon name=clock title="Bientôt fini"}
144 {else}
145 {icon name=magnifier title="Annonce"}
146 {/if}
147 </div>
8e95ff41 148 <div style="float:right">
908db125 149 {if hasPerm('admin')}
8e95ff41 150 <a href="admin/events/edit/{$ev.id}">{icon name=page_edit title="Editer cet article"}</a>
151 {/if}
a4a3af33 152 <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 153 </div>
154 {assign var="previd" value=$ev.id}
155 <a id="newsid{$ev.id}"></a>
156 {tidy}
157 {$ev.titre|nl2br}
158 {/tidy}
159 </th>
160 </tr>
02838718 161 {cycle values="left,right" assign=position}
162 <tr class="impair">
163 <td class="half">
164 <div>
b2bffbe6 165 {if $ev.img}
02838718 166 <div style="float: {$position}; padding-{if $position eq right}left{else}right{/if}: 0.5em">
167 <img src="events/photo/{$ev.id}" alt="{$ev.title}" />
168 </div>
b2bffbe6 169 {/if}
02838718 170 <div style="text-align: justify">
794feea7 171 {if !$ev.wiki}
47ea918c 172 {$ev.texte|smarty:nodefaults|nl2br}
794feea7
FB
173 {else}
174 {$ev.texte|miniwiki|smarty:nodefaults}
175 {/if}
02838718 176 </div>
177 </div>
178 </td>
179 </tr>
180 <tr class="pair">
b2bffbe6 181 <td class="half smaller">
182 <div style="display:block; float: right; padding-left:1em">
b2bffbe6 183 {if $ev.post_id}
184 <a href="banana/{#globals.banana.event_reply#|default:#globals.banana.event_forum#}/read/{$ev.post_id}">
185 {icon name="comments" title="Discussion"}Suivre la discussion
186 </a> &bull;
187 {/if}
188 <a href="events#pagetop">
189 <img alt="Sommaire" title="Remonter tout en haut" src="images/up.png"/>
02838718 190 </a>
b2bffbe6 191 </div>
192 Annonce proposée par
c52838d6 193 <a href="profile/{$ev.hruid}" class="popup2">
fb2c09c9 194 {$ev.prenom} {$ev.nom} {$ev.promo_display}
b2bffbe6 195 </a>
8e95ff41 196 </td>
197 </tr>
198 </table>
a4a3af33 199 </div>
c321aa99
FB
200 {/if}
201 {/foreach}
d0e45ced 202 {/foreach}
8e95ff41 203
0337d704 204 <p class="smaller">
e8439508 205 Nota Bene&nbsp;: les informations présentées ici n'engagent que leurs auteurs
a7de4ef7 206 respectifs et sont publiées à leur initiative. L'association Polytechnique.org
207 ne pourrait en aucun cas être tenue responsable de la nature des propos relatés
208 sur cet espace d'expression et d'information. Elle se réserve le droit de
209 refuser ou de retirer toute information de nature diffamante ou pouvant être
210 interprétée comme polémique par un membre de la communauté polytechnicienne.
0337d704 211 </p>
212
d1c97e42 213 <p class="center">
1970c12b 214 {icon name=page_edit}&nbsp;
a7de4ef7 215 <a href="events/submit">Proposer une information événementielle</a>&nbsp;&bull;
1970c12b 216 <a href="nl/submit">Proposer un article pour la Lettre mensuelle</a>
0337d704 217 </p>
0337d704 218{/if}
219
a7de4ef7 220{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}