Removes deprecated variables from session, adds variables into user object for sessio...
[platal.git] / templates / events / index.tpl
index d7dad61..83eb602 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2009 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2010 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {else}
 
 <h1 id='pagetop'>
-Bienvenue {$smarty.session.display_name}{if $birthday}
-  &nbsp;et joyeux anniversaire de la part de toute l'équipe !
+Bienvenue {$smarty.session.user->displayName()}{if $birthday}
+  &nbsp;et joyeux anniversaire de la part de toute l'équipe&nbsp;!
 {else},
 {/if}
 </h1>
 
-{if $smarty.session.host}
+{if $smarty.session.user->host}
 <div class="smaller">
   {if $birthday}T{else}t{/if}a connexion précédente date du
-  <strong>{$smarty.session.lastlogin|date_format:"%x, %X"}</strong>
-  depuis la machine <strong>{$smarty.session.host}</strong>.
+  <strong>{$smarty.session.user->lastlogin|date_format:"%x, %X"}</strong>
+  depuis la machine <strong>{$smarty.session.user->host}</strong>.
 </div>
 {/if}
 
@@ -52,8 +52,8 @@ Bienvenue {$smarty.session.display_name}{if $birthday}
     <tr class="pair" style="height: 18px">
       <td class="half titre" style="height: 18px; padding-top: 1px; padding-bottom: 1px;">
         {if $smarty.foreach.events.first}
-        {if $smarty.session.token}
-        <a href="rss/{$smarty.session.hruid}/{$smarty.session.token}/rss.xml" style="display:block;float:right" title="Annonces">
+        {if $smarty.session.user->token}
+        <a href="rss/{$smarty.session.hruid}/{$smarty.session.user->token}/rss.xml" style="display:block;float:right" title="Annonces">
           {icon name=feed title='fil rss'}
         </a>
         {else}
@@ -69,7 +69,7 @@ Bienvenue {$smarty.session.display_name}{if $birthday}
         {elseif $category eq 'end'}
           {icon name=clock} Dernières minutes&nbsp;:
         {else}
-          {icon name=magnifier} Mais encore...
+          {icon name=magnifier} Mais encore&hellip;
         {/if}
       </td>
     </tr>
@@ -92,8 +92,8 @@ Bienvenue {$smarty.session.display_name}{if $birthday}
     {if !$has_evts}
     <tr>
       <td class="half">
-        {if $smarty.session.token}
-        <a href="rss/{$smarty.session.hruid}/{$smarty.session.token}/rss.xml" style="display:block;float:right" title="Annonces">
+        {if $smarty.session.user->token}
+        <a href="rss/{$smarty.session.hruid}/{$smarty.session.user->token}/rss.xml" style="display:block;float:right" title="Annonces">
           {icon name=feed title='fil rss'}
         </a>
         {else}
@@ -189,7 +189,7 @@ Bienvenue {$smarty.session.display_name}{if $birthday}
             <img alt="Sommaire" title="Remonter tout en haut" src="images/up.png"/>
           </a>
         </div>
-        Annonce proposée par {profile user=$ev.user_id sex=false promo=true}
+        Annonce proposée par {profile user=$ev.uid sex=false promo=true}
       </td>
     </tr>
   </table>