From 33fbee51bdf06beffbe962691e8a31badc0aadcc Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Sun, 15 Sep 2013 19:09:22 +0200 Subject: [PATCH] ability to copy contact address to clipboard --- htdocs/core/lib/company.lib.php | 20 +++++++++++++------- htdocs/langs/en_US/main.lang | 1 + htdocs/langs/fr_FR/main.lang | 1 + 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 6b39670fb77..ffb8cb68618 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -537,7 +537,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print "\n".''."\n"; - $colspan=6; + $colspan=8; print ''; print ''; print ''; @@ -552,11 +552,16 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') $colspan++; print ''; } + if ($user->rights->societe->contact->creer) + { + $colspan++; + print ''; + } print ""; $sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays, p.poste, p.phone, p.phone_mobile, p.fax, p.email, p.statut "; - $sql .= ", p.address, p.zip, p.town"; + $sql .= ", p.civilite, p.address, p.zip, p.town"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p"; $sql .= " WHERE p.fk_soc = ".$object->id; $sql .= " ORDER by p.datec"; @@ -611,8 +616,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') $coords .= addslashes($obj->civilite).' '; if (!empty($obj->firstname)) $coords .= addslashes($obj->firstname).' '; - if (!empty($obj->name)) - $coords .= addslashes($obj->name); + if (!empty($obj->lastname)) + $coords .= addslashes($obj->lastname); $coords .= "
"; if (!empty($obj->address)) { @@ -634,7 +639,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') if (!empty($object->country)) $coords .= "
".addslashes($object->country); } - print ''; @@ -677,16 +682,17 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print "
\n"; ?> -
'.$langs->trans("Name").''.$langs->trans("Poste").'  
'; + print ''; print img_picto($langs->trans("Address"), 'object_address.png'); print '