migrate fiche_referent -> profile/referent/${username}
[platal.git] / templates / fiche.tpl
index 3d1126d..132ad0e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2004 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2006 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {literal}
 <script type="text/javascript">
 function chgMainWinLoc( strPage ) {
-  parent.opener.document.location = strPage;
+  if (parent.opener) {
+    parent.opener.document.location = strPage;
+  } else {
+    document.location = strPage;
+  }
 }
 </script>
 {/literal}
 
+{if $logged and $x.forlife eq $smarty.session.forlife}
+[<a href="javascript:x()" onclick="chgMainWinLoc('{rel}/profil.php')">Modifier ma fiche</a>]
+{/if}
+
 <table id="fiche" cellpadding="0" cellspacing="0">
   <tr>
     <td id="fiche_identite">
@@ -36,15 +44,15 @@ function chgMainWinLoc( strPage ) {
         {$x.prenom} {if $x.nom_usage eq ""}{$x.nom}{else}{$x.nom_usage} ({$x.nom}){/if}
         {if $logged}
         {if $x.nickname} (aka {$x.nickname}){/if}&nbsp;
-        <a href="vcard.php/{$x.forlife}.vcf?x={$x.forlife}">
+        <a href="vcard/{$x.forlife}.vcf">
           <img src="images/vcard.png" alt="Afficher la carte de visite" title="Afficher la carte de visite"/>
         </a>
         {if !$x.is_contact}
-        <a href="javascript:x()"  onclick="chgMainWinLoc('{rel}/carnet/mescontacts.php?action=ajouter&amp;user={$x.forlife}')">
+        <a href="javascript:x()"  onclick="chgMainWinLoc('{rel}/carnet/contacts?action=ajouter&amp;user={$x.forlife}')">
           <img src="images/ajouter.gif" alt="Ajouter à mes contacts" title="Ajouter à mes contacts" />
         </a>
         {else}
-        <a href="javascript:x()"  onclick="chgMainWinLoc('{rel}/carnet/mescontacts.php?action=retirer&amp;user={$x.forlife}')">
+        <a href="javascript:x()"  onclick="chgMainWinLoc('{rel}/carnet/contacts?action=retirer&amp;user={$x.forlife}')">
           <img src="images/retirer.gif" alt="Retirer de mes contacts" title="Retirer de mes contacts" />
         </a>
         {/if}
@@ -74,7 +82,7 @@ function chgMainWinLoc( strPage ) {
           <a href="mailto:{$virtualalias}">{$virtualalias}</a><br />
           {/if}
           <a href="mailto:{$x.bestalias}@polytechnique.org">{$x.bestalias}@polytechnique.org</a>
-          {if $bestalias neq $x.forlife}<br />
+          {if $x.bestalias neq $x.forlife}<br />
           <a href="mailto:{$x.forlife}@polytechnique.org">{$x.forlife}@polytechnique.org</a>
           {/if}
           {/if}
@@ -88,7 +96,7 @@ function chgMainWinLoc( strPage ) {
       {/if}
       <div class='formation'>
         {if $x.iso3166}
-        <img src='{rel}/images/flags/{$x.iso3166}.gif' alt='{$x.nationalite}' height='14' title='{$x.nationalite}' />&nbsp;
+        <img src='{rel}/images/flags/{$x.iso3166}.gif' alt='{$x.nationalite}' height='11' title='{$x.nationalite}' />&nbsp;
         {/if}
         X {$x.promo}
         {if ($x.promo_sortie-3 > $x.promo)}
@@ -99,7 +107,7 @@ function chgMainWinLoc( strPage ) {
         {/if}
         {if $logged}
         {if $x.is_referent}
-        [<a href="fiche_referent.php?user={$x.forlife}" class='popup2'>Ma fiche référent</a>]
+        [<a href="{rel}/profile/referent/{$x.forlife}" class='popup2'>Ma fiche référent</a>]
         {/if}
         {/if}
       </div>