Fixes names retrieval for accounts without profiles.
[platal.git] / templates / carnet / mescontacts.tpl
index 77a9bde..927dd77 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2010 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2011 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -47,7 +47,7 @@
   Sur la page de résultats d'une recherche, tu peux ajouter un contact en cliquant sur {icon name=add}.
 </p>
 
-{if $plset_count || $smarty.request.quick}
+{if $plset_count || t($smarty.request.quick)}
 <p>
   Tu peux télécharger des informations sur tes contacts&nbsp;:
 </p>
   </li>
   <li>
     Le calendrier des anniversaires&nbsp;:
-    <a href="carnet/contacts/ical/{$smarty.session.hruid}/{$smarty.session.token}/anniv-x.ics">
+    <a href="carnet/contacts/ical/{$smarty.session.hruid}/{$smarty.session.user->token}/anniv-x.ics">
       {icon name=calendar_view_day title='Anniversaires au format iCal'}
     </a>
-    <a href="carnet/contacts/csv/birthday/{$smarty.session.hruid}/{$smarty.session.token}/anniv-x.csv">
+    <a href="carnet/contacts/csv/birthday/{$smarty.session.hruid}/{$smarty.session.user->token}/anniv-x.csv">
       {icon name=outlook title='Anniversaires au format Outlook'}
     </a>
   </li>
@@ -75,7 +75,7 @@
       {icon name=vcard title='Carte de visite au format vCard'}
     </a>
     (<a href="carnet/contacts/vcard/MesContactsXorg.vcf">sans les photos</a>)
-    <a href="carnet/contacts/csv/{$smarty.session.hruid}/{$smarty.session.token}/MesContactsXorg.csv">
+    <a href="carnet/contacts/csv/{$smarty.session.hruid}/{$smarty.session.user->token}/MesContactsXorg.csv">
       {icon name=outlook title='Contacts au format Outlook'}
     </a>
   </li>
 <form action="carnet/contacts/search#plset_content" method="get">
   <div style="float: right">
       <input type="text" size="30" name="quick" class="quick_search"
-             value="{$smarty.request.quick|default:'recherche dans tes contacts'}"
+             value="{if t($smarty.request.quick)}{$smarty.request.quick}{else}recherche dans tes contacts{/if}"
              onfocus="if (this.value == 'recherche dans tes contacts') this.value=''"
              onblur="if (this.value == '') this.value='recherche dans tes contacts'"/>
-      <a href="carnet/contacts">{icon name=cross title='Annuler la recherche'}</a>
+      {if t($smarty.request.quick)}<a href="carnet/contacts">{icon name=arrow_undo title='Annuler la recherche'}</a>{/if}
   </div>
 </form>
 <p>