Merge remote branch 'origin/xorg/maint' into xorg/master
[platal.git] / templates / profile / base.tpl
index bfd56f1..cd11e40 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2011 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
+{assign var=isMe value=$smarty.session.user->isMyProfile($profile)}
+{if hasPerm('directory_private')}
+{assign var=viewPrivate value=true}
+{/if}
+
 <form action="{$wiz_baseurl}/{$lookup[$current]}" method="post" id="prof_annu">
   {xsrf_token_field}
   <div>
-    {icon name=information title="Voir ma fiche"} Tu peux consulter ta fiche telle que la
-    voient <a class="popup2" href="profile/{$smarty.session.forlife}?view=public">n'importe quel internaute</a>,
-    <a class="popup2" href="profile/{$smarty.session.forlife}?view=ax">l'AX</a> ou
-    <a class="popup2" href="profile/{$smarty.session.forlife}">les X</a>.
+    {icon name=information title="Voir ma fiche"} Tu peux consulter
+    {if $smarty.session.user->isMyProfile($profile)}ta{else}cette{/if} fiche telle que la
+    voient <a class="popup2" href="profile/{$profile->hrpid}?view=public">n'importe quel internaute</a>,
+    <a class="popup2" href="profile/{$profile->hrpid}?view=ax">l'AX</a>{if hasPerm('directory_private')}ou
+    <a class="popup2" href="profile/{$profile->hrpid}">les X</a>{/if}.
   </div>
   <div class="flags">
-  {include file="include/flags.radio.tpl" disabled=true withtext=true name="profile_ex_pub"}
+  {include file="include/flags.radio.tpl" disabled=true withtext=true val="novalue" name="profile_ex_pub"}
   </div>
   <div style="margin-top: 1em">
     {include file=$profile_page}