Javascript cleanup again.
[platal.git] / templates / events / index.tpl
index fe846f3..06b936e 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  *}
 {*                                                                        *}
 {**************************************************************************}
 
-{if $ask_naissance}
+{if t($ask_naissance)}
 
 {include file='include/form_naissance.tpl'}
 
 {else}
 
 <h1 id='pagetop'>
-Bienvenue {$smarty.session.prenom}{if $birthday}
-  &nbsp;et joyeux anniversaire de la part de toute l'équipe !
+Bienvenue {$smarty.session.user->displayName()}{if t($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>.
+  {if t($birthday)}T{else}t{/if}a connexion précédente date du
+  <strong>{$smarty.session.user->lastlogin|date_format:"%x, %X"}</strong>
+  depuis la machine <strong>{$smarty.session.user->host}</strong>.
 </div>
 {/if}
 
-{if $reminder}
+{if t($reminder)}
 {include file="reminder/base.tpl"}
 {else}
 {include file="include/tips.tpl" full=true}
@@ -52,8 +52,8 @@ Bienvenue {$smarty.session.prenom}{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.core_rss_hash}
-        <a href="rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/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}
@@ -92,8 +92,8 @@ Bienvenue {$smarty.session.prenom}{if $birthday}
     {if !$has_evts}
     <tr>
       <td class="half">
-        {if $smarty.session.core_rss_hash}
-        <a href="rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/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}
@@ -118,7 +118,7 @@ Bienvenue {$smarty.session.prenom}{if $birthday}
        if (link.childNodes[i].nodeName == 'STRONG') {
                link.replaceChild(link.childNodes[i].firstChild,link.childNodes[i]);
        }
-       Ajax.update_html(null, 'events/read/'+id);
+    $.xget('events/read/'+id);
        return false;
   }
   -->
@@ -149,7 +149,7 @@ Bienvenue {$smarty.session.prenom}{if $birthday}
           {if hasPerm('admin')}
           <a href="admin/events/edit/{$ev.id}">{icon name=page_edit title="Editer cet article"}</a>
           {/if}
-          <a href="events/read/{$ev.id}{if $previd}/newsid{$previd}{/if}" onclick="return readEvent('{$ev.id}')">{icon name=cross title="Cacher cet article"}</a>
+          <a href="events/read/{$ev.id}{if t($previd)}/newsid{$previd}{/if}" onclick="return readEvent('{$ev.id}')">{icon name=cross title="Cacher cet article"}</a>
         </div>
         {assign var="previd" value=$ev.id}
         <a id="newsid{$ev.id}"></a>
@@ -189,10 +189,7 @@ Bienvenue {$smarty.session.prenom}{if $birthday}
             <img alt="Sommaire" title="Remonter tout en haut" src="images/up.png"/>
           </a>
         </div>
-        Annonce proposée par
-        <a href="profile/{$ev.hruid}" class="popup2">
-          {$ev.prenom} {$ev.nom} X{$ev.promo}
-        </a>
+        Annonce proposée par {profile user=$ev.uid sex=false promo=true}
       </td>
     </tr>
   </table>