Merge pull request #7606 from dolibarr95/patch-23

NEW More picto for phone
This commit is contained in:
Laurent Destailleur 2017-10-11 11:51:07 +02:00 committed by GitHub
commit cf3dd4be12

View File

@ -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;
@ -6776,4 +6788,4 @@ function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='
if ($id > 0) return $id;
return '';
}
}
}