Merge branch 'master' into fusionax
[platal.git] / templates / profile / profile.tpl
index 25d28b6..9487465 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2009 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -125,7 +125,7 @@ function chgMainWinLoc(strPage)
       </div>
       {/if}
       {if $x.tels}
-        {display_phones tels=$x.tels}
+        {display_phones tels=$x.tels dcd=$x.dcd}
       {/if}
       <div class='spacer'></div>
     </div>
@@ -140,18 +140,19 @@ function chgMainWinLoc(strPage)
       {if $x.iso3166_3}
       <img src='images/flags/{$x.iso3166_3}.gif' alt='{$x.nationalite3}' height='11' title='{$x.nationalite3}' />&nbsp;
       {/if}
-      {$user->promo()}
-      {if $x.promo_sortie && ($x.promo_sortie-3 > $x.promo)}
-        - X {math equation="a-b" a=$x.promo_sortie b=3}
+      {$user->promo()}
+      {if $logged && $x.is_referent}
+      [<a href="referent/{$x.forlife}" class='popup2'>Ma fiche référent</a>]
       {/if}
       {if $x.education}
-        &nbsp;-&nbsp;Formation&nbsp;: {$x.education|smarty:nodefaults}
-      {/if}
-      {if $logged && $x.is_referent}
-      [<a href="referent/{$user->login()}" class='popup2'>Ma fiche référent</a>]
+        &nbsp;-&nbsp;Formation&nbsp;:
+        <ul>
+        {foreach from=$x.education item="edu"}
+          <li>{$edu|smarty:nodefaults}</li>
+        {/foreach}
+        </ul>
       {/if}
       {if $x.corps}
-        <br />
         {$x.corps|smarty:nodefaults}
       {/if}
     </div>
@@ -159,6 +160,11 @@ function chgMainWinLoc(strPage)
   {if $x.adr}
   <div class="part">
     <h2>Contact&nbsp;: </h2>
+    {if $x.dcd}
+      {assign var=address_name value="Dernière adresse"}
+    {else}
+      {assign var=address_name value="Adresse"}
+    {/if}
     {foreach from=$x.adr item="address" name=adresses}
       {if $smarty.foreach.adresses.iteration is even}
         {assign var=pos value="right"}
@@ -166,13 +172,13 @@ function chgMainWinLoc(strPage)
         {assign var=pos value="left"}
       {/if}
       {if $address.active}
-      {include file="geoloc/address.tpl" address=$address titre_div=true titre="Mon adresse actuelle&nbsp;:"
+      {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" actuelle&nbsp;:"
                for="`$x.prenom` `$x.nom`" pos=$pos}
       {elseif $address.secondaire}
-      {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse secondaire&nbsp;:"
+      {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" secondaire&nbsp;:"
                for="`$x.prenom` `$x.nom`" pos=$pos}
       {else}
-      {include file="geoloc/address.tpl" address=$address titre_div=true titre="Adresse principale&nbsp;:"
+      {include file="geoloc/address.tpl" address=$address titre_div=true titre=$address_name|@cat:" principale&nbsp;:"
                for="`$x.prenom` `$x.nom`" pos=$pos}
       {/if}
       {if $smarty.foreach.adresses.iteration is even}<div class="spacer"></div>{/if}