isearch/commit

Redefine standard ClioPatria search

authorJan Wielemaker
Fri Dec 3 17:12:44 2010 +0100
committerJan Wielemaker
Fri Dec 3 17:12:44 2010 +0100
commit0d80691523f327ab6afadf3149f40f810df83607
tree570864daf07fdc45b6ce44967c59241930a25642
parent715e7e6c6f9c726c56aea7a91ae66ec4f0e18279
Diff style: patch stat
diff --git a/config-available/isearch.pl b/config-available/isearch.pl
index 573e7ab..862f19d 100644
--- a/config-available/isearch.pl
+++ b/config-available/isearch.pl
@@ -1,4 +1,5 @@
 :- module(conf_isearch, []).
+:- use_module(library(http/http_dispatch)).
 :- use_module(isearch(applications/isearch)).
 :- use_module(cliopatria(hooks)).
 
@@ -10,7 +11,19 @@ browsing.
 @author Michiel Hildebrand
 */
 
-cliopatria:menu_item(250=query/isearch,  'Search').
+% Hijack the search-field, redirecting the queries to the interactive
+% search page.
+
+:- http_handler(cpack(isearch_literal),
+		isearch_page([ header(false),
+			       query_type(literal)
+			     ]),
+		[id(list_triples_with_literal), priority(10)]).
+:- http_handler(cpack(isearch),
+		isearch_page([ header(false)
+			     ]),
+		[id(search), priority(10)]).
+