diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index bc29c67c244..e9aa0f98146 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -980,7 +980,7 @@ else print ''.$langs->trans("PhoneMobile").''; // Skype - if (! empty($conf->skype->enabled)) + if (! empty($conf->socialnetworks->enabled)) { print ''.$langs->trans("Skype").''; } @@ -1218,12 +1218,24 @@ else print ''.$langs->trans("PhoneMobile").'phone_mobile).'">'; // Skype - if (! empty($conf->skype->enabled)) + if (! empty($conf->socialnetworks->enabled)) { print ''.$langs->trans("Skype").'skype).'">'; } - // Birthday + // Twitter + if (! empty($conf->socialnetworks->enabled)) + { + print ''.$langs->trans("Twitter").'twitter).'">'; + } + + // Facebook + if (! empty($conf->socialnetworks->enabled)) + { + print ''.$langs->trans("Facebook").'facebook).'">'; + } + + // Birthday print "".$langs->trans("Birthday")."\n"; print $form->selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print "\n"; diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 04132fa9b75..cd536118f8e 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -68,6 +68,8 @@ $search_phone_mobile=GETPOST("search_phone_mobile",'alpha'); $search_fax=GETPOST("search_fax",'alpha'); $search_email=GETPOST("search_email",'alpha'); $search_skype=GETPOST("search_skype",'alpha'); +$search_twitter=GETPOST("search_twitter",'alpha'); +$search_facebook=GETPOST("search_facebook",'alpha'); $search_priv=GETPOST("search_priv",'alpha'); $search_categ=GETPOST("search_categ",'int'); $search_categ_thirdparty=GETPOST("search_categ_thirdparty",'int'); @@ -156,7 +158,9 @@ $arrayfields=array( 'p.phone_mobile'=>array('label'=>"PhoneMobile", 'checked'=>1), 'p.fax'=>array('label'=>"Fax", 'checked'=>0), 'p.email'=>array('label'=>"EMail", 'checked'=>1), - 'p.skype'=>array('label'=>"Skype", 'checked'=>1, 'enabled'=>(! empty($conf->skype->enabled))), + 'p.skype'=>array('label'=>"Skype", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), + 'p.twitter'=>array('label'=>"Twitter", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), + 'p.facebook'=>array('label'=>"Facebook", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), 'p.thirdparty'=>array('label'=>"ThirdParty", 'checked'=>1, 'enabled'=>empty($conf->global->SOCIETE_DISABLE_CONTACTS)), 'p.priv'=>array('label'=>"ContactVisibility", 'checked'=>1, 'position'=>200), 'p.datec'=>array('label'=>"DateCreationShort", 'checked'=>0, 'position'=>500), @@ -217,6 +221,8 @@ if (empty($reshook)) $search_fax=""; $search_email=""; $search_skype=""; + $search_twitter=""; + $search_facebook=""; $search_priv=""; $search_status=-1; $search_categ=''; @@ -311,6 +317,8 @@ if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_pho if (strlen($search_phone_mobile)) $sql.= natural_search('p.phone_mobile', $search_phone_mobile); if (strlen($search_fax)) $sql.= natural_search('p.fax', $search_fax); if (strlen($search_skype)) $sql.= natural_search('p.skype', $search_skype); +if (strlen($search_twitter)) $sql.= natural_search('p.twitter', $search_twitter); +if (strlen($search_facebook)) $sql.= natural_search('p.facebook', $search_facebook); if (strlen($search_email)) $sql.= natural_search('p.email', $search_email); if (strlen($search_zip)) $sql.= natural_search("p.zip",$search_zip); if ($search_status != '' && $search_status >= 0) $sql.= " AND p.statut = ".$db->escape($search_status); @@ -601,6 +609,18 @@ if (! empty($arrayfields['p.skype']['checked'])) print ''; print ''; } +if (! empty($arrayfields['p.twitter']['checked'])) +{ + print ''; + print ''; + print ''; +} +if (! empty($arrayfields['p.facebook']['checked'])) +{ + print ''; + print ''; + print ''; +} if (! empty($arrayfields['p.thirdparty']['checked'])) { print ''; @@ -671,6 +691,8 @@ if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field if (! empty($arrayfields['p.fax']['checked'])) print_liste_field_titre($arrayfields['p.fax']['label'],$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder); if (! empty($arrayfields['p.email']['checked'])) print_liste_field_titre($arrayfields['p.email']['label'],$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder); if (! empty($arrayfields['p.skype']['checked'])) print_liste_field_titre($arrayfields['p.skype']['label'],$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder); +if (! empty($arrayfields['p.twitter']['checked'])) print_liste_field_titre($arrayfields['p.twitter']['label'],$_SERVER["PHP_SELF"],"p.twitter", $begin, $param, '', $sortfield,$sortorder); +if (! empty($arrayfields['p.facebook']['checked'])) print_liste_field_titre($arrayfields['p.facebook']['label'],$_SERVER["PHP_SELF"],"p.facebook", $begin, $param, '', $sortfield,$sortorder); if (! empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($arrayfields['p.thirdparty']['label'],$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder); if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'],$_SERVER["PHP_SELF"],"p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder); // Extra fields @@ -801,7 +823,19 @@ while ($i < min($num,$limit)) // Skype if (! empty($arrayfields['p.skype']['checked'])) { - if (! empty($conf->skype->enabled)) { print ''.dol_print_skype($obj->skype,$obj->rowid,$obj->socid,'AC_SKYPE',18).''; } + if (! empty($conf->socialnetworks->enabled)) { print ''.dol_print_socialnetworks($obj->skype,$obj->rowid,$obj->socid,'skype').''; } + if (! $i) $totalarray['nbfield']++; + } + // Twitter + if (! empty($arrayfields['p.twitter']['checked'])) + { + if (! empty($conf->socialnetworks->enabled)) { print ''.dol_print_socialnetworks($obj->twitter,$obj->rowid,$obj->socid,'twitter').''; } + if (! $i) $totalarray['nbfield']++; + } + // Facebook + if (! empty($arrayfields['p.facebook']['checked'])) + { + if (! empty($conf->socialnetworks->enabled)) { print ''.dol_print_socialnetworks($obj->facebook,$obj->rowid,$obj->socid,'facebook').''; } if (! $i) $totalarray['nbfield']++; } // Company diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 6afd6b1e354..153c5ca9364 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -425,7 +425,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO if (empty($actiontypecode)) $actiontypecode='AC_OTH_AUTO'; // Event insert into agenda automatically $object->socid = $sendtosocid; // To link to a company - $object->sendtoid = $sendtoid; // To link to contacts/addresses. This is an array. + $object->sendtoid = $sendtoid; // To link to contact addresses. This is an array. $object->actiontypecode = $actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) $object->actionmsg = $actionmsg; // Long text $object->actionmsg2 = $actionmsg2; // Short text diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index a11cd3dd49e..76e2b1a093a 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -609,12 +609,23 @@ abstract class CommonObject $out.=dol_print_url($this->url,'_goout',0,1); $outdone++; } - if (! empty($conf->skype->enabled)) + $out.='
'; + if (! empty($conf->socialnetworks->enabled)) { - $out.='
'; - if ($this->skype) $out.=dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE'); + if ($this->skype) $out.=dol_print_socialnetworks($this->skype,$this->id,$object->id,'skype'); $outdone++; } + if (! empty($conf->socialnetworks->enabled)) + { + if ($this->twitter) $out.=dol_print_socialnetworks($this->twitter,$this->id,$object->id,'twitter'); + $outdone++; + } + if (! empty($conf->socialnetworks->enabled)) + { + if ($this->facebook) $out.=dol_print_socialnetworks($this->facebook,$this->id,$object->id,'facebook'); + $outdone++; + } + $out.='
'; $out.=''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4424d3fa904..8883d1ad89c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2189,50 +2189,52 @@ function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid= } /** - * Show Skype link + * Show social network link * - * @param string $skype Skype to show (only skype, without 'Name of recipient' before) + * @param string $value Skype to show (only skype, without 'Name of recipient' before) * @param int $cid Id of contact if known * @param int $socid Id of third party if known - * @param int $addlink 0=no link to create action - * @param int $max Max number of characters to show + * @param string $type 'skype','facebook',... * @return string HTML Link */ -function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64) +function dol_print_socialnetworks($value,$cid,$socid,$type) { global $conf,$user,$langs; - $newskype=$skype; + $newskype=$value; - if (empty($skype)) return ' '; + if (empty($value)) return ' '; - if (! empty($addlink)) + if (! empty($type)) { - $newskype =img_picto($langs->trans("Skype"), 'object_skype.png'); - $newskype.= ' '; - $newskype.=dol_trunc($skype,$max); - $newskype.= ' '; - $newskype.=''; - $newskype.=''; - $newskype.='   '; - $newskype.=''; - $newskype.=''; - - if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) + $newskype ='
'; + $newskype.=img_picto($langs->trans(strtoupper($type)), $type.'.png', '', false, 0, 0, '', 'paddingright'); + $newskype.=$value; + if ($type == 'skype') { - $type='AC_SKYPE'; $link=''; - if (! empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link=''.img_object($langs->trans("AddAction"),"calendar").''; - $newskype='
'.$newskype.($link?' '.$link:'').'
'; + $newskype.= ' '; + $newskype.=''; + $newskype.=''; + $newskype.=''; + $newskype.=''; + $newskype.=''; } + if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create && $type=='skype') + { + $addlink='AC_SKYPE'; $link=''; + if (! empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link=''.img_object($langs->trans("AddAction"),"calendar").''; + $newskype.=($link?' '.$link:''); + } + $newskype.='
'; } else { $langs->load("errors"); - $newskype.=img_warning($langs->trans("ErrorBadSkype",$skype)); + $newskype.=img_warning($langs->trans("ErrorBadSocialNetworkValue",$value)); } return $newskype; } @@ -3151,11 +3153,13 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ //if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on'))) if (empty($srconly) && in_array($pictowithoutext, array( 'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize', - 'note','switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow') - )) { + 'note','switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow', + 'skype','twitter','facebook' + ) + )) { $fakey = $pictowithoutext; $facolor = ''; $fasize = ''; - $marginleftonlyshort = 0; + $marginleftonlyshort = 2; if ($pictowithoutext == 'switch_off') { $fakey = 'fa-toggle-off'; $facolor = '#999'; @@ -3237,12 +3241,13 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ else { $fakey = 'fa-'.$pictowithoutext; $facolor = '#444'; + $marginleftonlyshort=0; } if (preg_match('/class="([^"]+)"/', $moreatt, $reg)) { $morecss.= ($morecss?' ':'').$reg[1]; } - $enabledisablehtml = ''; + $enabledisablehtml = ''; if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $enabledisablehtml.= $titlealt; } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 9d9abd92f4c..d4665bb4ccd 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -898,7 +898,7 @@ DictionaryVAT=VAT Rates or Sales Tax Rates DictionaryRevenueStamp=Amount of tax stamps DictionaryPaymentConditions=Payment terms DictionaryPaymentModes=Payment modes -DictionaryTypeContact=Contact/Address types +DictionaryTypeContact=Contact address types DictionaryTypeOfContainer=Type of website pages/containers DictionaryEcotaxe=Ecotax (WEEE) DictionaryPaperFormat=Paper formats @@ -1137,7 +1137,7 @@ ExtraFieldsLinesRec=Complementary attributes (templates invoices lines) ExtraFieldsSupplierOrdersLines=Complementary attributes (order lines) ExtraFieldsSupplierInvoicesLines=Complementary attributes (invoice lines) ExtraFieldsThirdParties=Complementary attributes (thirdparty) -ExtraFieldsContacts=Complementary attributes (contact/address) +ExtraFieldsContacts=Complementary attributes (contact address) ExtraFieldsMember=Complementary attributes (member) ExtraFieldsMemberType=Complementary attributes (member type) ExtraFieldsCustomerInvoices=Complementary attributes (invoices) @@ -1695,7 +1695,7 @@ ListOfNotificationsPerUser=List of notifications per user* ListOfNotificationsPerUserOrContact=List of notifications per user* or per contact** ListOfFixedNotifications=List of fixed notifications GoOntoUserCardToAddMore=Go on the tab "Notifications" of a user to add or remove notifications for users -GoOntoContactCardToAddMore=Go on the tab "Notifications" of a third party to add or remove notifications for contacts/addresses +GoOntoContactCardToAddMore=Go on the tab "Notifications" of a third party to add or remove notifications for contact addresses Threshold=Threshold BackupDumpWizard=Wizard to build database backup dump file SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason: diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index 4254c2cacaf..cc46e702a75 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -15,7 +15,7 @@ BoxLastSuppliers=Latest modified suppliers BoxLastCustomerOrders=Latest customer orders BoxLastActions=Latest actions BoxLastContracts=Latest contracts -BoxLastContacts=Latest contacts/addresses +BoxLastContacts=Latest contact addresses BoxLastMembers=Latest members BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance @@ -34,7 +34,7 @@ BoxTitleLastFicheInter=Latest %s modified interventions BoxTitleOldestUnpaidCustomerBills=Customer Invoices: oldest %s unpaid BoxTitleOldestUnpaidSupplierBills=Supplier Invoices: oldest %s unpaid BoxTitleCurrentAccounts=Open Accounts: balances -BoxTitleLastModifiedContacts=Contacts/Addresses: latest %s modified +BoxTitleLastModifiedContacts=Contact addresses: latest %s modified BoxMyLastBookmarks=Bookmarks: latest %s modified BoxOldestExpiredServices=Oldest active expired services BoxLastExpiredServices=Latest %s oldest contacts with active expired services diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index fbdd9685975..ef0328b9349 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -3,7 +3,7 @@ ErrorCompanyNameAlreadyExists=Company name %s already exists. Choose another one ErrorSetACountryFirst=Set the country first SelectThirdParty=Select a third party ConfirmDeleteCompany=Are you sure you want to delete this company and all inherited information? -DeleteContact=Delete a contact/address +DeleteContact=Delete a contact address ConfirmDeleteContact=Are you sure you want to delete this contact and all inherited information? MenuNewThirdParty=New Third Party MenuNewCustomer=New Customer @@ -19,9 +19,9 @@ ProspectionArea=Prospection area IdThirdParty=Id third party IdCompany=Company Id IdContact=Contact Id -Contacts=Contacts/Addresses -ThirdPartyContacts=Third party contacts -ThirdPartyContact=Third party contact/address +Contacts=Contact addresses +ThirdPartyContacts=Third party contact addresses +ThirdPartyContact=Third party contact address Company=Company CompanyName=Company name AliasNames=Alias name (commercial, trademark, ...) @@ -40,7 +40,7 @@ ThirdPartyCustomersWithIdProf12=Customers with %s or %s ThirdPartySuppliers=Vendors ThirdPartyType=Type of company Individual=Private individual -ToCreateContactWithSameName=Will create automatically a contact/address with same information as the third party under the third party. In most cases, even if your third party is a physical person, creating a third party alone is enough. +ToCreateContactWithSameName=Will create automatically a contact address with same information as the third party under the third party. In most cases, even if your third party is a physical person, creating a third party alone is enough. ParentCompany=Parent company Subsidiaries=Subsidiaries ReportByMonth=Report by month @@ -289,16 +289,16 @@ SupplierAbsoluteDiscountMy=Absolute vendor discounts (entered by yourself) DiscountNone=None Supplier=Vendor AddContact=Create contact -AddContactAddress=Create contact/address +AddContactAddress=Create contact address EditContact=Edit contact -EditContactAddress=Edit contact/address +EditContactAddress=Edit contact address Contact=Contact ContactId=Contact id -ContactsAddresses=Contacts/Addresses +ContactsAddresses=Contact addresses FromContactName=Name: NoContactDefinedForThirdParty=No contact defined for this third party NoContactDefined=No contact defined -DefaultContact=Default contact/address +DefaultContact=Default contact address AddThirdParty=Create third party DeleteACompany=Delete a company PersonalInformations=Personal data @@ -315,8 +315,8 @@ ValidityControledByModule=Validity controlled by module ThisIsModuleRules=This is rules for this module ProspectToContact=Prospect to contact CompanyDeleted=Company "%s" deleted from database. -ListOfContacts=List of contacts/addresses -ListOfContactsAddresses=List of contacts/addresses +ListOfContacts=List of contact addresses +ListOfContactsAddresses=List of contact addresses ListOfThirdParties=List of Third Parties ShowCompany=Show Third Party ShowContact=Show contact @@ -333,7 +333,7 @@ NoContactForAnyProposal=This contact is not a contact for any commercial proposa NoContactForAnyContract=This contact is not a contact for any contract NoContactForAnyInvoice=This contact is not a contact for any invoice NewContact=New contact -NewContactAddress=New Contact/Address +NewContactAddress=New Contact address MyContacts=My contacts Capital=Capital CapitalOf=Capital of %s @@ -390,7 +390,7 @@ NoDolibarrAccess=No Dolibarr access ExportDataset_company_1=Third Parties (companies/foundations/physical people) and their properties ExportDataset_company_2=Contacts and their properties ImportDataset_company_1=Third Parties (companies/foundations/physical people) and their properties -ImportDataset_company_2=Contacts/Addresses and attributes +ImportDataset_company_2=Contact addresses and attributes ImportDataset_company_3=Bank accounts of Third Parties ImportDataset_company_4=Third Parties - sales representatives (assign sales representatives/users to companies) PriceLevel=Price level @@ -409,7 +409,7 @@ YouMustCreateContactFirst=To be able to add email notifications, you must first ListSuppliersShort=List of Vendors ListProspectsShort=List of Prospects ListCustomersShort=List of Customers -ThirdPartiesArea=Third Parties/Contacts +ThirdPartiesArea=Third Parties and Contacts addresses area LastModifiedThirdParties=Last %s modified Third Parties UniqueThirdParties=Total of Third Parties InActivity=Open diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 8f9c49d8bff..6c6b31db764 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -99,7 +99,7 @@ MailSelectedRecipients=Selected recipients MailingArea=EMailings area LastMailings=Latest %s emailings TargetsStatistics=Targets statistics -NbOfCompaniesContacts=Unique contacts/addresses +NbOfCompaniesContacts=Unique contact addresses MailNoChangePossible=Recipients for validated emailing can't be changed SearchAMailing=Search mailing SendMailing=Send emailing @@ -138,7 +138,7 @@ NbOfTargetedContacts=Current number of targeted contact emails UseFormatFileEmailToTarget=Imported file must have format email;name;firstname;other UseFormatInputEmailToTarget=Enter a string with format email;name;firstname;other MailAdvTargetRecipients=Recipients (advanced selection) -AdvTgtTitle=Fill input fields to preselect the third parties or contacts/addresses to target +AdvTgtTitle=Fill input fields to preselect the third parties or contact addresses to target AdvTgtSearchTextHelp=Use %% as wildcards. For example to find all item like jean, joe, jim, you can input j%%, you can also use ; as separator for value, and use ! for except this value. For example jean;joe;jim%%;!jimo;!jima% will target all jean, joe, start with jim but not jimo and not everything that starts with jima AdvTgtSearchIntHelp=Use interval to select int or float value AdvTgtMinVal=Minimum value @@ -159,8 +159,8 @@ AdvTgtDeleteFilter=Delete filter AdvTgtSaveFilter=Save filter AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter -NoContactWithCategoryFound=No contact/address with a category found -NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found +NoContactWithCategoryFound=No contact address with a category found +NoContactLinkedToThirdpartieWithCategoryFound=No contact address with a category found OutGoingEmailSetup=Outgoing email setup InGoingEmailSetup=Incoming email setup OutGoingEmailSetupForEmailing=Outgoing email setup (for mass emailing) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index b1c51659b07..5a017330f20 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -434,7 +434,7 @@ LatestLinkedEvents=Latest %s linked events CompanyFoundation=Company/Organization Accountant=Accountant ContactsForCompany=Contacts for this third party -ContactsAddressesForCompany=Contacts/addresses for this third party +ContactsAddressesForCompany=Contact addresses for this third party AddressesForCompany=Addresses for this third party ActionsOnCompany=Events about this third party ActionsOnMember=Events about this member diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index f53a9042fca..0759008c435 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2014 Charles-Fr Benke * Copyright (C) 2015 Jean-François Ferry diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 82f50a5771c..bb43aa0af55 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -696,6 +696,9 @@ textarea.centpercent { height: 28px; vertical-align: middle; } +.divsocialnetwork:not(:first-child) { + padding-left: 20px; +} div.divsearchfield { float: ; margin-: 12px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 23575680acf..b347d305dd9 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -689,6 +689,9 @@ textarea.centpercent { height: 28px; vertical-align: middle; } +.divsocialnetwork:not(:first-child) { + padding-left: 20px; +} div.divsearchfield { float: ; margin-: 12px; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 888550a6408..9dee03e87c6 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1000,7 +1000,7 @@ if ($action == 'create' || $action == 'adduserldap') print ''; // Skype - if (! empty($conf->skype->enabled)) + if (! empty($conf->socialnetworks->enabled)) { print ''.$langs->trans("Skype").''; print ''; @@ -1011,7 +1011,41 @@ if ($action == 'create' || $action == 'adduserldap') } else { - print ''; + print ''; + } + print ''; + } + + // Twitter + if (! empty($conf->socialnetworks->enabled)) + { + print ''.$langs->trans("Twitter").''; + print ''; + if (! empty($ldap_twitter)) + { + print ''; + print $ldap_twitter; + } + else + { + print ''; + } + print ''; + } + + // Facebook + if (! empty($conf->socialnetworks->enabled)) + { + print ''.$langs->trans("Facebook").''; + print ''; + if (! empty($ldap_facebook)) + { + print ''; + print $ldap_facebook; + } + else + { + print ''; } print ''; } @@ -2195,7 +2229,7 @@ else print ''; // Skype - if (! empty($conf->skype->enabled)) + if (! empty($conf->socialnetworks->enabled)) { print ''.$langs->trans("Skype").''; print ''; @@ -2211,6 +2245,40 @@ else print ''; } + // Twitter + if (! empty($conf->socialnetworks->enabled)) + { + print ''.$langs->trans("Twitter").''; + print ''; + if ($caneditfield && empty($object->ldap_sid)) + { + print ''; + } + else + { + print ''; + print $object->twitter; + } + print ''; + } + + // Skype + if (! empty($conf->socialnetworks->enabled)) + { + print ''.$langs->trans("Facebook").''; + print ''; + if ($caneditfield && empty($object->ldap_sid)) + { + print ''; + } + else + { + print ''; + print $object->facebook; + } + print ''; + } + // EMail print "".'global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").''; print '';