Fix networking display on profiles
[platal.git] / templates / profile / profile.tpl
index 0525acd..759bff1 100644 (file)
@@ -62,7 +62,8 @@ function chgMainWinLoc(strPage)
 
     {/if}
 
-    {assign var=networking value=$profile->getNetworking(0)}
+    {* 458752 stands for 0x70000 = Profile::NETWORKING_ALL *}
+    {assign var=networking value=$profile->getNetworking(458752)}
     {if count($networking) > 0}
       <h2>Sur le web...</h2>
       {foreach from=$networking item=network}
@@ -181,10 +182,10 @@ function chgMainWinLoc(strPage)
       {if $corps && ($corps->current || $corps->original)}
       <ul>
         {if $corps->current}
-          <li>Corps actuel&nbsp;: {$corps->current_name} {$corps->current_rank}
+          <li>Corps actuel&nbsp;: {$corps->current_name} {$corps->current_rank}</li>
         {/if}
         {if $corps->original}
-          <li>Corps d'origine&nbsp;: {$corps->original_name}
+          <li>Corps d'origine&nbsp;: {$corps->original_name}</li>
         {/if}
       </ul>
       {/if}
@@ -229,13 +230,11 @@ function chgMainWinLoc(strPage)
     {foreach from=$jobs item="job" key="i"}
       {if $i neq 0}<hr />{/if}
       {include file="include/emploi.tpl" job=$job}
+      {assign var=phones value=$job->phones()}
       {if $job->address()}
-        {include file="geoloc/address.tpl" address=$job->address() titre="Adresse&nbsp;: " for=$job->company->name pos="left"}
-      {elseif $job->company->address}
-        {include file="geoloc/address.tpl" address=$job->company->address titre="Addresse&nbsp;: " for=$job->company->name pos="left"}
-      {/if}
-      {if $job->phones()}
-        {display_phones tels=$job->phones()}
+        {include file="geoloc/address.tpl" address=$job->address() titre="Adresse&nbsp;: " for=$job->company->name pos="left" phones=$phones}
+      {elseif $phones}
+        {display_phones tels=$phones}
       {/if}
       <div class="spacer">&nbsp;</div>
     {/foreach}