Skip to content

Commit

Permalink
Merge pull request #7606 from dolibarr95/patch-23
Browse files Browse the repository at this point in the history
NEW More picto for phone
  • Loading branch information
eldy committed Oct 11, 2017
2 parents acc83db + 572a64b commit cf3dd4b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions htdocs/core/lib/functions.lib.php
Expand Up @@ -2194,9 +2194,21 @@ function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$sep
$titlealt=($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone"));
}
$rep='';
$picto = '';
if($withpicto){
if($withpicto=='fax'){
$picto = 'phoning_fax';
}elseif($withpicto=='phone'){
$picto = 'phoning';
}elseif($withpicto=='mobile'){
$picto = 'phoning_mobile';
}else{
$picto = '';
}
}
if ($adddivfloat) $rep.='<div class="nospan float" style="margin-right: 10px">';
else $rep.='<span style="margin-right: 10px;">';
$rep.=($withpicto?img_picto($titlealt, 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone;
$rep.=($withpicto?img_picto($titlealt, 'object_'.$picto.'.png').' ':'').$newphone;
if ($adddivfloat) $rep.='</div>';
else $rep.='</span>';
return $rep;
Expand Down Expand Up @@ -6776,4 +6788,4 @@ function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='
if ($id > 0) return $id;
return '';
}
}
}

0 comments on commit cf3dd4b

Please sign in to comment.