diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-01-23 15:17:32 +0000 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2015-02-20 11:59:04 +0000 |
commit | 4b523d3034c578fe8bc756b7630dffa926d946fe (patch) | |
tree | 3911b2fb8fea6a3f71335ca19017df88888d7403 | |
parent | 572a3e4b5ac5f8946e3346f91a8ff7ca568a2527 (diff) |
Show a 'make a request' button in the new request process.
When we know the intent is to make a new request, make it possible to do
straight from the list of authorities.
-rw-r--r-- | app/views/general/search.html.erb | 6 | ||||
-rw-r--r-- | app/views/public_body/_body_listing_single.html.erb | 10 | ||||
-rw-r--r-- | app/views/public_body/_search_ahead.html.erb | 4 |
3 files changed, 13 insertions, 7 deletions
diff --git a/app/views/general/search.html.erb b/app/views/general/search.html.erb index 4f9ef5b68..c5ff8e9fd 100644 --- a/app/views/general/search.html.erb +++ b/app/views/general/search.html.erb @@ -1,7 +1,5 @@ <% @show_tips = @xapian_requests.nil? || (@total_hits == 0) %> -<% @include_request_link_in_authority_listing = true %> - <%= render :partial => 'localised_datepicker' %> <% if @query.nil? %> @@ -157,7 +155,9 @@ <div class="results_block"> <% for result in @xapian_bodies.results %> - <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %> + <%= render :partial => 'public_body/body_listing_single', + :locals => { :public_body => result[:model], + :request_link => true } %> <% end %> </div> diff --git a/app/views/public_body/_body_listing_single.html.erb b/app/views/public_body/_body_listing_single.html.erb index aa794c5d5..b343c20e1 100644 --- a/app/views/public_body/_body_listing_single.html.erb +++ b/app/views/public_body/_body_listing_single.html.erb @@ -1,6 +1,10 @@ -<% if @highlight_words.nil? - @highlight_words = [] - end %> +<% + if @highlight_words.nil? + @highlight_words = [] + end + + request_link = false unless defined?(request_link) +%> <div class="body_listing"> <span class="head"> diff --git a/app/views/public_body/_search_ahead.html.erb b/app/views/public_body/_search_ahead.html.erb index b5632bccd..b06ed5efa 100644 --- a/app/views/public_body/_search_ahead.html.erb +++ b/app/views/public_body/_search_ahead.html.erb @@ -7,7 +7,9 @@ <% end %> <div id="authority_search_ahead_results"> <% for result in @xapian_requests.results %> - <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %> + <%= render :partial => 'public_body/body_listing_single', + :locals => { :public_body => result[:model], + :request_link => true } %> <% end %> </div> <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @xapian_requests.matches_estimated), :params => {:controller=>"request", :action => "select_authority"} %> |