Merge remote branch 'origin/platal-1.0.0'
[platal.git] / templates / profile / profile.tpl
index 4402224..63efbf6 100644 (file)
@@ -42,7 +42,7 @@ function chgMainWinLoc(strPage)
 <div id="fiche">
   <div id="photo" class="part">
     {assign var=photo value=$profile->getPhoto(false)}
-    {if $photo}<img alt="Photo de {$profile->fullName()}" src="photo/{$profile->hrid()}" width="{$photo->width()}"/>{/if}
+    {if $photo}<img alt="Photo de {$profile->fullName()}" src="photo/{$profile->hrid()}{if $with_pending_pic}/req{/if}" width="{$photo->width()}"/>{/if}
 
     {if $logged && $view eq 'private' && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($owner && $owner->groups()|smarty:nodefaults))}
       <h2>À l'X&hellip;</h2>
@@ -87,10 +87,7 @@ function chgMainWinLoc(strPage)
   <div id="fiche_identite" class="part">
     <div class="civilite">
       {if $profile->isFemale()}&bull;{/if}
-        <span {if $profile->name_tooltip neq ""}class="hinted" title="{$profile->name_tooltip}"{/if}>{$profile->shortName()}</span>
-      {if $logged}
-        {if $profile->nickname} (alias {$profile->nickname}){/if}
-      {/if}
+        {if $logged}{$profile->private_name}{else}{$profile->public_name}{/if}
 
       {if $logged}
         &nbsp;{if !$profile->isDead()}<a href="vcard/{$owner->login()}.vcf">{*
@@ -158,8 +155,8 @@ function chgMainWinLoc(strPage)
     {/if}
 
     <div class='formation'>
-      {foreach from=$profile->nationalities() item=nat}
-        <img src='images/flags/{$nat}.gif' alt='{$nat}' height='11' title='{$nat}' />&nbsp;
+      {foreach from=$profile->nationalities() item=country key=code}
+      <img src='images/flags/{$code}.gif' alt='{$code}' height='11' title='{$country}' />&nbsp;
       {/foreach}
 
       {$profile->promo()}
@@ -180,14 +177,17 @@ function chgMainWinLoc(strPage)
 
       {assign var=corps value=$profile->getCorps()}
       {if $corps && ($corps->current || $corps->original)}
-      <ul>
+        <ul>
         {if $corps->current}
-          <li>Corps actuel&nbsp;: {$corps->current_name} {$corps->current_rank}</li>
+          <li>
+            Corps actuel&nbsp;: {$corps->current_name}
+            {if $corps->current_rank}({$corps->current_rank}){/if}
+          </li>
         {/if}
-        {if $corps->original}
+        {if $corps->current != $corps->original && $corps->original}
           <li>Corps d'origine&nbsp;: {$corps->original_name}</li>
         {/if}
-      </ul>
+        </ul>
       {/if}
 
     </div>