diff options
-rw-r--r-- | app/views/general/frontpage.rhtml | 5 | ||||
-rw-r--r-- | app/views/general/search.rhtml | 23 | ||||
-rw-r--r-- | app/views/layouts/default.rhtml | 10 | ||||
-rw-r--r-- | public/stylesheets/main.css | 8 | ||||
-rw-r--r-- | todo.txt | 8 |
5 files changed, 47 insertions, 7 deletions
diff --git a/app/views/general/frontpage.rhtml b/app/views/general/frontpage.rhtml index e3fb54ca8..fe3ec2690 100644 --- a/app/views/general/frontpage.rhtml +++ b/app/views/general/frontpage.rhtml @@ -58,12 +58,13 @@ <div id="find_information"> <h1>Explore information that others requested</h1> + <%= render :partial => 'request/request_listing', :locals => { :info_requests => @info_requests } %> + <p><%=link_to "View more successful requests", search_url(:query => 'status:successful OR status:partially_successful') %></p> <% form_tag({:action => "search_redirect"}, {:id => "search_form"}) do %> <p> <%= text_field_tag 'query', params[:query], { :size => 20 } %> <%= submit_tag "Search" %> </p> <% end %> - <%= render :partial => 'request/request_listing', :locals => { :info_requests => @info_requests } %> - <p><a href="/list">View all information</a></p> </div> + diff --git a/app/views/general/search.rhtml b/app/views/general/search.rhtml index 27f36fba8..761e7e22c 100644 --- a/app/views/general/search.rhtml +++ b/app/views/general/search.rhtml @@ -9,6 +9,9 @@ <p> <%= text_field_tag 'query', @query, { :size => 40 } %> <%= submit_tag "Search" %> + <% if not @search_results.nil? and not @search_results.empty? %> + <a href="/search">Advanced tips</a> + <% end %> </p> <% end %> @@ -37,5 +40,25 @@ <% end %> <%= will_paginate WillPaginate::Collection.new(params[:page]||1, @per_page, @solr_object.total_hits) %> +<% end %> +<% if @search_results.nil? or @search_results.empty? %> + <h2>Search tips</h2> + <ul> + <li>Enter words that you want to find, e.g. climbing lane</li> + <li>Use OR (in capital letters) where you don't mind which word, e.g. commons OR lords + <li>Use quotes when you want to find an exact phrase, e.g. "Liverpool City Council" + <li>Type status: to select based on the status of the request. + <table> + <tr><td>status:waiting_response</td><td> Waiting for the public body to reply </td></tr> + <tr><td>status:waiting_response_overdue</td><td> Waiting for the public body to reply, they are late </td></tr> + <tr><td>status:partially_successful</td><td> Some of the information requested has been received </td></tr> + <tr><td>status:successful</td><td> All of the information requested has been received </td></tr> + <tr><td>status:rejected</td><td> The request was rejected by the public body </td></tr> + <tr><td>status:waiting_clarification</td><td> The public body would like part of the request explained </td></tr> + <tr><td>status:waiting_classification</td><td> A new response has arrived, but it hasn't been categorised yet </td></tr> + <tr><td>status:requires_admin</td><td> A strange reponse, required attention by the WhatDoTheyKnow team </td></tr> + </table> + <li>Read about <a href="http://lucene.apache.org/java/docs/queryparsersyntax.html">advanced search operators</a>, such as fuzziness and proximity. + </ul> <% end %> diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index 4d743b1ab..609871bfc 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -24,13 +24,21 @@ </div> <ul id="navigation"> <li><a href="/">Make Request</a></li> - <li><%= link_to "All Requests", request_list_url %></li> + <li><%= link_to "View Requests", request_list_url %></li> <% if @user %> <li><%=link_to "My Requests", user_url(@user) %></li> <% else %> <% end %> <li><%= link_to "About", about_url %></li> </ul> + <div id="navigation_search"> + <% form_tag({:controller => "general", :action => "search_redirect"}, {:id => "search_form"}) do %> + <p> + <%= text_field_tag 'query', params[:query], { :size => 25 } %> + <%= submit_tag "Search" %> + </p> + <% end %> + </div> <% if MySociety::Config.getbool("STAGING_SITE", 1) %> <div id="staging"> diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index a6c768003..edf1e3d3c 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -123,11 +123,17 @@ a:active { background-color: #79b837; color: #c7eb6e; } +#navigation_search { + position: absolute; + top: -0.5em; + right: 2em; +} #logged_in_bar { text-align: right; margin-top: 0.5em; - margin-right: 1em; + margin-right: 2em; + margin-left: 1em; } #footer { @@ -1,9 +1,11 @@ Search: -Put search box in the right places +Date ranges http://lucene.apache.org/java/docs/queryparsersyntax.html -Status - document how it works -Date ranges +Search by type of public body + +Hide backpaged things from search +http://www.whatdotheyknow.com/search/status:successful%20OR%20status:partially_successful cron jobs aren't running? |