From e38bb89a2e3690c75d11dcf1d6a0ad4a378be289 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 27 Sep 2019 11:48:40 +0200 Subject: [PATCH] NEW Add fa_icon on load_fiche_titre --- htdocs/adherents/index.php | 2 +- htdocs/admin/index.php | 2 +- htdocs/compta/index.php | 2 +- htdocs/core/lib/functions.lib.php | 61 +++++++++++++++++++++++++++++-- 4 files changed, 60 insertions(+), 7 deletions(-) diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 3e26ae1ce3a..546092397c3 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -52,7 +52,7 @@ $staticmember=new Adherent($db); $statictype=new AdherentType($db); $subscriptionstatic=new Subscription($db); -print load_fiche_titre($langs->trans("MembersArea")); +print load_fiche_titre($langs->trans("MembersArea"), '', 'title_members.png'); $Adherents=array(); $AdherentsAValider=array(); diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index 0bf4c6bd235..835e370d12e 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -43,7 +43,7 @@ $wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones' llxHeader('', $langs->trans("Setup"), $wikihelp); -print load_fiche_titre($langs->trans("SetupArea"), '', 'tools_title'); +print load_fiche_titre($langs->trans("SetupArea"), '', 'title_tools'); if (! empty($conf->global->MAIN_MOTD_SETUPPAGE)) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index e2c0180dc3b..451d8e01ed7 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -87,7 +87,7 @@ $thirdpartystatic = new Societe($db); llxHeader("", $langs->trans("AccountancyTreasuryArea")); -print load_fiche_titre($langs->trans("AccountancyTreasuryArea"), '', 'title_accountancy.png'); +print load_fiche_titre($langs->trans("AccountancyTreasuryArea"), '', 'title_invoicing.png'); print '
'; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 61f07dc3e31..2dcd3db799f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3015,10 +3015,11 @@ 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', 'note', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize', - 'note', 'setup', 'tools_title', 'sign-out', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', + 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', 'jabber','skype','twitter','facebook','linkedin', - 'chevron-left','chevron-right','chevron-down','chevron-top' - ) + 'chevron-left','chevron-right','chevron-down','chevron-top', + 'title_tools', 'title_home','title_companies','title_products','title_commercial','title_invoicing','title_accountancy', 'title_bank','title_project','title_hrm','title_generic','title_members','title_ticket' + ) )) { $fa='fa'; if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5)) $fa='fas'; @@ -3029,10 +3030,62 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $fakey = 'fa-cog'; $fasize = '1.4em'; } - elseif ($pictowithoutext == 'tools_title') { + + // Title fa-icon + elseif ($pictowithoutext == 'title_tools') { $fakey = 'fa-tools'; $fasize = '2.4em'; } + elseif ($pictowithoutext == 'title_home') { + $fakey = 'fa-home'; + $fasize = '2.4em'; + } + elseif ($pictowithoutext == 'title_companies') { + $fakey = 'fa-building'; + $fasize = '2.4em'; + } + elseif ($pictowithoutext == 'title_products') { + $fakey = 'fa-box-open'; + $fasize = '2.4em'; + } + elseif ($pictowithoutext == 'title_commercial') { + $fakey = 'fa-user-tie'; + $fasize = '2.4em'; + } + elseif ($pictowithoutext == 'title_invoicing') { + $fakey = 'fa-file-invoice'; + $fasize = '2.4em'; + } + elseif ($pictowithoutext == 'title_accountancy') { + $fakey = 'fa-coins'; + $fasize = '2.4em'; + } + elseif ($pictowithoutext == 'title_bank') { + $fakey = 'fa-university'; + $fasize = '2.4em'; + } + elseif ($pictowithoutext == 'title_project') { + $fakey = 'fa-project-diagram'; + $fasize = '2.4em'; + } + elseif ($pictowithoutext == 'title_hrm') { + $fakey = 'fa-umbrella-beach'; + $fasize = '2.4em'; + } + elseif ($pictowithoutext == 'title_members') { + $fakey = 'fa-user-friends'; + $fasize = '2.4em'; + } + elseif ($pictowithoutext == 'title_ticket') { + $fakey = 'fa-sticky-note'; + $fasize = '2.4em'; + } + elseif ($pictowithoutext == 'title_generic') { + $fakey = 'fa-folder-open'; + $fasize = '2.4em'; + } + + // Button fa-icon elseif ($pictowithoutext == 'switch_off') { $fakey = 'fa-toggle-off'; $facolor = '#999';