From 957c50ff39e76ba60870e5ad408616268bd43aae Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 7 Jun 2024 18:35:56 +0000 Subject: Add separate button for Xapian search This will be temporary in the longer run, but can stay until all functionality is reproduced. --- gn2/wqflask/search_results.py | 1 + gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js | 5 +++++ gn2/wqflask/templates/index_page.html | 4 ++++ 3 files changed, 10 insertions(+) (limited to 'gn2') diff --git a/gn2/wqflask/search_results.py b/gn2/wqflask/search_results.py index b0f08463..ad92d8c7 100644 --- a/gn2/wqflask/search_results.py +++ b/gn2/wqflask/search_results.py @@ -36,6 +36,7 @@ class SearchResultPage: self.uc_id = uuid.uuid4() self.go_term = None + self.type = kw['search_type'] if kw['search_terms_or']: self.and_or = "or" diff --git a/gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js b/gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js index 2875eabd..4310c4a8 100644 --- a/gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js +++ b/gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js @@ -329,3 +329,8 @@ $("#make_default").click(make_default); $("#btsearch").click(function() { $("#searchform").prop("action", "/search") }); + +$("#xapianSearch").click(function() { + $("input[name='search_type']").val("xapian") + $("#searchform").prop("action", "/search") +}); diff --git a/gn2/wqflask/templates/index_page.html b/gn2/wqflask/templates/index_page.html index f0840425..84d441f2 100755 --- a/gn2/wqflask/templates/index_page.html +++ b/gn2/wqflask/templates/index_page.html @@ -111,6 +111,7 @@
+
@@ -198,6 +199,9 @@
+
+ +
-- cgit v1.2.3