diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 2b85004d862..872adda5ed7 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9,14 +9,14 @@ * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2010-2018 Juanjo Menent * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2021 Alexandre Spangaro * Copyright (C) 2014 Cédric GROSS * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2019 Thibault Foucart * Copyright (C) 2020 Open-Dsi - * Copyright (C) 2021 Gauthier VERDOL + * Copyright (C) 2021 Gauthier VERDOL * * 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 diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 93e1f560f5e..89463a535b3 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -181,6 +181,12 @@ ProfId3FR=Prof Id 3 (NAF, old APE) ProfId4FR=Prof Id 4 (RCS/RM) ProfId5FR=Prof Id 5 (numéro EORI) ProfId6FR=- +ProfId1ShortFR=SIREN +ProfId2ShortFR=SIRET +ProfId3ShortFR=NAF +ProfId4ShortFR=RCS +ProfId5ShortFR=EORI +ProfId6ShortFR=- ProfId1GB=Registration Number ProfId2GB=- ProfId3GB=SIC diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index e27ec6d9c43..b13e15b4a9f 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1060,6 +1060,7 @@ YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode Inventory=Inventory AnalyticCode=Analytic code TMenuMRP=MRP +ShowCompanyInfos=Show company infos ShowMoreInfos=Show More Infos NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index dd9662d4ceb..f18022f45d6 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -12,8 +12,9 @@ * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2020 Demarest Maxime - * Copyright (C) 2020 Charlene Benke + * Copyright (C) 2020 Charlene Benke * Copyright (C) 2021 Frédéric France + * Copyright (C) 2021 Alexandre Spangaro * * 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 @@ -1981,6 +1982,20 @@ function top_menu_user($hideloginname = 0, $urllogout = '') } $dropdownBody = ''; + $dropdownBody .= ' '.$langs->trans("ShowCompanyInfos").''; + $dropdownBody .= '
'; + + if (!empty($conf->global->MAIN_INFO_SIREN)) $dropdownBody .= '
'.$langs->transcountry("ProfId1Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_SIREN).''; + if (!empty($conf->global->MAIN_INFO_SIRET)) $dropdownBody .= '
'.$langs->transcountry("ProfId2Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_SIRET).''; + if (!empty($conf->global->MAIN_INFO_APE)) $dropdownBody .= '
'.$langs->transcountry("ProfId3Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_APE).''; + if (!empty($conf->global->MAIN_INFO_RCS)) $dropdownBody .= '
'.$langs->transcountry("ProfId4Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_RCS).''; + if (!empty($conf->global->MAIN_INFO_PROFID5)) $dropdownBody .= '
'.$langs->transcountry("ProfId5Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_PROFID5).''; + if (!empty($conf->global->MAIN_INFO_PROFID6)) $dropdownBody .= '
'.$langs->transcountry("ProfId6Short", $mysoc->country_code).': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_PROFID6).''; + if (!empty($conf->global->MAIN_INFO_TVAINTRA)) $dropdownBody .= '
'.$langs->trans("VATIntraShort").': '.showValueWithClipboardCPButton($conf->global->MAIN_INFO_TVAINTRA).''; + + $dropdownBody .= '
'; + + $dropdownBody .= '
'; $dropdownBody .= ' '.$langs->trans("ShowMoreInfos").''; $dropdownBody .= '
'; @@ -2137,6 +2152,10 @@ function top_menu_user($hideloginname = 0, $urllogout = '') $("#topmenu-login-dropdown").toggleClass("open"); }); + $("#topmenulogincompanyinfo-btn").on("click", function() { + $("#topmenulogincompanyinfo").slideToggle(); + }); + $("#topmenuloginmoreinfo-btn").on("click", function() { $("#topmenuloginmoreinfo").slideToggle(); });'; diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 871ee5aa68c..e0976e0e1db 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -277,14 +277,14 @@ a.top-menu-dropdown-link { text-decoration: none; } -#topmenuloginmoreinfo-btn{ +#topmenuloginmoreinfo-btn, #topmenulogincompanyinfo-btn { display: block; text-aling: right; color:#666; cursor: pointer; } -#topmenuloginmoreinfo{ +#topmenuloginmoreinfo, #topmenulogincompanyinfo { display: none; clear: both; font-size: 0.95em; diff --git a/htdocs/theme/md/dropdown.inc.php b/htdocs/theme/md/dropdown.inc.php index 9b96c9b061b..2627a727a23 100644 --- a/htdocs/theme/md/dropdown.inc.php +++ b/htdocs/theme/md/dropdown.inc.php @@ -283,14 +283,14 @@ a.top-menu-dropdown-link { text-decoration: none; } -#topmenuloginmoreinfo-btn{ +#topmenuloginmoreinfo-btn, #topmenulogincompanyinfo-btn { display: block; text-aling: right; color:#666; cursor: pointer; } -#topmenuloginmoreinfo{ +#topmenuloginmoreinfo, #topmenulogincompanyinfo { display: none; clear: both; font-size: 0.95em;