diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/general/search.html.erb | 6 | ||||
-rw-r--r-- | app/views/public_body/_body_listing_single.html.erb | 35 | ||||
-rw-r--r-- | app/views/public_body/_search_ahead.html.erb | 4 | ||||
-rw-r--r-- | app/views/public_body/show.html.erb | 40 | ||||
-rw-r--r-- | app/views/public_body/view_email.html.erb | 2 | ||||
-rw-r--r-- | app/views/request/_request_sent.html.erb | 75 | ||||
-rw-r--r-- | app/views/request/new.html.erb | 6 | ||||
-rw-r--r-- | app/views/request/select_authority.html.erb | 9 | ||||
-rw-r--r-- | app/views/user/_signin.html.erb | 9 |
9 files changed, 119 insertions, 67 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 91a07d09c..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"> @@ -16,23 +20,28 @@ <% end %> <br> <% end %> - </span> + </span> <span class="bottomline"> <%= n_('{{count}} request made.', '{{count}} requests made.', public_body.info_requests.size, :count => public_body.info_requests.size) %> - <% if !public_body.is_requestable? && public_body.not_requestable_reason != 'bad_contact' %> - <% if public_body.not_requestable_reason == 'defunct' %> - <%= _('Defunct.') %> - <% end %> - <% else %> - <% if !@include_request_link_in_authority_listing.nil? %> - <%= link_to _("Make your own request"), public_body_path(public_body) %>. - <% end %> - <% end %> <br> <span class="date_added"> <%= _("Added on {{date}}", :date => simple_date(public_body.created_at)) %>. </span> + <br> + <% if public_body.special_not_requestable_reason? %> + <% if public_body.not_requestable_reason == 'not_apply' %> + <%= _('FOI law does not apply to this authority.')%> + <% elsif public_body.not_requestable_reason == 'defunct' %> + <%= _('Defunct.')%> + <% end %> + <% end %> </span> + + <% if request_link && !public_body.special_not_requestable_reason? %> + <div class="make-request-quick-button"> + <%= link_to _("Make a request"), new_request_to_body_path(:url_name => public_body.url_name), :class => "link_button_green" %> + </div> + <% end %> </div> 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"} %> diff --git a/app/views/public_body/show.html.erb b/app/views/public_body/show.html.erb index 403216c6c..e7c5fa2b6 100644 --- a/app/views/public_body/show.html.erb +++ b/app/views/public_body/show.html.erb @@ -39,36 +39,22 @@ <% end %> </p> - <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %> - <% if @public_body.has_notes? %> - <p><%= @public_body.notes_as_html.html_safe %></p> - <% end %> - <% if @public_body.eir_only? %> - <p><%= _('You can only request information about the environment from this authority.')%></p> - <% end %> - <% else %> - <% if @public_body.not_requestable_reason == 'not_apply' %> - <p><%= _('Freedom of Information law does not apply to this authority, so you cannot make - a request to it.')%></p> - <% elsif @public_body.not_requestable_reason == 'defunct' %> - <p><%= _('This authority no longer exists, so you cannot make a request to it.')%></p> - <% else %> - <p><%= _('For an unknown reason, it is not possible to make a request to this authority.')%></p> - <% end %> - <% end %> - <div id="stepwise_make_request"> - <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %> - <%= link_to _("Make a request to this authority"), new_request_to_body_path(:url_name => @public_body.url_name), :class => "link_button_green" %> - <% elsif @public_body.has_notes? %> - <%= @public_body.notes_as_html.html_safe %> - <% end %> + <% if @public_body.has_notes? %> + <%= @public_body.notes_as_html.html_safe %> + <% end %> - <% if @public_body.override_request_email %> - <p> - <%= _("<strong>Note:</strong> Because we're testing, requests are being sent to {{email}} rather than to the actual authority.", :email => @public_body.override_request_email) %> - </p> + <% if @public_body.is_requestable? %> + <% if @public_body.eir_only? %> + <p><%= _('You can only request information about the environment from this authority.')%></p> <% end %> + + <%= link_to _("Make a request to this authority"), + new_request_to_body_path(:url_name => @public_body.url_name), + :class => "link_button_green" %> + <% else %> + <p><%= public_body_not_requestable_reasons(@public_body).first %></p> + <% end %> </div> </div> diff --git a/app/views/public_body/view_email.html.erb b/app/views/public_body/view_email.html.erb index 5f4bc95f4..399caaa61 100644 --- a/app/views/public_body/view_email.html.erb +++ b/app/views/public_body/view_email.html.erb @@ -24,7 +24,7 @@ </p> <p> - <% if @public_body.is_requestable? || @public_body.not_requestable_reason != 'bad_contact' %> + <% if @public_body.has_request_email? %> <%= raw(_('If the address is wrong, or you know a better address, please <a href="{{url}}">contact us</a>.', :url => help_contact_path.html_safe)) %> <% else %> <%= raw(_(' If you know the address to use, then please <a href="{{url}}">send it to us</a>. diff --git a/app/views/request/_request_sent.html.erb b/app/views/request/_request_sent.html.erb index 5ce6f5317..3525ba2be 100644 --- a/app/views/request/_request_sent.html.erb +++ b/app/views/request/_request_sent.html.erb @@ -1,19 +1,62 @@ -<div id="notice"> - <p> - <%= _("Your {{law_used_full}} request has been <strong>sent on its way</strong>!", - :law_used_full => @info_request.law_used_full) %> - </p> +<div id="content"> + <div class="request-sent-message" id="notice"> + <h1> + <%= _("Your {{law_used_full}} request has been sent", + :law_used_full => @info_request.law_used_full) %> + </h1> + <div class="request-sent-message__row"> + <div class="request-sent-message__column-1"> + <p class="subtitle"> + <%= _("<strong>We will email you</strong> when there is a response, or after " \ + "{{late_number_of_days}} working days if the authority still hasn't " \ + "replied by then.", + :late_number_of_days => AlaveteliConfiguration.reply_late_after_days) %> + </p> - <p> - <%= _("<strong>We will email you</strong> when there is a response, or after " \ - "{{late_number_of_days}} working days if the authority still hasn't " \ - "replied by then.", - :late_number_of_days => AlaveteliConfiguration.reply_late_after_days) %> - </p> + <h2><%= _("Share your request") %></h2> - <p> - <%= _("If you write about this request (for example in a forum or a blog) " \ - "please link to this page, and add an annotation below telling people " \ - "about your writing.") %> - </p> + <%= link_to image_tag("next-step-twitter.png", + :alt => _("Tweet it"), + :width => "120", + :height => "37"), + "https://twitter.com/intent/tweet?" << { + :url => request.url, + :via => AlaveteliConfiguration.twitter_username, + :text => "'#{ @info_request.title }'", + :related => _('alaveteli_foi:The software that runs {{site_name}}', :site_name => site_name) + }.to_query %> + + <%= link_to image_tag("next-step-facebook.png", + :alt => _("Share on Facebook"), + :width => "120", + :height => "37"), + "https://www.facebook.com/sharer/sharer.php?" << { + :u => request.url + }.to_query %> + + <h2><%= _("Keep your request up to date") %></h2> + <p> + <%= _('If you write about this request ' \ + '(for example in a forum or a blog) ' \ + 'please link to this page, and <a href="{{url}}">add an ' \ + 'annotation</a> below telling people ' \ + 'about your writing.', :url => new_comment_url(:url_title => @info_request.url_title).html_safe) %> + </p> + </div> + <div class="request-sent-message__column-2"> + <div class="what-next"> + <h2><%= _("What next?") %></h2> + <ul class="what-next__list"> + <li> + <%= link_to _("View other requests to {{public_body}}", :public_body => @info_request.public_body.name), public_body_path(@info_request.public_body) %> + </li> + <li> + <%= link_to _("Help us classify requests that haven't " \ + "been updated"), categorise_play_path %> + </li> + </ul> + </div> + </div> + </div> + </div> </div> diff --git a/app/views/request/new.html.erb b/app/views/request/new.html.erb index 51224129e..688d9e87b 100644 --- a/app/views/request/new.html.erb +++ b/app/views/request/new.html.erb @@ -99,6 +99,12 @@ </div> <% end %> + <% if @info_request.public_body.override_request_email %> + <div class="warning"> + <%= _("<strong>Note:</strong> Because we're testing, requests are being sent to {{email}} rather than to the actual authority.", :email => @info_request.public_body.override_request_email) %> + </div> + <% end %> + <% if @info_request.public_body.eir_only? %> <h3><%= _('Please ask for environmental information only') %></h3> diff --git a/app/views/request/select_authority.html.erb b/app/views/request/select_authority.html.erb index 134648264..9a5d565b6 100644 --- a/app/views/request/select_authority.html.erb +++ b/app/views/request/select_authority.html.erb @@ -18,9 +18,12 @@ <%= form_tag select_authority_path, { :id => 'search_form', :method => 'get' } do %> <div> <p> - <%= _(%Q(First, type in the <strong>name of the UK public authority</strong> you'd - like information from. <strong>By law, they have to respond</strong> - (<a href="{{url}}">why?</a>).), :url => (help_about_path(:anchor => 'whybother_them')).html_safe) %> + <%= _(%Q(First, type in the <strong>name of the public authority</strong> you'd + like information from.)) %> + <% if AlaveteliConfiguration.authority_must_respond %> + <%= _(%Q(<strong>By law, they have to respond</strong> (<a href="{{url}}">why?</a>).), + :url => (help_about_path(:anchor => 'whybother_them')).html_safe) %> + <% end %> </p> <%= text_field_tag :query, diff --git a/app/views/user/_signin.html.erb b/app/views/user/_signin.html.erb index 7428082d3..f63c289df 100644 --- a/app/views/user/_signin.html.erb +++ b/app/views/user/_signin.html.erb @@ -22,9 +22,12 @@ </p> <p class="form_checkbox"> - <%= check_box_tag 'remember_me', "1", false, :tabindex => 90 %> - <label for="remember_me"><%= _('Remember me</label> (keeps you signed in longer; - do not use on a public computer) ')%></p> + <%= check_box_tag 'remember_me', "1", false, :tabindex => 90 %> + + <label for="remember_me"> + <%= _('Remember me (keeps you signed in longer; do not use on a public computer)') %> + </label> + </p> <div class="form_button"> <%= hidden_field_tag 'token', params[:token], {:id => 'signin_token' } %> |