X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSearch%2FResults.html;h=3c3187c1ff832612d4587bd4eee582071060ed74;hb=0ea23112cfa0d82738b0f08d60d90579721b7524;hp=4fee865067daef3a9c72d56589a5276d61557beb;hpb=0af38652da3b3be7da2d35b048285ef6f2194e1a;p=freeside.git diff --git a/rt/share/html/Search/Results.html b/rt/share/html/Search/Results.html index 4fee86506..3c3187c1f 100755 --- a/rt/share/html/Search/Results.html +++ b/rt/share/html/Search/Results.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -49,6 +49,16 @@ Refresh => $refresh, LinkRel => \%link_rel &> <& /Elements/Tabs &> + +% $m->callback( ARGSRef => \%ARGS, CallbackName => 'BeforeResults' ); + +% unless ($ok) { +% $msg =~ s{ at .*? line .*}{}s; +<&| /Widgets/TitleBox, title => loc("Error"), class => "error" &> +<&|/l_unsafe, "".$m->interp->apply_escapes($msg, "h")."" &>There was an error parsing your search query: [_1]. Your RT admin can find more information in the error logs. + +% } else { + <& /Elements/CollectionList, Query => $Query, TotalFound => $ticketcount, @@ -62,6 +72,9 @@ BaseURL => $BaseURL &> +% } +% $m->callback( ARGSRef => \%ARGS, CallbackName => 'AfterResults' ); + % my %hiddens = (Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order, HideResults => $HideResults, Page => $Page, SavedChartSearchId => $SavedChartSearchId );
@@ -98,7 +111,6 @@ if ( !defined($Rows) ) { } $Page = 1 unless $Page && $Page > 0; -my ($title, $ticketcount); $session{'i'}++; $session{'tickets'} = RT::Tickets->new($session{'CurrentUser'}) ; my ($ok, $msg) = $Query ? $session{'tickets'}->FromSQL($Query) : (1, "Vacuously OK"); @@ -128,11 +140,10 @@ $session{'CurrentSearchHash'} = { }; +my ($title, $ticketcount) = (loc("Found tickets"), 0); if ( $session{'tickets'}->Query()) { $ticketcount = $session{tickets}->CountAll(); $title = loc('Found [quant,_1,ticket]', $ticketcount); -} else { - $title = loc("Find tickets"); } my $QueryString = "?".$m->comp('/Elements/QueryString',