X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FTabs;h=19744111ea26ed831022dd8dfafbfc77accddf45;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hp=46d2bd89d44a548f058d8b40d56a95e187d9b746;hpb=1c538bfabc2cd31f27067505f0c3d1a46cba6ef0;p=freeside.git diff --git a/rt/share/html/Elements/Tabs b/rt/share/html/Elements/Tabs index 46d2bd89d..19744111e 100755 --- a/rt/share/html/Elements/Tabs +++ b/rt/share/html/Elements/Tabs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -305,6 +305,8 @@ my $build_admin_menu = sub { my $txn_cfs = $cfs->child( 'transactions' => title => loc('Transactions'), path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id='.$id ); + $queue->child( 'tasks' => title => loc('Subtasks'), path => "Admin/Queues/Tasks.html?Queue=".$id ); + $queue->child( 'group-rights' => title => loc('Group Rights'), path => "/Admin/Queues/GroupRights.html?id=".$id ); $queue->child( 'user-rights' => title => loc('User Rights'), path => "/Admin/Queues/UserRights.html?id=" . $id ); $queue->child( 'history' => title => loc('History'), path => "/Admin/Queues/History.html?id=" . $id ); @@ -495,7 +497,9 @@ my $build_main_nav = sub { if ( $status ) { push @dashboards, $dash; } else { - $RT::Logger->warning( "Failed to load dashboard $id: $msg" ); + $RT::Logger->debug( "Failed to load dashboard $id: $msg, removing from menu" ); + $home->RemoveDashboardMenuItem( DashboardId => $id, CurrentUser => $session{CurrentUser}->UserObj ); + @{$session{'dashboards_in_menu'}} = grep { $_ != $id } @{$session{'dashboards_in_menu'}}; } } @@ -766,6 +770,9 @@ my $build_main_nav = sub { } } + # Scope here so we can share in the Privileged callback + my $args = ''; + my $has_query = ''; if ( ( $request_path =~ m{^/(?:Ticket|Search)/} @@ -776,8 +783,6 @@ my $build_main_nav = sub { ) { my $search = Menu()->child('search')->child('tickets'); - my $args = ''; - my $has_query = ''; my $current_search = $session{"CurrentSearchHash"} || {}; my $search_id = $DECODED_ARGS->{'SavedSearchLoad'} || $DECODED_ARGS->{'SavedSearchId'} || $current_search->{'SearchId'} || ''; my $chart_id = $DECODED_ARGS->{'SavedChartSearchId'} || $current_search->{SavedChartSearchId}; @@ -845,7 +850,10 @@ my $build_main_nav = sub { } if ( $has_query ) { - $current_search_menu->child( bulk => title => loc('Bulk Update'), path => "/Search/Bulk.html$args" ); + #freeside + if ( $session{'CurrentUser'}->HasRight( Right => 'BulkUpdateTickets', Object => RT->System ) ) { + $current_search_menu->child( bulk => title => loc('Bulk Update'), path => "/Search/Bulk.html$args" ); + } $current_search_menu->child( chart => title => loc('Chart'), path => "/Search/Chart.html$args" ); #formerly Callbacks/RTx-Calendar/Ticket/Element/Tabs/Default @@ -950,7 +958,7 @@ my $build_main_nav = sub { PageMenu()->child( edit => title => loc('Edit'), path => '/Prefs/MyRT.html' ); } - $m->callback( CallbackName => 'Privileged', Path => $request_path ); + $m->callback( CallbackName => 'Privileged', Path => $request_path, Search_Args => $args, Has_Query => $has_query ); }; my $build_selfservice_nav = sub {