2
0
forked from Wavyzz/dolibarr

The new banner tab is also on user card now

This commit is contained in:
Laurent Destailleur
2015-10-11 15:21:21 +02:00
parent db9d09c7a3
commit bd48ad265d
8 changed files with 150 additions and 124 deletions

View File

@@ -456,22 +456,28 @@ abstract class CommonObject
if ($this->elemet == 'contact')
{
$contactid=$this->id;
$thirdpartyid=$object->id;
$thirdpartyid=$object->fk_soc;
}
if ($this->elemet == 'user')
{
$contactid=$this->contact_id;
$thirdpartyid=$object->fk_soc;
}
$out='<!-- BEGIN part to show address block -->';
$outdone=0;
$coords = $this->getFullAddress(1,', ');
if (! empty($conf->use_javascript_ajax))
if ($coords)
{
$namecoords = $this->getFullName($langs,1).'<br>'.$coords;
// hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
$out.='<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.dol_escape_js($namecoords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
$out.=img_picto($langs->trans("Address"), 'object_address.png');
$out.='</a> ';
}
if ($coords) {
if (! empty($conf->use_javascript_ajax))
{
$namecoords = $this->getFullName($langs,1).'<br>'.$coords;
// hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
$out.='<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.dol_escape_js($namecoords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
$out.=img_picto($langs->trans("Address"), 'object_address.png');
$out.='</a> ';
}
$out.=dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1); $outdone++;
$outdone++;
}
@@ -483,8 +489,8 @@ abstract class CommonObject
$outdone++;
}
if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax) $out.=($outdone?'<br>':'');
if ($this->phone && empty($this->phone_pro)) { // For object storing pro phone into ->phone
if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax || $this->office_phone || $this->user_mobile || $this->office_fax) $out.=($outdone?'<br>':'');
if ($this->phone && empty($this->phone_pro)) { // For objects that store pro phone into ->phone
$out.=dol_print_phone($this->phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePro")); $outdone++;
}
if (! empty($this->phone_pro)) {
@@ -499,6 +505,15 @@ abstract class CommonObject
if (! empty($this->fax)) {
$out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX','&nbsp;','fax',$langs->trans("Fax")); $outdone++;
}
if (! empty($this->office_phone)) {
$out.=dol_print_phone($this->office_phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePro")); $outdone++;
}
if (! empty($this->user_mobile)) {
$out.=dol_print_phone($this->user_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhoneMobile")); $outdone++;
}
if (! empty($this->office_fax)) {
$out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX','&nbsp;','fax',$langs->trans("Fax")); $outdone++;
}
$out.='<div style="clear: both;"></div>';
$outdone=0;