diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/search_results.py | 12 | ||||
-rw-r--r-- | wqflask/wqflask/templates/index_page.html | 21 |
2 files changed, 29 insertions, 4 deletions
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py index fb8e0921..fde30944 100644 --- a/wqflask/wqflask/search_results.py +++ b/wqflask/wqflask/search_results.py @@ -57,10 +57,14 @@ class SearchResultPage(): # self.dataset_groups = map(lambda x: x[1], results) # self.dataset_group_ids = map(lambda x: x[2], results) #else: - self.dataset = create_dataset(kw['dataset']) - - self.search_terms = kw['search_terms'] - + if kw['q']: + self.quick_search = True + self.search_terms = kw['q'] + else: + self.quick_search = False + self.search_terms = kw['search_terms'] + self.dataset = create_dataset(kw['dataset']) + self.search() self.gen_search_result() diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html index c01898b3..8a05173f 100644 --- a/wqflask/wqflask/templates/index_page.html +++ b/wqflask/wqflask/templates/index_page.html @@ -18,6 +18,7 @@ <div class="row"> <div class="span3 bs-docs-sidebar"> <ul class="nav nav-list bs-docs-sidenav"> + <li><a href="#quick-search"><i class="icon-chevron-right"></i> Quick Search</a></li> <li><a href="#search"><i class="icon-chevron-right"></i> Search</a></li> <li><a href="#getting-started"><i class="icon-chevron-right"></i> Getting started</a></li> <li><a href="#advanced"><i class="icon-chevron-right"></i> Advanced commands</a></li> @@ -27,7 +28,27 @@ </div> <div class="span9"> + <section id="quick-search"> + <div class="page-header"> + <h1>Quick search</h1> + </div> + <form method="get" action="/search" name="SEARCHFORM"> + <fieldset> + <label for="tfor">Search:</label> + <div class="input-append"> + <input class="input-xlarge" + id="tfor" name="q" + type="text" maxlength="500"> + + <input id="btsearch" type="submit" + class="btn btn-primary" value="Search"> + </div> + </fieldset> + + </form> + </section> <section id="search"> + <div class="page-header"> <h1>Select and search</h1> </div> |