[Rt-commit] rt branch, 5.0/self-service-home-menu, created. rt-5.0.0-139-ge94982b482

Jim Brandt jbrandt at bestpractical.com
Wed Dec 16 17:27:45 EST 2020


The branch, 5.0/self-service-home-menu has been created
        at  e94982b482e30ee331d2e6bcb124632f517de1b0 (commit)

- Log -----------------------------------------------------------------
commit e94982b482e30ee331d2e6bcb124632f517de1b0
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Wed Dec 16 17:25:21 2020 -0500

    Add a Home menu item to self service to mirror regular RT
    
    With the new self service dashboard feature, there are now
    multiple pages a user could navigate to. Provide a more
    obvious way to get back to the home page. This page is the
    new dashboard if SelfServiceUseDashboard is enabled or the
    previous default Open Tickets page if not.
    
    Also update the single menu item from New ticket to Create Ticket
    for consistency with privileged RT.

diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index 1d63dc177d..8284904a07 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -1620,11 +1620,12 @@ sub BuildSelfServiceNav {
         last if ( $queue_count > 1 );
     }
 
+    my $home = $top->child( home => title => loc('Homepage'), path => '/' );
 
     if ( $queue_count > 1 ) {
-        $top->child( new => title => loc('New ticket'), path => '/SelfService/CreateTicketInQueue.html' );
+        $home->child( new => title => loc('Create Ticket'), path => '/SelfService/CreateTicketInQueue.html' );
     } elsif ( $queue_id ) {
-        $top->child( new => title => loc('New ticket'), path => '/SelfService/Create.html?Queue=' . $queue_id );
+        $home->child( new => title => loc('Create Ticket'), path => '/SelfService/Create.html?Queue=' . $queue_id );
     }
 
     my $menu_label = loc('Tickets');

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


More information about the rt-commit mailing list