| 1 | {**************************************************************************} |
| 2 | {* *} |
| 3 | {* Copyright (C) 2003-2010 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 | {if $ask_naissance} |
| 24 | |
| 25 | {include file='include/form_naissance.tpl'} |
| 26 | |
| 27 | {else} |
| 28 | |
| 29 | <h1 id='pagetop'> |
| 30 | Bienvenue {$smarty.session.user->displayName()}{if $birthday} |
| 31 | et joyeux anniversaire de la part de toute l'équipe ! |
| 32 | {else}, |
| 33 | {/if} |
| 34 | </h1> |
| 35 | |
| 36 | {if $smarty.session.user->host} |
| 37 | <div class="smaller"> |
| 38 | {if $birthday}T{else}t{/if}a connexion précédente date du |
| 39 | <strong>{$smarty.session.user->lastlogin|date_format:"%x, %X"}</strong> |
| 40 | depuis la machine <strong>{$smarty.session.user->host}</strong>. |
| 41 | </div> |
| 42 | {/if} |
| 43 | |
| 44 | {if $reminder} |
| 45 | {include file="reminder/base.tpl"} |
| 46 | {else} |
| 47 | {include file="include/tips.tpl" full=true} |
| 48 | {/if} |
| 49 | |
| 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} |
| 55 | {if $smarty.session.user->token} |
| 56 | <a href="rss/{$smarty.session.hruid}/{$smarty.session.user->token}/rss.xml" style="display:block;float:right" title="Annonces"> |
| 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> |
| 63 | {/if} |
| 64 | {/if} |
| 65 | {if $category eq 'important'} |
| 66 | {icon name=error} Informations prioritaires : |
| 67 | {elseif $category eq 'news'} |
| 68 | {icon name=bell} Nouvelles annonces : |
| 69 | {elseif $category eq 'end'} |
| 70 | {icon name=clock} Dernières minutes : |
| 71 | {else} |
| 72 | {icon name=magnifier} Mais encore… |
| 73 | {/if} |
| 74 | </td> |
| 75 | </tr> |
| 76 | {foreach item=ev from=$evenement} |
| 77 | <tr class="impair"> |
| 78 | <td class="half"> |
| 79 | • |
| 80 | <a href="events{if !$ev.nonlu}/unread/{$ev.id}{else}#newsid{$ev.id}{/if}" id="link-evt{$ev.id}"> |
| 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> |
| 89 | {assign var="has_evts" value=true} |
| 90 | {/foreach} |
| 91 | {/foreach} |
| 92 | {if !$has_evts} |
| 93 | <tr> |
| 94 | <td class="half"> |
| 95 | {if $smarty.session.user->token} |
| 96 | <a href="rss/{$smarty.session.hruid}/{$smarty.session.user->token}/rss.xml" style="display:block;float:right" title="Annonces"> |
| 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> |
| 106 | </tr> |
| 107 | {/if} |
| 108 | </table> |
| 109 | |
| 110 | <script type="text/javascript"> |
| 111 | {literal} |
| 112 | <!-- |
| 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 | } |
| 124 | --> |
| 125 | {/literal} |
| 126 | </script> |
| 127 | |
| 128 | {foreach from=$events key=category item=evenement} |
| 129 | {foreach item=ev from=$evenement} |
| 130 | {if $ev.nonlu} |
| 131 | <div id="content-evt{$ev.id}"> |
| 132 | <br /> |
| 133 | |
| 134 | <table class="bicol"> |
| 135 | <tr> |
| 136 | <th> |
| 137 | <div style="float: left"> |
| 138 | {if $category eq 'important'} |
| 139 | {icon name=error title="Important"} |
| 140 | {elseif $category eq 'news'} |
| 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> |
| 148 | <div style="float:right"> |
| 149 | {if hasPerm('admin')} |
| 150 | <a href="admin/events/edit/{$ev.id}">{icon name=page_edit title="Editer cet article"}</a> |
| 151 | {/if} |
| 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> |
| 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> |
| 161 | {cycle values="left,right" assign=position} |
| 162 | <tr class="impair"> |
| 163 | <td class="half"> |
| 164 | <div> |
| 165 | {if $ev.img} |
| 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> |
| 169 | {/if} |
| 170 | <div style="text-align: justify"> |
| 171 | {if !$ev.wiki} |
| 172 | {$ev.texte|smarty:nodefaults|nl2br} |
| 173 | {else} |
| 174 | {$ev.texte|miniwiki|smarty:nodefaults} |
| 175 | {/if} |
| 176 | </div> |
| 177 | </div> |
| 178 | </td> |
| 179 | </tr> |
| 180 | <tr class="pair"> |
| 181 | <td class="half smaller"> |
| 182 | <div style="display:block; float: right; padding-left:1em"> |
| 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> • |
| 187 | {/if} |
| 188 | <a href="events#pagetop"> |
| 189 | <img alt="Sommaire" title="Remonter tout en haut" src="images/up.png"/> |
| 190 | </a> |
| 191 | </div> |
| 192 | Annonce proposée par {profile user=$ev.uid sex=false promo=true} |
| 193 | </td> |
| 194 | </tr> |
| 195 | </table> |
| 196 | </div> |
| 197 | {/if} |
| 198 | {/foreach} |
| 199 | {/foreach} |
| 200 | |
| 201 | <p class="smaller"> |
| 202 | Nota Bene : les informations présentées ici n'engagent que leurs auteurs |
| 203 | respectifs et sont publiées à leur initiative. L'association Polytechnique.org |
| 204 | ne pourrait en aucun cas être tenue responsable de la nature des propos relatés |
| 205 | sur cet espace d'expression et d'information. Elle se réserve le droit de |
| 206 | refuser ou de retirer toute information de nature diffamante ou pouvant être |
| 207 | interprétée comme polémique par un membre de la communauté polytechnicienne. |
| 208 | </p> |
| 209 | |
| 210 | <p class="center"> |
| 211 | {icon name=page_edit} |
| 212 | <a href="events/submit">Proposer une information événementielle</a> • |
| 213 | <a href="nl/submit">Proposer un article pour la Lettre mensuelle</a> |
| 214 | </p> |
| 215 | {/if} |
| 216 | |
| 217 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |