From: Stéphane Jacob Date: Sat, 26 Jun 2010 09:03:43 +0000 (+0200) Subject: Restaures previous display of job phones (Closes #1157). X-Git-Tag: xorg/1.0.0~24 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=413b6645804efb872230c65154a6ca1737785b73;p=platal.git Restaures previous display of job phones (Closes #1157). Signed-off-by: Stéphane Jacob --- diff --git a/plugins/function.display_address.php b/plugins/function.display_address.php index 55c1f16..2294f2c 100644 --- a/plugins/function.display_address.php +++ b/plugins/function.display_address.php @@ -87,9 +87,12 @@ function smarty_function_display_address($param, &$smarty) { $txthtml .= "" . pl_entities($line) . "
\n"; } - if($adr->phones() != null) { - require_once('function.display_phones.php'); + if ($adr->phones() != null) { + require_once 'function.display_phones.php'; $txthtml .= smarty_function_display_phones(array('tels' => $adr->phones()),$smarty); + } else if ($param['phones'] != null) { + require_once 'function.display_phones.php'; + $txthtml .= smarty_function_display_phones(array('tels' => $param['phones']),$smarty); } if (!$param['nodiv']) { $pos = $param['pos'] ? " style='float: " . $param['pos'] . "'" : ''; diff --git a/templates/geoloc/address.tpl b/templates/geoloc/address.tpl index 0cf9eec..e21a395 100644 --- a/templates/geoloc/address.tpl +++ b/templates/geoloc/address.tpl @@ -20,6 +20,6 @@ {* *} {**************************************************************************} -{display_address adr=$address titre=$titre titre_div=$titre_div no_div=$no_div for=$for pos=$pos} +{display_address adr=$address titre=$titre titre_div=$titre_div no_div=$no_div for=$for pos=$pos phones=$phones} {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} diff --git a/templates/profile/profile.tpl b/templates/profile/profile.tpl index 0525acd..6576785 100644 --- a/templates/profile/profile.tpl +++ b/templates/profile/profile.tpl @@ -229,13 +229,11 @@ function chgMainWinLoc(strPage) {foreach from=$jobs item="job" key="i"} {if $i neq 0}
{/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 : " for=$job->company->name pos="left"} - {elseif $job->company->address} - {include file="geoloc/address.tpl" address=$job->company->address titre="Addresse : " 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 : " for=$job->company->name pos="left" phones=$phones} + {elseif $phones} + {display_phones tels=$phones} {/if}
 
{/foreach}