[Rt-commit] r9884 - in rt/branches/3.6-RELEASE: .

sartak at bestpractical.com sartak at bestpractical.com
Tue Dec 11 08:58:40 EST 2007


Author: sartak
Date: Tue Dec 11 08:58:39 2007
New Revision: 9884

Modified:
   rt/branches/3.6-RELEASE/   (props changed)
   rt/branches/3.6-RELEASE/html/Search/Simple.html

Log:
 r48891 at onn:  sartak | 2007-12-11 08:58:32 -0500
 Add some callbacks to Simple Search


Modified: rt/branches/3.6-RELEASE/html/Search/Simple.html
==============================================================================
--- rt/branches/3.6-RELEASE/html/Search/Simple.html	(original)
+++ rt/branches/3.6-RELEASE/html/Search/Simple.html	Tue Dec 11 08:58:39 2007
@@ -51,6 +51,8 @@
     Title => $title
 &>
 
+<& /Elements/Callback, _CallbackName => 'PreForm', %ARGS &>
+
 <div id="SimpleSearchForm">
 <form action="Simple.html" method="get">
 
@@ -64,6 +66,11 @@
 <div align="center">
 <input name="q" size="60" /><input type="submit" class="button" value="<&|/l&>Search</&>" />
 </div>
+
+</form>
+
+<& /Elements/Callback, _CallbackName => 'PostForm', %ARGS &>
+
 </div>
 
 <%INIT>
@@ -78,8 +85,15 @@
     if ($q =~ /^(\d+)$/) {
         RT::Interface::Web::Redirect($RT::WebURL."/Ticket/Display.html?id=".$q);
     }
-    my $search  = RT::Search::Googleish->new(Argument   => $q,
-                                             TicketsObj => $tickets);
+
+    my %args = (
+        Argument   => $q,
+        TicketsObj => $tickets,
+    );
+
+    $m->comp('/Elements/Callback', %ARGS, _CallbackName => 'SearchArgs', args => \%args);
+
+    my $search = RT::Search::Googleish->new(%args);
 
     $m->comp( "Results.html", Query => $search->QueryToSQL() );
     $m->comp( "/Elements/Footer" );


More information about the Rt-commit mailing list