Commit 01ab4582 authored by sunnavy's avatar sunnavy
Browse files

show Gantt link on more /Search/ pages when possible

parent d07cd301
......@@ -48,11 +48,17 @@
<%INIT>
my $request_path = $HTML::Mason::Commands::r->path_info;
if ( $request_path =~ qr{^/Search/Results.html} ) {
my $tabs = PageMenu;
require Encode;
$tabs->child( 'gantt' => title => loc('Gantt Chart'),
path => '/Search/JSGantt.html?Query=' . Encode::decode_utf8 $m->request_args->{'Query'} );
if ( $request_path =~ qr{^/Search/} ) {
if ( $request_path =~ qr{^/Search/JSGantt.html} && $DECODED_ARGS->{Ticket} ) {
PageMenu->child( 'gantt' => title => loc('Gantt Chart'), path => '/Search/JSGantt.html?Ticket=' . $DECODED_ARGS->{Ticket} );
}
else {
my $current_search = $session{"CurrentSearchHash"} || {};
my $query = $DECODED_ARGS->{'Query'} || $current_search->{'Query'};
if ( $query ) {
PageMenu->child( 'gantt' => title => loc('Gantt Chart'), path => '/Search/JSGantt.html?Query=' . $query );
}
}
}
</%INIT>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment