X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fhtml%2Findex.html;h=928efb8f9737f66b00186b07621f10331f2b79dd;hb=52a2dbebe522c0866e18f09a169d39a0cbd4d7b8;hp=798972d94c5327d6353b4c3a0da767d599047b1f;hpb=eb9668a6f3181ee02cb335272c5ee4616e61fd09;p=freeside.git diff --git a/rt/html/index.html b/rt/html/index.html index 798972d94..928efb8f9 100644 --- a/rt/html/index.html +++ b/rt/html/index.html @@ -47,7 +47,8 @@ if ( $ARGS{'q'} ) { my $query = $ARGS{'q'}; if ( $query =~ m/^\s*(\d+)\s*$/ ) { - $m->redirect("$RT::WebPath/Ticket/Display.html?id=$1"); + $m->comp("/Ticket/Display.html" , id=> $1); + return(); } $session{'tickets'} = RT::Tickets->new( $session{'CurrentUser'} ); @@ -56,26 +57,36 @@ if ( $ARGS{'q'} ) { $session{'tickets'}->LimitWatcher( VALUE => $query, TYPE => 'Requestor', OPERATOR => '=', ); - $m->redirect("$RT::WebPath/Search/Listing.html"); + $m->comp("/Search/Listing.html"); + + return(); } # # Any search on queue name or subject will be for new/open tickets # only. # + $session{'tickets'}->LimitStatus( VALUE => $_, OPERATOR => '=', ) for qw(open new); + + my $queue = RT::Queue->new( $session{'CurrentUser'} ); if ( $queue->Load($query) && $queue->Id ) { $session{'tickets'}->LimitQueue( VALUE => $queue->Id, OPERATOR => '=', ); - $m->redirect("$RT::WebPath/Search/Listing.html"); + + + $m->comp("/Search/Listing.html"); + return(); } - $session{'tickets'}->LimitSubject( VALUE => $query, + $session{'tickets'}->LimitSubject( VALUE => $query, OPERATOR => 'LIKE' ); + $m->comp("/Search/Listing.html"); + + return(); - $m->redirect("$RT::WebPath/Search/Listing.html"); } if ($ARGS{'HomeRefreshInterval'}) {