From 413b6645804efb872230c65154a6ca1737785b73 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sat, 26 Jun 2010 11:03:43 +0200 Subject: [PATCH] Restaures previous display of job phones (Closes #1157). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- plugins/function.display_address.php | 7 +++++-- templates/geoloc/address.tpl | 2 +- templates/profile/profile.tpl | 10 ++++------ 3 files changed, 10 insertions(+), 9 deletions(-) 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} -- 2.1.4