From 1af3881796a39bfef255a1e9e680078b9a6ddf15 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Wed, 14 Oct 2020 18:08:31 +0200 Subject: [PATCH 1/2] If specific help present we change color of icon --- htdocs/main.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 9ecd00ca36f..217807ad044 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -12,6 +12,7 @@ * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2020 Demarest Maxime + * Copyright (C) 2020 Charlene Benke * * 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 @@ -1655,8 +1656,11 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead $helpbaseurl = ''; $helppage = ''; $mode = ''; + $helpresent = ''; if (empty($helppagename)) $helppagename = 'EN:User_documentation|FR:Documentation_utilisateur|ES:Documentación_usuarios'; + else + $helpresent = 'style="color:yellow !important"'; // Get helpbaseurl, helppage and mode from helppagename and langs $arrayres = getHelpParamFor($helppagename, $langs); @@ -1674,7 +1678,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead if ($mode == 'wiki') $text .= sprintf($helpbaseurl, urlencode(html_entity_decode($helppage))); else $text .= sprintf($helpbaseurl, $helppage); $text .= '">'; - $text .= ''; + $text .= ''; $text .= ''; $toprightmenu .= @Form::textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2); } From f4ef8a3285398ec58c8eadb380ce8d67520cec04 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 14 Oct 2020 18:52:41 +0200 Subject: [PATCH 2/2] Use class instead of hard coded style --- htdocs/main.inc.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 217807ad044..9d2fdc5fe1f 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1658,9 +1658,11 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead $mode = ''; $helpresent = ''; - if (empty($helppagename)) $helppagename = 'EN:User_documentation|FR:Documentation_utilisateur|ES:Documentación_usuarios'; - else - $helpresent = 'style="color:yellow !important"'; + if (empty($helppagename)) { + $helppagename = 'EN:User_documentation|FR:Documentation_utilisateur|ES:Documentación_usuarios'; + } else { + $helpresent = 'helppresent'; + } // Get helpbaseurl, helppage and mode from helppagename and langs $arrayres = getHelpParamFor($helppagename, $langs); @@ -1678,7 +1680,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead if ($mode == 'wiki') $text .= sprintf($helpbaseurl, urlencode(html_entity_decode($helppage))); else $text .= sprintf($helpbaseurl, $helppage); $text .= '">'; - $text .= ''; + $text .= ''; $text .= ''; $toprightmenu .= @Form::textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2); }