From ccec9286e2d6f3058ff6edc8e171104f9786dbc8 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Tue, 22 Apr 2025 19:12:25 +0200 Subject: [PATCH] Better explanation --- htdocs/admin/tools/ui/components/icons.php | 10 ++++++---- htdocs/langs/en_US/uxdocumentation.lang | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/tools/ui/components/icons.php b/htdocs/admin/tools/ui/components/icons.php index 32c35b87685..fb7aec592dc 100644 --- a/htdocs/admin/tools/ui/components/icons.php +++ b/htdocs/admin/tools/ui/components/icons.php @@ -134,9 +134,11 @@ $documentation->showSidebar(); ?> '; } else { - $tooltip = $iconName.'
img_picto(\''.$labelAlt.'\', \''.$iconName.'\')'; - $iconCode = img_picto($tooltip, $iconName, '', 0, 0, 0, '', 'classfortooltip'); - print ''.$iconCode.''.$iconName.''; + $tooltip = ''.$langs->trans("DocCodeForMenuOrModuleBuilder").':
'.$iconName; + $tooltip .= '
'.$langs->trans("DocExampleForPHPCode").':
img_picto(\''.$labelAlt.'\', \''.$iconName.'\')'; + $iconCode = img_picto($tooltip, $iconName, '', 0, 0, 0, '', 'classfortooltip'); + print ''.$iconCode; + print ''.$iconName.''; } } ?> @@ -220,7 +222,7 @@ $documentation->showSidebar(); ?> '; } else { - $tooltip = $class; + $tooltip = ''.$langs->trans("DocCodeForMenuOrModuleBuilder").':
'.$class; print ''.$iconCode.''.$class.''; } } diff --git a/htdocs/langs/en_US/uxdocumentation.lang b/htdocs/langs/en_US/uxdocumentation.lang index 87085c21cbc..ed987de9e67 100644 --- a/htdocs/langs/en_US/uxdocumentation.lang +++ b/htdocs/langs/en_US/uxdocumentation.lang @@ -8,6 +8,8 @@ DocHowContribute=How to contribute ? DocHowContributeDescription=This documentation is currently being written. Learn how to contribute and enrich this documentation DocListLinks=List of links - %s DocGroupIndexDescription= This page brings together all the links from the "%s" section. +DocCodeForMenuOrModuleBuilder=Image code to use for menu setup or fields in modulebuilder +DocExampleForPHPCode=Example of code to use in PHP # Components DocComponentsTitle=Components