[Rt-commit] rt branch 5.0/do-not-show-rtname-as-an-active-menu created. rt-5.0.4-7-gc9296e81da

BPS Git Server git at git.bestpractical.com
Wed May 17 00:35:25 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/do-not-show-rtname-as-an-active-menu has been created
        at  c9296e81da3a7b4908c78aad78b45020bd7e0cd7 (commit)

- Log -----------------------------------------------------------------
commit c9296e81da3a7b4908c78aad78b45020bd7e0cd7
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Mon May 15 14:23:44 2023 -0300

    Prevent highlighting "RT for" in active menu
    
    When users accessed the main page of RT, they noticed that both
    the "Logged in as" menu and its sub-menu "RT for" were highlighted
    (activated) simultaneously with the "Home" option. The purpose of
    highlighting the active menu is to indicate to users the current
    page they are viewing and provide feedback on their last clicked
    menu item. To refine this behavior, this commit adds an exception
    in the active menu check to prevent the activation of the "RT for"
    (rt_name) sub-menu.

diff --git a/lib/RT/Interface/Web/Menu.pm b/lib/RT/Interface/Web/Menu.pm
index 15a5c45ea9..f1e6ef9d4e 100644
--- a/lib/RT/Interface/Web/Menu.pm
+++ b/lib/RT/Interface/Web/Menu.pm
@@ -248,9 +248,12 @@ sub child {
 
             require URI::Escape;
             $base_path = URI::Escape::uri_unescape($base_path);
-            if ( $path eq $base_path ) {
+            if (   $path eq $base_path
+                && $key ne 'rt_name' )
+            {
                 $self->{children}{$key}->active(1);
             }
+
         }
     }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list