[Rt-commit] [rtir] 06/07: Switch RTIR to spreading out its menus for ease of access

Jesse Vincent jesse at bestpractical.com
Mon Mar 16 04:38:37 EDT 2015


This is an automated email from the git hooks/post-receive script.

jesse pushed a commit to branch 3.4/remove_old_constituencies
in repository rtir.

commit 5b82d92ac7c8cfef83d939660ca43fa88b928cff
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Mar 16 01:37:44 2015 -0700

    Switch RTIR to spreading out its menus for ease of access
---
 html/Callbacks/RTIR/Elements/Tabs/Privileged | 22 ++++++++++++++++++++--
 html/RTIR/Tools/index.html                   |  2 +-
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/html/Callbacks/RTIR/Elements/Tabs/Privileged b/html/Callbacks/RTIR/Elements/Tabs/Privileged
index ee57018..dc2780d 100644
--- a/html/Callbacks/RTIR/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTIR/Elements/Tabs/Privileged
@@ -47,6 +47,11 @@
 %# END BPS TAGGED BLOCK }}}
 <%INIT>
 
+if ( $m->request_comp->path !~ m{^/RTIR/} ) {
+    Menu()->child( rtir => title => loc('RTIR'), path => RT::IR->HREFTo('') );
+    return;
+}
+
 my $query_string = sub {
     my %args = @_;
     my $u    = URI->new();
@@ -70,9 +75,22 @@ my $search_arguments = sub {
     return %res;
 };
 
-my $root = Menu->child( rtir => title => loc('RTIR'), path => RT::IR->HREFTo('') );
 
-my $search = $root->child( search => title => loc('Search'), path => RT::IR->HREFTo('Search/') );
+my $orig_menu = Menu();
+
+$HTML::Mason::Commands::m->notes('menu', RT::Interface::Web::Menu->new());
+
+my $rtmenu = Menu->child(rtkids => menu => $orig_menu);
+$rtmenu->title(loc('RT'));
+$rtmenu->path($RT::WebPath);
+$rtmenu->key('rt-menu');
+
+Menu->child(preferences => menu => $orig_menu->child('preferences'));
+$orig_menu->delete('preferences');
+
+my $root = Menu();
+
+my $search = $root->child( search => title => loc('RTIR'), path => RT::IR->HREFTo('') );
 $search->child( new => title => loc('New Search'), path => RT::IR->HREFTo('Search/?NewQuery=1') );
 
 {
diff --git a/html/RTIR/Tools/index.html b/html/RTIR/Tools/index.html
index c0d093b..486a5a4 100644
--- a/html/RTIR/Tools/index.html
+++ b/html/RTIR/Tools/index.html
@@ -47,5 +47,5 @@
 %# END BPS TAGGED BLOCK }}}
 <& /RTIR/Elements/Header, Title => loc('RTIR Tools') &>
 <& /Elements/Tabs &>
-<& /Elements/ListMenu, menu => Menu()->child('rtir')->child('tools')  &>
+<& /Elements/ListMenu, menu => Menu()->child('tools')  &>
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list