Content of popup tooltip on contact and login link

This commit is contained in:
Laurent Destailleur 2015-06-26 17:21:03 +02:00
parent 8f691138e8
commit 5584acddbd
6 changed files with 17 additions and 8 deletions

View File

@ -921,7 +921,11 @@ class Contact extends CommonObject
//if ($this->civility_id) $label.= '<br><b>' . $langs->trans("Civility") . ':</b> '.$this->civility_id; // TODO Translate cibilty_id code
$label.= '<br><b>' . $langs->trans("Poste") . ':</b> '.$this->poste;
$label.= '<br><b>' . $langs->trans("EMail") . ':</b> '.$this->email;
$label.= '<br><b>' . $langs->trans("Phone") . ':</b> '.join(', ',array($this->phone_pro,$this->phone_mobile,$this->phone_perso));
$phonelist=array();
if ($this->phone_pro) $phonelist[]=$this->phone_pro;
if ($this->phone_mobile) $phonelist[]=$this->phone_mobile;
if ($this->phone_pesro) $phonelist[]=$this->phone_perso;
$label.= '<br><b>' . $langs->trans("Phone") . ':</b> '.join(', ',$phonelist);
$label.= '<br><b>' . $langs->trans("Address") . ':</b> '.dol_format_address($this, 1, ' ', $langs);
$link = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';

View File

@ -131,7 +131,7 @@ $formother=new FormOther($db);
$sql = "SELECT s.rowid as socid, s.nom as name,";
$sql.= " p.rowid as cidp, p.lastname as lastname, p.statut, p.firstname, p.poste, p.email, p.skype,";
$sql.= " p.phone, p.phone_mobile, p.fax, p.fk_pays, p.priv, p.tms,";
$sql.= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.tms,";
$sql.= " co.code as country_code";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = p.fk_pays";
@ -311,7 +311,7 @@ if ($result)
print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"p.tms", $begin, $param, 'align="center"', $sortfield,$sortorder);
print_liste_field_titre($langs->trans("ContactVisibility"),$_SERVER["PHP_SELF"],"p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut", $begin, $param, 'align="center"', $sortfield,$sortorder);
print '<td class="liste_titre">&nbsp;</td>';
print_liste_field_titre('');
print "</tr>\n";
// Ligne des champs de filtres
@ -377,6 +377,10 @@ if ($result)
$contactstatic->firstname='';
$contactstatic->id=$obj->cidp;
$contactstatic->statut=$obj->statut;
$contactstatic->poste=$obj->poste;
$contactstatic->phone_pro=$obj->phone_pro;
$contactstatic->phone_perso=$obj->phone_perso;
$contactstatic->phone_mobile=$obj->phone_mobile;
print $contactstatic->getNomUrl(1,'',20);
print '</td>';
@ -403,7 +407,7 @@ if ($result)
}
// Phone
print '<td>'.dol_print_phone($obj->phone,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
print '<td>'.dol_print_phone($obj->phone_pro,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
// Phone mobile
print '<td>'.dol_print_phone($obj->phone_mobile,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
// Fax

View File

@ -5146,11 +5146,11 @@ class Form
*/
global $dolibarr_main_url_root;
$ret.='<!-- Put link to gravatar -->';
$ret.='<img class="photo'.$modulepart.'" alt="Gravatar avatar" title="'.$email.' Gravatar avatar" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="https://www.gravatar.com/avatar/'.dol_hash(strtolower(trim($email)),3).'?s='.$width.'&d='.urlencode(dol_buildpath($nophoto,2)).'">'; // gravatar need md5 hash
$ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="Gravatar avatar" title="'.$email.' Gravatar avatar" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="https://www.gravatar.com/avatar/'.dol_hash(strtolower(trim($email)),3).'?s='.$width.'&d='.urlencode(dol_buildpath($nophoto,2)).'">'; // gravatar need md5 hash
}
else
{
$ret.='<img class="photo'.$modulepart.'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.$nophoto.'">';
$ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.$nophoto.'">';
}
}

View File

@ -1442,6 +1442,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$toprightmenu.=$user->getPhotoUrl(16,16,'loginphoto');
$toprightmenu.='</div></div>';
// Login name with tooltip
$toprightmenu.='<div class="inline-block nowrap"><div class="inline-block login_block_elem" style="padding: 0px;">';
$toprightmenu.=$user->getNomurl(0, '', true, 0, 11);
$toprightmenu.='</div></div>';

View File

@ -2551,7 +2551,7 @@ div.dolgraph div.legend table tbody tr { height: auto; }
}
.photowithmargin {
margin-bottom: 2px;
margin-top: 2px;
margin-top: 10px;
}
.photowithmargin {
-webkit-box-shadow: 0px 0px 3px #777;

View File

@ -1855,7 +1855,7 @@ class User extends CommonObject
if (! empty($this->photo))
{
$label.= '<div class="photointooltip">';
$label.= Form::showphoto('userphoto', $this, 80);
$label.= Form::showphoto('userphoto', $this, 80, 0, 0, 'photowithmargin photologintooltip');
$label.= '</div><div style="clear: both;"></div>';
}