mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-11 12:01:23 +01:00
NEW: Add company info in dropdown login menu
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
@@ -3537,7 +3537,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'object_salary', 'object_shipment', 'object_share-alt', 'object_supplier_invoice', 'object_supplier_invoicea', 'object_supplier_invoiced', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock',
|
||||
'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member',
|
||||
'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'object_website', 'object_movement',
|
||||
'off', 'on', 'order',
|
||||
'off', 'on', 'order', 'copy',
|
||||
'paiment', 'play', 'pdf', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'stock', 'resize', 'service', 'stats', 'trip',
|
||||
'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench',
|
||||
'github', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
|
||||
|
||||
@@ -180,6 +180,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
|
||||
|
||||
@@ -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
|
||||
@@ -1127,3 +1128,4 @@ ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected
|
||||
CategTypeNotFound=No tag type found for type of records
|
||||
CopiedToClipboard=Copied to clipboard
|
||||
InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration.
|
||||
HelpCopyToClipboardShort=Copier dans le presse-papier
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* Copyright (C) 2020 Demarest Maxime <maxime@indelog.fr>
|
||||
* Copyright (C) 2020 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
*
|
||||
* 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 .= '<span id="topmenulogincompanyinfo-btn"><i class="fa fa-caret-right"></i> '.$langs->trans("ShowCompanyInfos").'</span>';
|
||||
$dropdownBody .= '<div id="topmenulogincompanyinfo" >';
|
||||
|
||||
if(!empty($conf->global->MAIN_INFO_SIREN)) $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId1Short", $mysoc->country_code).'</b>: <span>'.$conf->global->MAIN_INFO_SIREN.'</span> <span class="copyToClipboard">'.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').'</span></i>';
|
||||
if(!empty($conf->global->MAIN_INFO_SIRET)) $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId2Short", $mysoc->country_code).'</b>: <span>'.$conf->global->MAIN_INFO_SIRET.'</span> <span class="copyToClipboard">'.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').'</span></i>';
|
||||
if(!empty($conf->global->MAIN_INFO_APE)) $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId3Short", $mysoc->country_code).'</b>: <span>'.$conf->global->MAIN_INFO_APE.'</span> <span class="copyToClipboard">'.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').'</span></i>';
|
||||
if(!empty($conf->global->MAIN_INFO_RCS)) $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId4Short", $mysoc->country_code).'</b>: <span>'.$conf->global->MAIN_INFO_RCS.'</span> <span class="copyToClipboard">'.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').'</span></i>';
|
||||
if(!empty($conf->global->MAIN_INFO_PROFID5)) $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId5Short", $mysoc->country_code).'</b>: <span>'.$conf->global->MAIN_INFO_PROFID5.'</span> <span class="copyToClipboard">'.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').'</span></i>';
|
||||
if(!empty($conf->global->MAIN_INFO_PROFID6)) $dropdownBody .= '<br><b>'.$langs->transcountry("ProfId6Short", $mysoc->country_code).'</b>: <span>'.$conf->global->MAIN_INFO_PROFID6.'</span> <span class="copyToClipboard">'.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').'</span></i>';
|
||||
if(!empty($conf->global->MAIN_INFO_TVAINTRA)) $dropdownBody .= '<br><b>'.$langs->trans("VATIntraShort").'</b>: <span>'.$conf->global->MAIN_INFO_TVAINTRA.'</span> <span class="copyToClipboard">'.img_picto($langs->trans("HelpCopyToClipboardShort"), 'copy').'</span></i>';
|
||||
|
||||
$dropdownBody .= '</div>';
|
||||
|
||||
$dropdownBody .= '<br>';
|
||||
$dropdownBody .= '<span id="topmenuloginmoreinfo-btn"><i class="fa fa-caret-right"></i> '.$langs->trans("ShowMoreInfos").'</span>';
|
||||
$dropdownBody .= '<div id="topmenuloginmoreinfo" >';
|
||||
|
||||
@@ -2138,6 +2153,17 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
|
||||
$("#topmenu-login-dropdown").toggleClass("open");
|
||||
});
|
||||
|
||||
$(".copyToClipboard").on("click", function() {
|
||||
var dummyContent = $(this).prevAll("span:first").text();
|
||||
var dummy = $("<input id = \"dummy\">").val(dummyContent).appendTo("body").select();
|
||||
document.execCommand("copy");
|
||||
document.getElementById("dummy").remove();
|
||||
});
|
||||
|
||||
$("#topmenulogincompanyinfo-btn").on("click", function() {
|
||||
$("#topmenulogincompanyinfo").slideToggle();
|
||||
});
|
||||
|
||||
$("#topmenuloginmoreinfo-btn").on("click", function() {
|
||||
$("#topmenuloginmoreinfo").slideToggle();
|
||||
});';
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user