Merge pull request #12226 from ptibogxiv/patch-271

NEW add office phone & job on user tooltips
This commit is contained in:
Laurent Destailleur 2019-10-30 03:11:28 +01:00 committed by GitHub
commit 488edec3a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -1865,7 +1865,7 @@ class Societe extends CommonObject
$reparray=array();
$sql = "SELECT DISTINCT u.rowid, u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo";
$sql = "SELECT DISTINCT u.rowid, u.login, u.lastname, u.firstname, u.office_phone, u.job, u.email, u.statut, u.entity, u.photo";
$sql.= " FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc, ".MAIN_DB_PREFIX."user as u";
if (! empty($conf->multicompany->enabled) && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
{
@ -1894,6 +1894,8 @@ class Societe extends CommonObject
$reparray[$i]['lastname']=$obj->lastname;
$reparray[$i]['firstname']=$obj->firstname;
$reparray[$i]['email']=$obj->email;
$reparray[$i]['phone']=$obj->office_phone;
$reparray[$i]['job']=$obj->job;
$reparray[$i]['statut']=$obj->statut;
$reparray[$i]['entity']=$obj->entity;
$reparray[$i]['login']=$obj->login;

View File

@ -42,6 +42,8 @@ if ($nbofsalesrepresentative > 0)
$userstatic->statut=$val['statut'];
$userstatic->photo=$val['photo'];
$userstatic->email=$val['email'];
$userstatic->phone=$val['phone'];
$userstatic->job=$val['job'];
$userstatic->entity=$val['entity'];
print $userstatic->getNomUrl(-1);
print ' ';

View File

@ -2320,9 +2320,10 @@ class User extends CommonObject
$label.= '<div class="centpercent">';
$label.= '<u>' . $langs->trans("User") . '</u><br>';
$label.= '<b>' . $langs->trans('Name') . ':</b> ' . $this->getFullName($langs, '');
if (! empty($this->login))
$label.= '<br><b>' . $langs->trans('Login') . ':</b> ' . $this->login;
$label.= '<br><b>' . $langs->trans("EMail").':</b> '.$this->email;
if (! empty($this->login)) $label.= '<br><b>' . $langs->trans('Login') . ':</b> ' . $this->login;
if (! empty($this->job)) $label.= '<br><b>' . $langs->trans("Job").':</b> '.$this->job;
$label.= '<br><b>' . $langs->trans("Email").':</b> '.$this->email;
if (! empty($this->phone)) $label.= '<br><b>' . $langs->trans("Phone").':</b> '.$this->phone;
if (! empty($this->admin))
$label.= '<br><b>' . $langs->trans("Administrator").'</b>: '.yn($this->admin);
if (! empty($this->socid) ) // Add thirdparty for external users