diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 2db5523c5bd..35ad3b8c3a1 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -4,10 +4,10 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -773,11 +773,14 @@ else print ''; - // Ref - print ''; - + // Ref/ID + if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) + { + print ''; + } + // Lastname print ''; print ''; @@ -1040,23 +1043,34 @@ else } - print '
'.$langs->trans("Ref").''; - print $object->ref; - print '
'.$langs->trans("ID").''; + print $object->ref; + print '
lastname).'" autofocus="autofocus">
'; - $linkback = ''.$langs->trans("BackToList").''; + + $morehtmlref=$object->getFullName($langs); + + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + + print '
'; + print '
'; + + print '
'; + print '
'; + // Ref - print ''; // Name print ''; print ''; - + */ + // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { - print ''; } - + */ + print ''; // Civility - print ''; // Role - print ''; + print ''; // Address + /* print ''; @@ -1112,68 +1129,72 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; - } + print ''; + }*/ // Phone + /* print ''; print ''; print ''; print ''; - + */ + // Email - print ''; + //print ''; if (! empty($conf->mailing->enabled)) { $langs->load("mails"); - print ''; - print ''; + print ''; + print ''; } - else - { - print ''; - } - print ''; // Instant message and no email - print ''; + print ''; if (!empty($conf->mailing->enabled)) { - print ''; + print ''; } - else - { - print ''; - } - print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; } - print ''; // Note Public - print ''; // Note Private - print ''; + print ''; + */ + + print '
'.$langs->trans("Ref").''; + /*print '
'.$langs->trans("Ref").''; print $form->showrefnav($object, 'id', $linkback); print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$object->lastname.''.$langs->trans("Firstname").''.$object->firstname.'
'.$langs->trans("ThirdParty").''; + print '
'.$langs->trans("ThirdParty").''; if ($object->socid > 0) { $objsoc->fetch($object->socid); @@ -1070,6 +1084,7 @@ else } // Photo + /* if ($object->photo) { print ''; @@ -1080,18 +1095,20 @@ else print ' '; print '
'.$langs->trans("UserTitle").''; + print '
'.$langs->trans("UserTitle").''; print $object->getCivilityLabel(); print '
'.$langs->trans("PostOrFunction").''.$object->poste.'
'.$langs->trans("PostOrFunction").''.$object->poste.'
'.$langs->trans("Address").''; dol_print_address($object->address,'gmap','contact',$object->id); print '
'.$langs->trans('State').''.$object->state.'
'.$langs->trans('State').''.$object->state.'
'.$langs->trans("PhonePro").''.dol_print_phone($object->phone_pro,$object->country_code,$object->id,$object->socid,'AC_TEL').''.$langs->trans("PhonePerso").''.dol_print_phone($object->phone_perso,$object->country_code,$object->id,$object->socid,'AC_TEL').'
'.$langs->trans("PhoneMobile").''.dol_print_phone($object->phone_mobile,$object->country_code,$object->id,$object->socid,'AC_TEL').''.$langs->trans("Fax").''.dol_print_phone($object->fax,$object->country_code,$object->id,$object->socid,'AC_FAX').'
'.$langs->trans("EMail").''.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').'
'.$langs->trans("EMail").''.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').'
'.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
'.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
 
'.$langs->trans("IM").''.$object->jabberid.'
'.$langs->trans("IM").''.$object->jabberid.'
'.$langs->trans("No_Email").''.yn($object->no_email).'
'.$langs->trans("No_Email").''.yn($object->no_email).'
 
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'.$langs->trans("ContactVisibility").''; + print '
'.$langs->trans("ContactVisibility").''; print $object->LibPubPriv($object->priv); print '
'.$langs->trans("NotePublic").''; + /* + print '
'.$langs->trans("NotePublic").''; print nl2br($object->note_public); print '
'.$langs->trans("NotePrivate").''; + print '
'.$langs->trans("NotePrivate").''; print nl2br($object->note_private); - - // Statut - print '
'.$langs->trans("Status").'
'; + + print ''; + print '
'; + + print '
'; + print ''; + + // Statut + /*print ''; print ''; print ''."\n"; - + */ + // Categories if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) { print ''; @@ -1240,7 +1261,10 @@ else print ''; print "
'.$langs->trans("Status").''; print $object->getLibStatut(4); print '
' . $langs->trans( "Categories" ) . '
"; - + + print '
'; + print '
'; + print dol_fiche_end(); // Barre d'actions diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 76fd73a324d..7ca7627333d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -446,9 +446,19 @@ abstract class CommonObject $countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); - $out=''; + $contacti=0; + $thirdpartyid=0; + if ($this->elemet == 'societe') + { + $thirdpartyid=$this->id; + } + if ($this->elemet == 'contact') + { + $contactid=$this->id; + $thirdpartyid=$object->id; + } - $out.=''; + $out=''; $outdone=0; $coords = $this->getFullAddress(1,', '); @@ -471,19 +481,22 @@ abstract class CommonObject $out.=($outdone?'
':'').$this->state; $outdone++; } - + if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax) $out.=($outdone?'
':''); - if ($this->phone_pro) { - $out.=dol_print_phone($this->phone_pro,$country_code['code'],$this->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; + if ($this->phone && empty($this->phone_pro)) { // For object storing pro phone into ->phone + $out.=dol_print_phone($this->phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++; } - if ($this->phone_mobile) { - $out.=dol_print_phone($this->phone_mobile,$country_code['code'],$this->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; + if (! empty($this->phone_pro)) { + $out.=dol_print_phone($this->phone_pro,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++; } - if ($this->phone_perso) { - $out.=dol_print_phone($this->phone_perso,$country_code['code'],$this->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; + if (! empty($this->phone_mobile)) { + $out.=dol_print_phone($this->phone_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhoneMobile")); $outdone++; } - if ($this->fax) { - $out.=dol_print_phone($this->fax,$country_code['code'],$this->rowid,$object->id,'AC_FAX',' ','fax'); $outdone++; + if (! empty($this->phone_perso)) { + $out.=dol_print_phone($this->phone_perso,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePerso")); $outdone++; + } + if (! empty($this->fax)) { + $out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX',' ','fax',$langs->trans("Fax")); $outdone++; } $out.='
'; @@ -503,7 +516,7 @@ abstract class CommonObject if ($this->skype) $out.=($outdone?'
':'').dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE'); } - $out.=''; + $out.=''; return $out; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 4aea23291c2..8dd0725b1b8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5152,7 +5152,16 @@ class Form $ret.='
'; - $ret.=dol_htmlentities($object->$fieldref); + // For thirdparty and contact, the ref is he id, so we show something else + if ($object->element == 'societe') + { + $ret.=dol_htmlentities($object->name); + } + else if ($object->element == 'contact') + { + $ret.=dol_htmlentities($object->getFullName($langs)); + } + else $ret.=dol_htmlentities($object->$fieldref); if ($morehtmlref) { $ret.=' '.$morehtmlref; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index d7fbaedfeba..565078a9d3b 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -706,7 +706,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') $contactstatic->web = $obj->web; $contactstatic->skype = $obj->skype; - $country_code = getCountry($obj->country_id, 'all'); + $country_code = getCountry($obj->country_id, 2); $contactstatic->country_code = $country_code; print ""; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a319b193662..627a9aaffca 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -858,27 +858,40 @@ function dol_get_fiche_end($notab=0) */ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlright='') { - global $conf, $form, $user; + global $conf, $form, $user, $langs; //$showlogo=$object->logo; $showlogo=1; $showbarcode=empty($conf->barcode->enabled)?0:1; if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0; - + $modulepart='societe'; + if ($object->element == 'contact') $modulepart='contact'; + if ($object->element == 'member') $modulepart='memberphoto'; + if ($object->element == 'user') $modulepart='userphoto'; + print '
'; //$morehtmlleft='
'.img_picto('', 'title_companies', '', '').'
'; - if ($showlogo) $morehtmlleft.='
'.$form->showphoto('societe',$object,0,0,0,'photoref').'
'; + if ($showlogo) $morehtmlleft.='
'.$form->showphoto($modulepart,$object,0,0,0,'photoref').'
'; //if ($showlogo) $morehtmlleft.='
'.$form->showphoto('societe',$object,0,0,0,'photoref').'
'; if ($showbarcode) $morehtmlleft.='
'.$form->showbarcode($object).'
'; - if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { - $morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); - } else { - $morehtmlright.=$object->getLibStatut(2); + if ($object->element == 'societe') + { + if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { + $morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); + } else { + $morehtmlright.=$object->getLibStatut(2); + } } if (! empty($object->name_nalias)) $morehtmlref.='
'.$object->name_alias.'
'; $morehtmlref.='
'; $morehtmlref.=$object->getBannerAddress('refaddress',$object); $morehtmlref.='
'; + if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && in_array($object->element, array('societe', 'contact', 'member'))) + { + $morehtmlref.='
'; + $morehtmlref.=$langs->trans("TechnicalID").': '.$object->id; + $morehtmlref.='
'; + } print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright); print '
'; print '
'; @@ -1484,12 +1497,13 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64) * @param string $country Country code to use for formatting * @param int $cid Id of contact if known * @param int $socid Id of third party if known - * @param string $addlink ''=no link to create action, 'AC_TEL'=add link to clicktodial (if module enabled) and add link to create event (if conf->global->AGENDA_ADDACTIONFORPHONE set) + * @param string $addlink ''=no link to create action, 'AC_TEL'=add link to clicktodial (if module enabled) and add link to create event (if conf->global->AGENDA_ADDACTIONFORPHONE set) * @param string $separ Separation between numbers for a better visibility example : xx.xx.xx.xx.xx * @param string $withpicto Show picto + * @param string $titlealt Text to show on alt * @return string Formated phone number */ -function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" ",$withpicto='') +function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" ",$withpicto='',$titlealt='') { global $conf,$user,$langs,$mysoc; @@ -1569,7 +1583,11 @@ function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" } } - return '
'.($withpicto?img_picto(($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone")), 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone.'
'; + if (empty($titlealt)) + { + $titlealt=($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone")); + } + return '
'.($withpicto?img_picto($titlealt, 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone.'
'; } /** diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 0bd4fa7431b..ce3f8edc0d8 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -97,6 +97,7 @@ DolibarrHasDetectedError=Dolibarr has detected a technical error InformationToHelpDiagnose=This is information that can help diagnostic MoreInformation=More information TechnicalInformation=Technical information +TechnicalID=Technical ID NotePublic=Note (public) NotePrivate=Note (private) PrecisionUnitIsLimitedToXDecimals=Dolibarr was setup to limit precision of unit prices to %s decimals. diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 9c8f4c90aa5..a603f52e226 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1447,6 +1447,14 @@ else print ''; + // Ref/ID + if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) + { + print ''; + } + // Name print ''; print ''; @@ -2140,7 +2148,7 @@ else } elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1") { - print ''; if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1))) @@ -2162,7 +2170,7 @@ else } elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1") { - print ''; if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2))) @@ -2325,7 +2333,7 @@ else if (! empty($conf->adherent->enabled)) { $langs->load("members"); - print ''; + print ''; print '
'.$langs->trans("ID").''; + print $object->ref; + print '
'.fieldLabel('ThirdPartyName','name',1).'
'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; + print '
'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; print yn($object->localtax1_assuj); print '
'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print '
'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; print yn($object->localtax2_assuj); print '
'.$langs->trans("LinkedToDolibarrMember").'
'.$langs->trans("LinkedToDolibarrMember").''; $adh=new Adherent($db); $result=$adh->fetch('','',$object->id); @@ -2349,8 +2357,9 @@ else } print '
'; - - print '
'; + print ''; + + print ''; print '
'; dol_fiche_end(); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index ed6c1291ef5..7aa68f69340 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -623,7 +623,7 @@ div.divphotoref { div.statusref { float: right; padding-right: 12px; - margin-top: 9px; + margin-top: 7px; margin-bottom: 10px; } img.photoref { @@ -2132,11 +2132,15 @@ div.pagination li.pagination span.inactive { cursor: default; } div.pagination li.litext a { -border: none; + border: none; padding-right: 10px; padding-left: 4px; font-weight: bold; } +div.pagination li.litext a:hover { + background-color: transparent; + background-image: none; +} dol_use_jmobile)) { ?> div.pagination li.litext { padding-top: 13px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f909915d794..161ca0113eb 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -673,7 +673,7 @@ div.divphotoref { div.statusref { float: right; padding-right: 12px; - margin-top: 9px; + margin-top: 7px; margin-bottom: 10px; } img.photoref {