From 1f45ee33b276eb1173ae3c864cb7dac5a3954b75 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 7 Mar 2023 11:14:10 +0100 Subject: [PATCH] Header icon --- pandora_console/include/functions_ui.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 1e4556965b..dbaf0fee37 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1496,6 +1496,7 @@ function ui_print_alert_template_example($id_alert_template, $return=false, $pri * @param string $image Image path. * @param boolean $is_relative Route is relative or not. * @param string $id Target id. + * @param string $isHeader If true, the view is header. * * @return string The help tip */ @@ -1505,10 +1506,17 @@ function ui_print_help_icon( $home_url='', $image='images/info@svg.svg', $is_relative=false, - $id='' + $id='', + $isHeader=false ) { global $config; + if (empty($image) === true) { + $image = 'images/info@svg.svg'; + } + + $iconClass = ($isHeader === true) ? 'header_help_icon' : 'main_menu_icon'; + // Do not display the help icon if help is disabled. if ((bool) $config['disable_help'] === true) { return ''; @@ -1533,7 +1541,7 @@ function ui_print_help_icon( $image, true, [ - 'class' => 'img_help main_menu_icon', + 'class' => 'img_help '.$iconClass, 'title' => __('Help'), 'onclick' => "open_help ('".ui_get_full_url($help_handler)."')", 'id' => $id, @@ -5053,7 +5061,7 @@ function ui_print_page_header( if (is_metaconsole() === false) { if ($help != '') { - $buffer .= "
".ui_print_help_icon($help, true, '', 'images/help_g.png').'
'; + $buffer .= "
".ui_print_help_icon($help, true, '', '', false, '', true).'
'; } }