diff options
-rw-r--r-- | gn2/wqflask/search_results.py | 1 | ||||
-rw-r--r-- | gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js | 5 | ||||
-rwxr-xr-x | gn2/wqflask/templates/index_page.html | 4 |
3 files changed, 10 insertions, 0 deletions
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 @@ </div> <form method="get" action="/search" target="_blank" id="searchform" name="SEARCHFORM", data-gn_server_url="{{gn_server_url}}"> + <input name="search_type" type="hidden" value="sql"> <fieldset> <div style="padding-left: 20px; padding-right: 20px;" class="form-horizontal"> @@ -198,6 +199,9 @@ <div class="col-2 controls"> <button id="btsearch" class="btn btn-primary form-control"><span class="glyphicon glyphicon-search"></span> Search</button> </div> + <div class="col-2 controls" style="padding-left: 20px;"> + <button id="xapianSearch" class="btn btn-primary form-control"><span class="glyphicon glyphicon-search"></span> Xapian Search</button> + </div> <div class="col-2 align-self-end controls" style="padding-left: 20px;"> <button type="button" id="make_default" class="btn form-control info-button"><span class="glyphicon glyphicon-pushpin"></span> Lock Menu</button> </div> |