[Rt-commit] rtir branch, 5.0/customize-search-results-menu-text, created. 5.0.0-24-gb67b2cb9

? sunnavy sunnavy at bestpractical.com
Fri Jan 8 15:13:36 EST 2021


The branch, 5.0/customize-search-results-menu-text has been created
        at  b67b2cb910a5e206b511a59e8b122a5bf3e29a92 (commit)

- Log -----------------------------------------------------------------
commit b67b2cb910a5e206b511a59e8b122a5bf3e29a92
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Jan 9 03:43:24 2021 +0800

    Customize search "Show Results" menu text for action pages to avoid confusion

diff --git a/html/Callbacks/RTIR/Elements/Tabs/Privileged b/html/Callbacks/RTIR/Elements/Tabs/Privileged
index 4c8bc5db..70260738 100644
--- a/html/Callbacks/RTIR/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTIR/Elements/Tabs/Privileged
@@ -116,6 +116,18 @@ if ( $m->request_comp->path =~ m{^/Search/} ) {
         if ( $args{Query} ) {
             PageMenu()->child( 'more' )->{sort_order} = 99;
         }
+
+        if ( my $results = PageMenu()->child('results') ) {
+            if ( $results->path =~ m{^/RTIR/Incident/Reply/} ) {
+                $results->title( loc('Back to Incident Reply') );
+            }
+            elsif ( $results->path =~ m{^/RTIR/Link/} ) {
+                $results->title( loc('Back to Link') );
+            }
+            elsif ( $results->path =~ m{^/RTIR/Merge/} ) {
+                $results->title( loc('Back to Merge') );
+            }
+        }
     }
 }
 

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


More information about the rt-commit mailing list