| #* |
| - Make search box bigger |
| - Add in pivot and other facets? |
| - Work on template default selection logic |
| *# |
| |
| ## Show Error Message, if any |
| <div class="error"> |
| #parse("error.vm") |
| </div> |
| |
| <div class="query-box"> |
| <form id="query-form" action="#{url_for_home}" method="GET"> |
| $resource.find: |
| <input type="text" id="q" name="q" value="$!esc.html($request.params.get('q'))"/> |
| <input type="submit"/> |
| |
| #if($debug) ## TODO: this would automatically happen when arbitrary parameters are kept on URLs |
| <input type="hidden" name="debug" value="true"/> |
| #end |
| #foreach($fq in $request.params.getParams('fq')) |
| <input type="hidden" name="fq" id="allFQs" value="$esc.html($fq)"/> |
| #end |
| |
| <div class="constraints"> |
| #foreach($fq in $request.params.getParams('fq')) |
| #set($previous_fq_count=$velocityCount - 1) |
| #if($fq != '') |
| > |
| <a href="#url_for_filters($request.params.getParams('fq').subList(0,$previous_fq_count))">$fq</a> |
| #end |
| #end |
| </div> |
| |
| <div class="parsed_query_header"> |
| #if($debug) |
| <a href="#" onclick='jQuery(this).siblings("div").toggle(); return false;'>toggle parsed query</a> |
| <div class="parsed_query" style="display:none">$response.response.debug.parsedquery</div> |
| #end |
| </div> |
| |
| </form> |
| </div> |
| |
| <div class="facets"> |
| #parse("facets.vm") |
| </div> |
| |
| <div class="pagination"> |
| <span> |
| <span class="results-found">$page.results_found</span> |
| results found in |
| ${response.responseHeader.QTime}ms |
| </span> |
| |
| $resource.page_of.insert($page.current_page_number,$page.page_count) |
| </div> |
| |
| ## Render Results, actual matching docs |
| <div class="results"> |
| #parse("results_list.vm") |
| </div> |
| |
| <div class="pagination"> |
| #link_to_previous_page |
| |
| <span class="results-found">$page.results_found</span> |
| results found. |
| |
| $resource.page_of.insert($page.current_page_number,$page.page_count) |
| |
| #link_to_next_page |
| </div> |