diff options
Diffstat (limited to 'app')
40 files changed, 1701 insertions, 1273 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0df3e22da..6d14d0d7a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -8,6 +8,7 @@ # # $Id: application.rb,v 1.59 2009-09-17 13:01:56 francis Exp $ +require 'open-uri' class ApplicationController < ActionController::Base # Standard headers, footers and navigation for whole site @@ -101,11 +102,17 @@ class ApplicationController < ActionController::Base # Make sure expiry time for session is set (before_filters are # otherwise missed by this override) session_remember_me - + case exception + when ActiveRecord::RecordNotFound, ActionController::UnknownAction, ActionController::RoutingError + @status = 404 + else + @status = 500 + end # Display user appropriate error message @exception_backtrace = exception.backtrace.join("\n") @exception_class = exception.class.to_s - render :template => "general/exception_caught.rhtml", :status => 404 + @exception_message = exception.message + render :template => "general/exception_caught.rhtml", :status => @status end # For development sites. @@ -349,6 +356,115 @@ class ApplicationController < ActionController::Base session[:last_body_id] = public_body.id end + def param_exists(item) + return params[item] && !params[item].empty? + end + + def get_request_variety_from_params + query = "" + sortby = "newest" + varieties = [] + if params[:request_variety] && !(query =~ /variety:/) + if params[:request_variety].include? "sent" + varieties -= ['variety:sent', 'variety:followup_sent', 'variety:response', 'variety:comment'] + varieties << ['variety:sent', 'variety:followup_sent'] + end + if params[:request_variety].include? "response" + varieties << ['variety:response'] + end + if params[:request_variety].include? "comment" + varieties << ['variety:comment'] + end + end + if !varieties.empty? + query = " (#{varieties.join(' OR ')})" + end + return query + end + + def get_status_from_params + query = "" + if params[:latest_status] + statuses = [] + if params[:latest_status].class == String + params[:latest_status] = [params[:latest_status]] + end + if params[:latest_status].include?("recent") || params[:latest_status].include?("all") + query += " variety:sent" + end + if params[:latest_status].include? "successful" + statuses << ['latest_status:successful', 'latest_status:partially_successful'] + end + if params[:latest_status].include? "unsuccessful" + statuses << ['latest_status:rejected', 'latest_status:not_held'] + end + if params[:latest_status].include? "awaiting" + statuses << ['latest_status:waiting_response', 'latest_status:waiting_clarification', 'waiting_classification:true'] + end + if params[:latest_status].include? "internal_review" + statuses << ['status:internal_review'] + end + if params[:latest_status].include? "other" + statuses << ['latest_status:gone_postal', 'latest_status:error_message', 'latest_status:requires_admin', 'latest_status:user_withdrawn'] + end + if params[:latest_status].include? "gone_postal" + statuses << ['latest_status:gone_postal'] + end + if !statuses.empty? + query = " (#{statuses.join(' OR ')})" + end + end + return query + end + + def get_date_range_from_params + query = "" + if param_exists(:request_date_after) && !param_exists(:request_date_before) + params[:request_date_before] = Time.now.strftime("%d/%m/%Y") + query += " #{params[:request_date_after]}..#{params[:request_date_before]}" + elsif !param_exists(:request_date_after) && param_exists(:request_date_before) + params[:request_date_after] = "01/01/2001" + end + if param_exists(:request_date_after) + query = " #{params[:request_date_after]}..#{params[:request_date_before]}" + end + return query + end + + def get_tags_from_params + query = "" + tags = [] + if param_exists(:tags) + params[:tags].split().each do |tag| + tags << "tag:#{tag}" + end + end + if !tags.empty? + query = " (#{tags.join(' OR ')})" + end + return query + end + + def make_query_from_params + query = params[:query] || "" if query.nil? + query += get_date_range_from_params + query += get_request_variety_from_params + query += get_status_from_params + query += get_tags_from_params + return query + end + + def country_from_ip + gaze = MySociety::Config.get('GAZE_URL', '') + default = MySociety::Config.get('ISO_COUNTRY_CODE', '') + country = "" + if !gaze.empty? + country = open("#{gaze}/gaze-rest?f=get_country_from_ip;ip=#{request.remote_ip}").read.strip + end + country = default if country.empty? + return country + end + # URL generating functions are needed by all controllers (for redirects), # views (for links) and mailers (for use in emails), so include them into # all of all. diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index 4fa603aab..1ddf3acff 100644 --- a/app/controllers/general_controller.rb +++ b/app/controllers/general_controller.rb @@ -45,10 +45,6 @@ class GeneralController < ApplicationController :joins => :translations) end end - @search_examples = MySociety::Config.get('FRONTPAGE_SEARCH_EXAMPLES', '').split(/\s*;\s*/) - if @search_examples.empty? - @search_examples = @popular_bodies.map { |body| body.name } - end # Get some successful requests # begin query = 'variety:response (status:successful OR status:partially_successful)' @@ -82,20 +78,34 @@ class GeneralController < ApplicationController # Just does a redirect from ?query= search to /query def search_redirect - @query = params[:query] + if params[:advanced].nil? + @query, _ = make_query_from_params + else + @query, _ = params[:query] + end @sortby = params[:sortby] - @bodies = params[:bodies] + path = request.path.split("/") + if path.size > 0 && (['newest', 'described', 'relevant'].include?(path[-1])) + @sort_postfix = path.pop + end + if path.size > 0 && (['bodies', 'requests', 'users', 'all'].include?(path[-1])) + @variety_postfix = path.pop + end + @variety_postfix = params[:bodies] if @variety_postfix.nil? && !params[:bodies].nil? + @variety_postfix = "all" if @variety_postfix.nil? + if @variety_postfix != "users" + @common_query = get_tags_from_params + end + [:latest_status, :request_variety, :request_date_after, :request_date_before, :query, :tags].each do |x| + session[x] = params[x] + end if @query.nil? || @query.empty? @query = nil @page = 1 + @advanced = !params[:advanced].nil? render :action => "search" else - if (@bodies == '1') && (@sortby.nil? || @sortby.empty?) - @postfix = 'bodies' - else - @postfix = @sortby - end - redirect_to search_url(@query, @postfix) + redirect_to search_url(@query, @variety_postfix, @sort_postfix, params[:advanced]) end end @@ -103,23 +113,49 @@ class GeneralController < ApplicationController def search # XXX Why is this so complicated with arrays and stuff? Look at the route # in config/routes.rb for comments. + if !params[:commit].nil? + search_redirect + return + end + [:latest_status, :request_variety, :request_date_after, :request_date_before, :query, :tags].each do |x| + params[x] = session[x] + end combined = params[:combined] @sortby = nil - @bodies = false # searching from front page, largely for a public authority + @bodies = @requests = @users = true + if combined.size > 0 && (['advanced'].include?(combined[-1])) + combined.pop + @advanced = true + else + @advanced = false + end # XXX currently /described isn't linked to anywhere, just used in RSS and for /list/successful # This is because it's confusingly different from /newest - but still useful for power users. - if combined.size > 1 && (['newest', 'described', 'bodies', 'relevant'].include?(combined[-1])) - @postfix = combined[-1] - combined = combined[0..-2] - if @postfix == 'bodies' + if combined.size > 0 && (['newest', 'described', 'relevant'].include?(combined[-1])) + @sort_postfix = combined.pop + @sortby = @sort_postfix + end + + if combined.size > 0 && (['bodies', 'requests', 'users', 'all'].include?(combined[-1])) + @variety_postfix = combined.pop + case @variety_postfix + when 'bodies' @bodies = true - else - @sortby = @postfix + @requests = false + @users = false + when 'requests' + @bodies = false + @requests = true + @users = false + when 'users' + @bodies = false + @requests = false + @users = true end end @query = combined.join("/") - @inputted_sortby = @sortby + @common_query = get_tags_from_params if @sortby.nil? # Parse query, so can work out if it has prefix terms only - if so then it is a # structured query which should show newest first, rather than a free text search @@ -145,21 +181,41 @@ class GeneralController < ApplicationController if params[:requests_per_page] requests_per_page = params[:requests_per_page].to_i end - @xapian_requests = perform_search([InfoRequestEvent], @query, @sortby, 'request_collapse', requests_per_page) - @requests_per_page = @per_page - @xapian_bodies = perform_search([PublicBody], @query, @sortby, nil, 5) - @bodies_per_page = @per_page - @xapian_users = perform_search([User], @query, @sortby, nil, 5) - @users_per_page = @per_page - - @this_page_hits = @xapian_requests.results.size + @xapian_bodies.results.size + @xapian_users.results.size - @total_hits = @xapian_requests.matches_estimated + @xapian_bodies.matches_estimated + @xapian_users.matches_estimated + @this_page_hits = @total_hits = @xapian_requests_hits = @xapian_bodies_hits = @xapian_users_hits = 0 + if @requests + @xapian_requests = perform_search([InfoRequestEvent], @query, @sortby, 'request_collapse', requests_per_page) + @requests_per_page = @per_page + @this_page_hits += @xapian_requests.results.size + @xapian_requests_hits = @xapian_requests.results.size + @xapian_requests_total_hits = @xapian_requests.matches_estimated + @total_hits += @xapian_requests.matches_estimated + end + if @bodies + @xapian_bodies = perform_search([PublicBody], @query, @sortby, nil, 5) + @bodies_per_page = @per_page + @this_page_hits += @xapian_bodies.results.size + @xapian_bodies_hits = @xapian_bodies.results.size + @xapian_bodies_total_hits = @xapian_bodies.matches_estimated + @total_hits += @xapian_bodies.matches_estimated + end + if @users + @xapian_users = perform_search([User], @query, @sortby, nil, 5) + @users_per_page = @per_page + @this_page_hits += @xapian_users.results.size + @xapian_users_hits = @xapian_users.results.size + @xapian_users_total_hits = @xapian_users.matches_estimated + @total_hits += @xapian_users.matches_estimated + end # Spelling and highight words are same for all three queries - @spelling_correction = @xapian_requests.spelling_correction - @highlight_words = @xapian_requests.words_to_highlight + if !@xapian_requests.nil? + @highlight_words = @xapian_requests.words_to_highlight + if !(@xapian_requests.spelling_correction =~ /[a-z]+:/) + @spelling_correction = @xapian_requests.spelling_correction + end + end - @track_thing = TrackThing.create_track_for_search_query(@query) + @track_thing = TrackThing.create_track_for_search_query(@query, @variety_postfix) @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss], :has_json => true } ] end diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index 05acf4868..1a46cb62f 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -16,11 +16,10 @@ class PublicBodyController < ApplicationController redirect_to :url_name => MySociety::Format.simplify_url_part(params[:url_name], 'body'), :status => :moved_permanently return end - @locale = self.locale_from_params() PublicBody.with_locale(@locale) do @public_body = PublicBody.find_by_url_name_with_historic(params[:url_name]) - raise "None found" if @public_body.nil? # XXX proper 404 + raise ActiveRecord::RecordNotFound.new("None found") if @public_body.nil? # XXX proper 404 if @public_body.url_name.nil? redirect_to :back return @@ -39,11 +38,16 @@ class PublicBodyController < ApplicationController if !referrer.nil? && referrer.match(%r{^#{top_url}search/.*/bodies$}) @searched_to_send_request = true end + @view = params[:view] + params[:latest_status] = @view + query = make_query_from_params + query += " requested_from:#{@public_body.url_name}" # Use search query for this so can collapse and paginate easily # XXX really should just use SQL query here rather than Xapian. + sortby = "described" begin - @xapian_requests = perform_search([InfoRequestEvent], 'requested_from:' + @public_body.url_name, 'newest', 'request_collapse') + @xapian_requests = perform_search([InfoRequestEvent], query, sortby, 'request_collapse') if (@page > 1) @page_desc = " (page " + @page.to_s + ")" else @@ -83,31 +87,34 @@ class PublicBodyController < ApplicationController def list long_cache # XXX move some of these tag SQL queries into has_tag_string.rb + @query = "%#{params[:public_body_query].nil? ? "" : params[:public_body_query]}%" @tag = params[:tag] @locale = self.locale_from_params() - locale_condition = 'public_body_translations.locale = ?' - if @tag.nil? + locale_condition = "(upper(public_body_translations.name) LIKE upper(?) OR upper(public_body_translations.notes) LIKE upper (?)) AND public_body_translations.locale = ?" + if @tag.nil? or @tag == "all" @tag = "all" - conditions = [locale_condition, @locale] + conditions = [locale_condition, @query, @query, @locale] elsif @tag == 'other' category_list = PublicBodyCategories::CATEGORIES.map{|c| "'"+c+"'"}.join(",") conditions = [locale_condition + ' AND (select count(*) from has_tag_string_tags where has_tag_string_tags.model_id = public_bodies.id and has_tag_string_tags.model = \'PublicBody\' - and has_tag_string_tags.name in (' + category_list + ')) = 0', @locale] + and has_tag_string_tags.name in (' + category_list + ')) = 0', @query, @query, @locale] elsif @tag.size == 1 @tag.upcase! - conditions = [locale_condition + ' AND public_body_translations.first_letter = ?', @locale, @tag] + conditions = [locale_condition + ' AND public_body_translations.first_letter = ?', @query, @query, @locale, @tag] elsif @tag.include?(":") name, value = HasTagString::HasTagStringTag.split_tag_into_name_value(@tag) conditions = [locale_condition + ' AND (select count(*) from has_tag_string_tags where has_tag_string_tags.model_id = public_bodies.id and has_tag_string_tags.model = \'PublicBody\' - and has_tag_string_tags.name = ? and has_tag_string_tags.value = ?) > 0', @locale, name, value] + and has_tag_string_tags.name = ? and has_tag_string_tags.value = ?) > 0', @query, @query, @locale, name, value] else conditions = [locale_condition + ' AND (select count(*) from has_tag_string_tags where has_tag_string_tags.model_id = public_bodies.id and has_tag_string_tags.model = \'PublicBody\' - and has_tag_string_tags.name = ?) > 0', @locale, @tag] + and has_tag_string_tags.name = ?) > 0', @query, @query, @locale, @tag] end - if @tag.size == 1 + if @tag == "all" + @description = "" + elsif @tag.size == 1 @description = _("beginning with") + " '" + @tag + "'" else @description = PublicBodyCategories::CATEGORIES_BY_TAG[@tag] diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index c1a13273a..10c0917c8 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -37,7 +37,7 @@ class RequestController < ApplicationController # Look up by new style text names @info_request = InfoRequest.find_by_url_title(params[:url_title]) if @info_request.nil? - raise "Request not found" + raise ActiveRecord::RecordNotFound.new("Request not found") end set_last_request(@info_request) @@ -129,26 +129,10 @@ class RequestController < ApplicationController def list medium_cache @view = params[:view] - - if @view.nil? - redirect_to request_list_url(:view => 'successful') - return - end - - if @view == 'recent' - @title = _("Recently sent Freedom of Information requests") - query = "variety:sent"; - sortby = "newest" - @track_thing = TrackThing.create_track_for_all_new_requests - elsif @view == 'successful' - @title = _("Recently successful responses") - query = 'variety:response (status:successful OR status:partially_successful)' - sortby = "described" - @track_thing = TrackThing.create_track_for_all_successful_requests - else - raise "unknown request list view " + @view.to_s - end - + params[:latest_status] = @view + query = make_query_from_params + @title = "View and search requests" + sortby = "newest" @page = get_search_page_from_params if !@page # used in cache case, as perform_search sets @page as side effect behavior_cache :tag => [@view, @page] do xapian_object = perform_search([InfoRequestEvent], query, sortby, 'request_collapse') @@ -157,7 +141,7 @@ class RequestController < ApplicationController end @title = @title + " (page " + @page.to_s + ")" if (@page > 1) - + @track_thing = TrackThing.create_track_for_search_query(query) @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss], :has_json => true } ] # Don't let robots go more than 20 pages in @@ -203,7 +187,7 @@ class RequestController < ApplicationController params[:info_request][:public_body_id] = params[:url_name] else public_body = PublicBody.find_by_url_name_with_historic(params[:url_name]) - raise "None found" if public_body.nil? # XXX proper 404 + raise ActiveRecord::RecordNotFound.new("None found") if public_body.nil? # XXX proper 404 params[:info_request][:public_body_id] = public_body.id end elsif params[:public_body_id] @@ -686,10 +670,10 @@ class RequestController < ApplicationController raise "internal error, pre-auth filter should have caught this" if !@info_request.user_can_view?(authenticated_user) @attachment = IncomingMessage.get_attachment_by_url_part_number(@incoming_message.get_attachments_for_display, @part_number) - raise "attachment not found part number " + @part_number.to_s + " incoming_message " + @incoming_message.id.to_s if @attachment.nil? + raise ActiveRecord::RecordNotFound.new("attachment not found part number " + @part_number.to_s + " incoming_message " + @incoming_message.id.to_s) if @attachment.nil? # check filename in URL matches that in database (use a censor rule if you want to change a filename) - raise "please use same filename as original file has, display: '" + @attachment.display_filename + "' old_display: '" + @attachment.old_display_filename + "' original: '" + @original_filename + "'" if @attachment.display_filename != @original_filename && @attachment.old_display_filename != @original_filename + raise ActiveRecord::RecordNotFound.new("please use same filename as original file has, display: '" + @attachment.display_filename + "' old_display: '" + @attachment.old_display_filename + "' original: '" + @original_filename + "'") if @attachment.display_filename != @original_filename && @attachment.old_display_filename != @original_filename @attachment_url = get_attachment_url(:id => @incoming_message.info_request_id, :incoming_message_id => @incoming_message.id, :part => @part_number, diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index d3c42c7f1..6916b4456 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -24,7 +24,7 @@ class UserController < ApplicationController @display_user = User.find(:first, :conditions => [ "url_name = ? and email_confirmed = ?", params[:url_name], true ]) if not @display_user - raise "user not found, url_name=" + params[:url_name] + raise ActiveRecord::RecordNotFound.new("user not found, url_name=" + params[:url_name]) end @same_name_users = User.find(:all, :conditions => [ "name ilike ? and email_confirmed = ? and id <> ?", @display_user.name, true, @display_user.id ], :order => "created_at") @@ -71,7 +71,7 @@ class UserController < ApplicationController # Login form def signin work_out_post_redirect - + @request_from_foreign_country = country_from_ip != MySociety::Config.get('ISO_COUNTRY_CODE', 'GB') # make sure we have cookies if session.instance_variable_get(:@dbman) if not session.instance_variable_get(:@dbman).instance_variable_get(:@original) @@ -118,10 +118,15 @@ class UserController < ApplicationController # Create new account form def signup work_out_post_redirect - + @request_from_foreign_country = country_from_ip != MySociety::Config.get('ISO_COUNTRY_CODE', 'GB') # Make the user and try to save it @user_signup = User.new(params[:user_signup]) - if !@user_signup.valid? + error = false + if @request_from_foreign_country && !verify_recaptcha + flash.now[:error] = _("There was an error with the words you entered, please try again.") + error = true + end + if error || !@user_signup.valid? # Show the form render :action => 'sign' else @@ -133,7 +138,6 @@ class UserController < ApplicationController # New unconfirmed user @user_signup.email_confirmed = false @user_signup.save! - send_confirmation_mail @user_signup return end @@ -454,7 +458,7 @@ class UserController < ApplicationController def get_profile_photo @display_user = User.find(:first, :conditions => [ "url_name = ? and email_confirmed = ?", params[:url_name], true ]) if !@display_user - raise "user not found, url_name=" + params[:url_name] + raise ActiveRecord::RecordNotFound.new("user not found, url_name=" + params[:url_name]) end if !@display_user.profile_photo raise "user has no profile photo, url_name=" + params[:url_name] diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb index 34354a79b..54b8d69d0 100755 --- a/app/helpers/link_to_helper.rb +++ b/app/helpers/link_to_helper.rb @@ -79,7 +79,7 @@ module LinkToHelper link_to(h(public_body.name), main_url(public_body_url(public_body))) + " (" + link_to("admin", public_body_admin_url(public_body)) + ")" end def list_public_bodies_default - list_public_bodies_url(:tag => 'a') + list_public_bodies_url(:tag => 'all') end # Users @@ -135,11 +135,10 @@ module LinkToHelper end end - # General pages. postfix is either the sort order, or 'bodies' to show you - # came from the front page and are looking for public bodies - def search_url(query, postfix = nil) + # General pages. + def search_url(query, variety_postfix = nil, sort_postfix = nil, advanced = nil) + query = query - ["", nil] if query.kind_of?(Array) url = search_general_url(:combined => query) - # Here we can't escape the slashes, as RFC 2396 doesn't allow slashes # within a path component. Rails is assuming when generating URLs that # either there aren't slashes, or we are in a query part where you can @@ -151,13 +150,19 @@ module LinkToHelper # http://rails.lighthouseapp.com/projects/8994/tickets/144-patch-bug-in-rails-route-globbing url = url.gsub("%2F", "/") - if !postfix.nil? && !postfix.empty? - url = url + "/" + postfix + if !variety_postfix.nil? && !variety_postfix.empty? + url = url + "/" + variety_postfix + end + if !sort_postfix.nil? && !sort_postfix.empty? + url = url + "/" + sort_postfix + end + if !advanced.nil? && (advanced) + url = url + "/advanced" end return url end - def search_link(query, postfix = nil) - link_to h(query), search_url(query, postfix) + def search_link(query, variety_postfix = nil, sort_postfix = nil, advanced = nil) + link_to h(query), search_url(query, variety_postfix, sort_postfix, advanced) end # Admin pages diff --git a/app/models/info_request.rb b/app/models/info_request.rb index c667e1499..9b0f1047b 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -451,7 +451,7 @@ public self.log_event("response", params) self.save! end - + self.info_request_events.each { |event| event.xapian_mark_needs_index } # for the "waiting_classification" index RequestMailer.deliver_new_response(self, incoming_message) end @@ -564,6 +564,7 @@ public def calculate_event_states curr_state = nil for event in self.info_request_events.reverse + event.xapian_mark_needs_index # we need to reindex all events in order to update their latest_* terms if curr_state.nil? if !event.described_state.nil? curr_state = event.described_state diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index 1550a4bf5..4003217b0 100644 --- a/app/models/info_request_event.rb +++ b/app/models/info_request_event.rb @@ -94,7 +94,7 @@ class InfoRequestEvent < ActiveRecord::Base [ :created_at_numeric, 1, "created_at", :number ], # for sorting [ :described_at_numeric, 2, "described_at", :number ], # XXX using :number for lack of :datetime support in Xapian values [ :request, 3, "request_collapse", :string ], - [ :request_title_collapse, 4, "request_title_collapse", :string ] + [ :request_title_collapse, 4, "request_title_collapse", :string ], ], :terms => [ [ :calculated_state, 'S', "status" ], [ :requested_by, 'B', "requested_by" ], @@ -102,6 +102,9 @@ class InfoRequestEvent < ActiveRecord::Base [ :commented_by, 'C', "commented_by" ], [ :request, 'R', "request" ], [ :variety, 'V', "variety" ], + [ :latest_variety, 'K', "latest_variety" ], + [ :latest_status, 'L', "latest_status" ], + [ :waiting_classification, 'W', "waiting_classification" ], [ :filetype, 'T', "filetype" ], [ :tags, 'U', "tag" ] ], @@ -129,6 +132,27 @@ class InfoRequestEvent < ActiveRecord::Base def request self.info_request.url_title end + + def latest_variety + for event in self.info_request.info_request_events.reverse + if !event.variety.nil? and !event.variety.empty? + return event.variety + end + end + end + + def latest_status + for event in self.info_request.info_request_events.reverse + if !event.calculated_state.nil? and !event.calculated_state.empty? + return event.calculated_state + end + end + end + + def waiting_classification + self.info_request.awaiting_description == true ? "yes" : "no" + end + def request_title_collapse url_title = self.info_request.url_title # remove numeric section from the end, use this to group lots diff --git a/app/models/public_body.rb b/app/models/public_body.rb index c19433704..81149e3c2 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -206,7 +206,7 @@ class PublicBody < ActiveRecord::Base return self.created_at.strftime("%Y%m%d%H%M%S") end def variety - "authority" + return "authority" end # if the URL name has changed, then all requested_from: queries diff --git a/app/models/track_thing.rb b/app/models/track_thing.rb index 16a0dab87..82848341d 100644 --- a/app/models/track_thing.rb +++ b/app/models/track_thing.rb @@ -105,10 +105,25 @@ class TrackThing < ActiveRecord::Base return track_thing end - def TrackThing.create_track_for_search_query(query) + def TrackThing.create_track_for_search_query(query, variety_postfix = nil) track_thing = TrackThing.new track_thing.track_type = 'search_query' + if !(query =~ /variety:/) + case variety_postfix + when "requests" + query += " variety:sent" + when "users" + query += " variety:user" + when "authorities" + query += " variety:authority" + end + end track_thing.track_query = query + # XXX should extract requested_by:, request:, requested_from: + # and stick their values into the respective relations. + # Should also update "params" to make the list_description + # nicer and more generic. It will need to do some clever + # parsing of the query to do this nicely return track_thing end @@ -203,15 +218,15 @@ class TrackThing < ActiveRecord::Base @params = { # Website :list_description => "'<a href=\"/search/" + CGI.escapeHTML(self.track_query) + "/newest\">" + CGI.escapeHTML(self.track_query) + "</a>' in new requests/responses", # XXX yeuch, sometimes I just want to call view helpers from the model, sorry! can't work out how - :verb_on_page => _("Track things matching '{{query}}' by email", :query=>CGI.escapeHTML(self.track_query)), - :verb_on_page_already => _("You are already tracking things matching '{{query}}' by email", :query=>CGI.escapeHTML(self.track_query)), + :verb_on_page => _("Track things matching this search by email"), + :verb_on_page_already => _("You are already tracking things matching this search by email"), # Email - :title_in_email => _("Requests or responses matching '{{query}}'", :query=>self.track_query), - :title_in_rss => _("Requests or responses matching '{{query}}'", :query=>self.track_query), + :title_in_email => _("Requests or responses matching your saved search"), + :title_in_rss => _("Requests or responses matching your saved search"), # Authentication - :web => _("To follow requests and responses matching '{{query}}'", :query=>CGI.escapeHTML(self.track_query)), - :email => _("Then you will be emailed whenever a new request or response matches '{{query}}'.", :query=>CGI.escapeHTML(self.track_query)), - :email_subject => _("Confirm you want to be emailed about new requests or responses matching '{{query}}'", :query=>self.track_query), + :web => _("To follow requests and responses matching your search"), + :email => _("Then you will be emailed whenever a new request or response matches your search."), + :email_subject => _("Confirm you want to be emailed about new requests or responses matching your search"), # RSS sorting - XXX hmmm, we don't really know which to use # here for sorting. Might be a query term (e.g. 'cctv'), in # which case newest is good, or might be something like diff --git a/app/views/general/_frontpage_intro_sentence.rhtml b/app/views/general/_frontpage_intro_sentence.rhtml index 2c3bcaf83..4e6dbecb3 100644 --- a/app/views/general/_frontpage_intro_sentence.rhtml +++ b/app/views/general/_frontpage_intro_sentence.rhtml @@ -1,3 +1,3 @@ -First, type in the <strong>name of the UK public authority</strong> you'd -<br>like information from. <strong>By law, they have to respond</strong> -(<a href="<%= help_about_url %>">why?</a>). +<h3>Use your Right to Know</h3> + +Every citizen has the right to access information held by public authorities. <strong>By law, they have to respond</strong>. <a href="<%= help_about_url %>">Find out more about freedom of information.</a> diff --git a/app/views/general/_localised_datepicker.rhtml b/app/views/general/_localised_datepicker.rhtml new file mode 100644 index 000000000..5fdd63644 --- /dev/null +++ b/app/views/general/_localised_datepicker.rhtml @@ -0,0 +1,18 @@ +<script type="text/javascript"> + $(function() { + $(".use-datepicker").datepicker( + {closeText: '<%= _("Done") %>', + prevText: '<%= _("Prev") %>', + nextText: '<%= _("Next") %>', + currentText: '<%= _("Today") %>', + monthNames: <%= I18n.translate('date.month_names')[1..-1].to_json %>, + monthNamesShort: <%= I18n.translate('date.abbr_month_names')[1..-1].to_json %>, + dayNames: <%= I18n.translate('date.day_names').to_json %>, + dayNamesShort: <%= I18n.translate('date.abbr_day_names').to_json %>, + dayNamesMin: <%= I18n.translate('date.abbr_day_names').collect{|x| x[0..0]}.to_json %>, + weekHeader: '<%= _("Wk") %>', + dateFormat: '<%= I18n.translate('date.formats.default').sub("%Y", "yy").sub("%m", "mm").sub("%d", "dd").gsub("-", "/") %>'} + ); + }); +</script> + diff --git a/app/views/general/advanced_search.rhtml b/app/views/general/advanced_search.rhtml new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/app/views/general/advanced_search.rhtml diff --git a/app/views/general/blog.rhtml b/app/views/general/blog.rhtml index c9387c24f..4bc23832d 100644 --- a/app/views/general/blog.rhtml +++ b/app/views/general/blog.rhtml @@ -1,56 +1,63 @@ <% @title = "#{site_name} blog and tweets" %> -<h1><%=@title %></h1> - <img src="/images/twitter.png" alt="twitter icon" valign="middle"> <a href="http://www.twitter.com/<%= MySociety::Config.get('TWITTER_USERNAME') %>">Follow us on twitter</a> - <img src="/images/rss.png" alt="RSS icon" valign="middle"> <a href="<%= MySociety::Config.get('BLOG_FEED') %>">Subscribe to blog</a> <% if !@twitter_user.empty? %> -<div id="twitter"> -<script src="http://widgets.twimg.com/j/2/widget.js"></script> -<script> -new TWTR.Widget({ - version: 2, - type: 'profile', - rpp: 15, - interval: 6000, - width: 'auto', - height: 500, - theme: { - shell: { - background: '#eaeaea', - color: '#000000' +<div id="right_column"> + <div class="act_link"> + <h2>Stay up to date</h2> + <img src="/images/twitter-16.png" alt="twitter icon" valign="middle"> <a href="http://www.twitter.com/<%= MySociety::Config.get('TWITTER_USERNAME') %>">Follow us on twitter</a><br/><br/> + <img src="/images/feed-16.png" alt="RSS icon" valign="middle"> <a href="<%= MySociety::Config.get('BLOG_FEED') %>">Subscribe to blog</a> + </div> + <div id="twitter"> + <script src="http://widgets.twimg.com/j/2/widget.js"></script> + <script type="text/javascript"> + new TWTR.Widget({ + version: 2, + type: 'profile', + rpp: 15, + interval: 6000, + width: 'auto', + height: 500, + theme: { + shell: { + background: '#eaeaea', + color: '#000000' + }, + tweets: { + background: '#ffffff', + color: '#000000', + links: '#0b004a' + } }, - tweets: { - background: '#ffffff', - color: '#000000', - links: '#0b004a' + features: { + scrollbar: false, + loop: false, + live: false, + hashtags: true, + timestamp: true, + avatars: true, + behavior: 'all' } - }, - features: { - scrollbar: false, - loop: false, - live: false, - hashtags: true, - timestamp: true, - avatars: true, - behavior: 'all' - } -}).render().setUser('<%=@twitter_user %>').start(); -</script> - + }).render().setUser('<%=@twitter_user %>').start(); + </script> + </div> </div> <% end %> -<div id="blog"> - <% for item in @blog_items: %> - <div class="blog_post"> - <h2><a href="<%=item['link']%>"><%=h item['title'] %></a></h2> - <p class="subtitle">Posted on <%= simple_date(Time.parse(item['pubDate'][0])) %> by <%=h item['creator'] %></p> - <div><%= item['encoded'] %></div> - <p><em> - <a href="<%=item['comments'][0]%>"><%=item['comments'][1]%> comments</a> - </em> - </p> - </div> - <% end %> +<div id="left_column"> + <h1><%=@title %></h1> + + <div id="blog"> + <% for item in @blog_items: %> + <div class="blog_post"> + <h2><a href="<%=item['link']%>"><%=h item['title'] %></a></h2> + <p class="subtitle">Posted on <%= simple_date(Time.parse(item['pubDate'][0])) %> by <%=h item['creator'] %></p> + <div><%= item['encoded'] %></div> + <p><em> + <a href="<%=item['comments'][0]%>"><%=item['comments'][1]%> comments</a> + </em> + </p> + </div> + <% end %> + </div> </div> diff --git a/app/views/general/exception_caught.rhtml b/app/views/general/exception_caught.rhtml index ca36b592b..b266b53a1 100644 --- a/app/views/general/exception_caught.rhtml +++ b/app/views/general/exception_caught.rhtml @@ -1,17 +1,24 @@ -<h1><%= _("Sorry, we couldn't find that page") %></h1> +<div id="error-page"> + <% if @status == 404 %> + <h1><%= _("Sorry, we couldn't find that page") %></h1> -<p><%= _("The page either doesn't exist, or is broken. Things you can try now:")%></p> + <p><%= _("The page doesn't exist. Things you can try now:")%></p> -<ul> -<li><%= _("Check for mistakes if you typed or copied the address.")%></li> -<li><%= _("Search the site to find what you were looking for.")%> - <% form_tag({:controller => "general", :action => "search_redirect"}, {:id => "search_form"}) do %> - <%= text_field_tag 'query', params[:query], { :size => 30 } %> - <%= submit_tag _("Search") %> - <% end %> -</li> -<li><%= _('<a href="%s">Contact us</a> to tell us about the problem</li>') % [help_contact_path] %> -<li><%= _('Go to our <a href="%s">front page</a></li>') % ["/"] %> -</ul> + <ul> + <li><%= _("Check for mistakes if you typed or copied the address.")%></li> + <li><%= _("Search the site to find what you were looking for.")%> + <% form_tag({:controller => "general", :action => "search_redirect"}, {:id => "search_form"}) do %> + <%= text_field_tag 'query', params[:query], { :size => 30 } %> + <%= submit_tag _("Search") %> + <% end %> + </li> + </ul> + <% else %> + <h1><%= _("Sorry, there was a problem processing this page") %></h1> + <p><%= _('You have found a bug. Please <a href="{{contact_url}}">contact us</a> to tell us about the problem', :contact_url => help_contact_path) %></p> -<p id="error_technical_details"><%= _("<strong>Technical details:</strong>")%> <%=@exception_class ? @exception_class : _("Unknown")%></p> + <% end %> + <h2><%= _('Technical details') %></h2> + <p><strong><%=@exception_class ? @exception_class : _("Unknown")%></strong></p> + <p><strong><%=@exception_message %></strong></p> +</div> diff --git a/app/views/general/frontpage.rhtml b/app/views/general/frontpage.rhtml index 44b4980df..ee88d23a1 100644 --- a/app/views/general/frontpage.rhtml +++ b/app/views/general/frontpage.rhtml @@ -1,29 +1,37 @@ <% view_cache :ttl => 5.minutes, :tag => I18n.locale do %> -<div id="frontpage_search"> - <h1><%= _('Make or explore Freedom of Information requests') %></h1> + <div class="frontpage-box" id="frontpage-box-1"> + <%= render :partial => 'frontpage_intro_sentence' %> + </div> + + <div class="frontpage-box" id="frontpage-box-2"> + <div id="bighand"> + Make a new <strong>Freedom of Information</strong> request + <br /> + <a href="/en/new/tgq"><%= image_tag('start-button.png') %></a> + </div> + </div> + + <div class="frontpage-box" id="frontpage-box-3"> + <div id="littlehand"> + Search over <strong><%= InfoRequest.count %> requests</strong> and <strong><%= PublicBody.count %> authorities</strong>: <% form_tag({:action => "search_redirect"}, {:id => "search_form"}) do %> - <p> - <%= render :partial => 'frontpage_intro_sentence' %> - <br> - - <br> <%= text_field_tag 'query', params[:query], { :size => 30 } %> <%= hidden_field_tag 'bodies', 1 %> - <%= submit_tag _('Search') %> + <%= image_submit_tag 'button-search.png', :title => 'Search' %> <br> <%= render :partial => 'frontpage_search_examples' %> - <br> - <br> - <%= _('OR, <strong>search</strong> for information others have requested using {{site_name}}', :site_name => site_name) %> - </p> <% end %> -</div> + </div> + </div> + <div id="frontpage_examples"> <% if @popular_bodies.size > 0 %> <div id="examples_0"> + <h3>Who has the information?</h3> + <%= site_name %> covers requests to <%= PublicBody.count %> authorities, including: <ul> <% for popular_body in @popular_bodies %> <li><%=public_body_link(popular_body)%> @@ -32,23 +40,27 @@ <% end%> </ul> <p><strong> - <%= link_to _('More authorities...'), list_public_bodies_default %> + <%= link_to _('Browse all authorities...'), list_public_bodies_default %> </strong></p> </div> <% end %> - <% if @successful_request_events.size > 0 %> <div id="examples_1"> + <h3>What are people asking?</h3> + <%= site_name %> users have asked <%= InfoRequest.count %> questions. <ul> - <% for event in @successful_request_events %> - <li><%=link_to h(excerpt(event.info_request.title, "", 30)), request_url(event.info_request)%> - <%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %> + + <% for event in @successful_request_events %> + <li> + <%= public_body_link(event.info_request.public_body) %> answered a question about + <%=link_to h(event.info_request.title), request_url(event.info_request)%> + <%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %> + <p class="excerpt" onclick="document.location.href='<%=request_url(event.info_request)%>'"><%= excerpt(event.info_request.title, "", 200) %></p> </li> <% end %> </ul> <p><strong><%=link_to _('More successful requests...'), request_list_successful_url %></strong></p> </div> - <% end %> </div> diff --git a/app/views/general/search.rhtml b/app/views/general/search.rhtml index 1d934f65a..f0c5f1576 100644 --- a/app/views/general/search.rhtml +++ b/app/views/general/search.rhtml @@ -1,123 +1,214 @@ <% @show_tips = @xapian_requests.nil? || (@total_hits == 0) %> +<% @include_request_link_in_authority_listing = true %> + +<%= render :partial => 'localised_datepicker' %> + <% if @query.nil? %> <% @title = _("Search Freedom of Information requests, public authorities and users") %> - <h1><%=@title%></h1> <% elsif @total_hits == 0 %> - <%= _("Nothing found for ‘{{search_terms}}’", :search_terms => h(@query)) %> + <% @title = _('There were no requests matching your query.') %> <% else %> <% @title = _("Results page {{page_number}}", :page_number => @page.to_s) %> <% end%> -<% @include_request_link_in_authority_listing = true %> +<div id="header_left"> + <% if @query.nil? %> + <h1>Search</h1> + <% else %> + <h1>Search results</h1> + <% end%> -<% if @bodies && (@page == 1 || @xapian_bodies.results.size > 0) %> - <div id="stepwise_instructions"> - <p><strong><%=_("Next, select the public authority you'd like to make the request from.") %></strong></p> - <p><% _('Can\'t find it? <a href="%s">Browse all</a> or <a href="%s">ask us to add it</a>.') % [list_public_bodies_default, "#{help_requesting_path}#missing_body"] %></p> - <p> - </div> -<% end %> - -<% form_tag({:action => "search_redirect"}, {:id => "search_form"}) do %> - <p> - <%= text_field_tag 'query', @query, { :size => 40 } %> - <%= hidden_field_tag 'sortby', @inputted_sortby %> - <% if @bodies %> - <%= hidden_field_tag 'bodies', 1 %> - <% end %> - <%= submit_tag _("Search") %> - <% if not @show_tips %> - <%= link_to _('Advanced search tips'), search_redirect_path %> + <% if @advanced %> + <p><%= _('To use the advanced search, combine phrases and labels as described in the search tips below.') %></p> + <% form_tag(advanced_search_url, :method => "get") do %> + <p> + <%= text_field_tag :query, params[:query], { :size => 40 } %> + <%= hidden_field_tag 'sortby', @inputted_sortby %> + <% if @bodies %> + <%= hidden_field_tag 'bodies', 1 %> + <% end %> + <%= submit_tag _("Search") %> + <%= link_to _('Simple search'), search_redirect_path %> + </p> + <% end %> + <% else %> + <% form_tag(request.url, {:method => "get", :id => "search_form"}) do %> + <p> + <%= text_field_tag 'query', params[:query], { :size => 40 } %> + <%= hidden_field_tag 'sortby', @inputted_sortby %> + <% if @bodies %> + <%= hidden_field_tag 'bodies', 1 %> + <% end %> + <%= submit_tag _("Search") %> + </p> +<div id="common-subfilters"> + <div id="variety-filter"> + <h3 class="title"><%= _("Showing") %></h3> + <% labels = [ + ["all", _("everything")], + ["requests", _("requests")], + ["users", _("users")], + ["bodies", _("authorities")]]%> + <% for variety, label in labels %> + <% if @variety_postfix != variety %> + <% if variety != "users" %> + <%= link_to label, search_url([params[:query], @common_query], variety, @sort_postfix), :method => :get %> + <% else %> + <%= link_to label, search_url(params[:query], variety, @sort_postfix), :method => :get %> + <% end %> + <% else %> + <%= label %> <% end %> - </p> + <%= "|" unless variety == labels.last[0]%> + <% end %> + </div> + +<% if false %> +<%-# Commented out for now as tags are of limited use when users can't see them. This will change in the future! -%> +<% if @variety_postfix != "users" %> + <div> + <%= label_tag(:query, _("Tags (separated by a space):")) %><%= text_field_tag(:tags, params[:tags], { :size => 20 }) %> + <% for tag in InfoRequest.get_tags %> + <%= tag.name_and_value %> + <% end %> + </div> +<% end %> <% end %> +</div> -<% if !@query.nil? %> - <p> - <%=link_to_unless @sortby == 'relevant', _("Show most relevant results first"), search_url(@query, 'relevant') %> - | - <%=link_to_unless @sortby == 'newest', _("Newest results first"), search_url(@query, 'newest') %> - <% if @sortby == 'described' %> - | <%= _('Recently described results first') %> +<% if @variety_postfix == "requests" %> +<div id="requests-subfilters"> + <div> + <h3 class="title"><%= _("Restrict to") %></h3> + <% [["successful", _("successful requests")], + ["unsuccessful", _("unsuccessful requests")], + ["awaiting", _("unresolved requests")], + ["internal_review", _("internal reviews")]].each_with_index do |item, index| + status, title = item %> + + <%= check_box_tag "latest_status[]", status, params[:latest_status].nil? ? false : params[:latest_status].include?(status), :id => "latest_status_#{index}" %> + <%= label_tag("latest_status_#{index}", title) %> <br/> <% end %> - </p> + </div> + <div> + <h3 class="title"><%= _("Search in") %></h3> + <% [["sent", _("messages from users")], + ["response", _("messages from authorities")], + ["comment", _("comments")]].each_with_index do |item, index| + variety, title = item %> + + <%= check_box_tag "request_variety[]", variety, params[:request_variety].nil? ? true : params[:request_variety].include?(variety), :id => "request_variety_#{index}" %> + <%= label_tag("request_variety_#{index}", title) %> <br/> + <% end %> + </div> + <div id="date_range"> + <label class="form_label title" for="query">Made between</label> + <%= text_field_tag(:request_date_after, params[:request_date_after], {:class => "use-datepicker", :size => 10}) %> + <label class="form_label" for="query"> and</label> + <%= text_field_tag(:request_date_before, params[:request_date_before], {:class => "use-datepicker", :size => 10}) %> + </div> +</div> +<br/> +<% end %> + <%= submit_tag("Filter") if @variety_postfix == "requests"%> + <% end %> + <p><%= link_to(_("Advanced search"), advanced_search_url) %></p> <% end %> -<% if @bodies && !@query.nil? && @xapian_bodies.results.size == 0 && @page == 1 %> - <h1><%= _('No public authorities found') %></h1> - <% if @spelling_correction %> - <p id="did_you_mean"><%= _('Did you mean: {{correction}}', - :correction => search_link(@spelling_correction, @postfix)) %></p> - <% end %> - <p><%= _('<a href="%s">Browse all</a> or <a href="%s">ask us to add one</a>.') % [list_public_bodies_default, help_requesting_path + '#missing_body'] %></p> + + + <% if !@query.nil? %> + <p id="search_controls"> + <%=link_to_unless @sortby == 'relevant', _("Show most relevant results first"), search_url(@query, 'relevant') %> + | + <%=link_to_unless @sortby == 'newest', _("Newest results first"), search_url(@query, 'newest') %> + <% if @sortby == 'described' %> + | <%= _('Recently described results first') %> + <% end %> + </p> + <% end %> +</div> + +<% if @track_thing && (@xapian_bodies_hits > 0 || @xapian_users_hits > 0 || @total_hits == 0)%> + <div id="header_right"> + <h2>Track this search</h2> + <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %> + </div> <% end %> +<div style="clear:both;"></div> + <% if @total_hits == 0 %> - <h1><%=@title %></h1> + <h2><%=@title %></h2> <% end %> <% if not @query.nil? %> - <% if @spelling_correction %> - <p id="did_you_mean"><%= _('Did you mean: {{correction}}', :correction => search_link(@spelling_correction, @postfix)) %></p> - <% end %> - - <% if (!@bodies || @xapian_requests.results.size == 0) && @track_thing && (@xapian_bodies.results.size > 0 || @xapian_users.results.size > 0 || @total_hits == 0)%> - <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %> - <% end %> + <div class="results_section"> + <% if @xapian_bodies_hits > 0 %> + <% if @xapian_bodies_hits == 1 && @page == 1 %> + <h2 class="publicbody_results"><%= _('One public authority found') %></h2> + <% else %> + <h2 class="publicbody_results"><%= _('Public authorities {{start_count}} to {{end_count}} of {{total_count}}', :start_count => ((@page-1)*@bodies_per_page+1).to_s, :end_count => [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s, :total_count => @xapian_bodies.matches_estimated.to_s) %></h2> + <% end %> - <% if @xapian_bodies.results.size > 0 %> - <% if @xapian_bodies.results.size == 1 && @page == 1 %> - <h1><%= _('One public authority matching ‘{{user_search_query}}’', :user_search_query => h(@query)) %></h1> - <% else %> - <h1><%= _('Public authorities {{start_count}} to {{end_count}} of {{total_count}} for {{user_search_query}}', :start_count => ((@page-1)*@bodies_per_page+1).to_s, :end_count => [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s, :total_count => @xapian_bodies.matches_estimated.to_s, :user_search_query => h(@query)) %></h1> - <% end %> + <div class="results_block"> + <% for result in @xapian_bodies.results %> + <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %> + <% end %> + </div> - <% for result in @xapian_bodies.results %> - <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %> - <% end %> - - <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %> - <% end %> - - <% if @xapian_users.results.size > 0 %> - <% if @xapian_users.results.size == 1 && @page == 1 %> - <h1><%= _("One person matching ‘{{user_search_query}}’", :user_search_query => h(@query)) %></h1> - <% else %> - <h1><%= _("People {{start_count}} to {{end_count}} of {{total_count}} for ‘{{user_search_query}}’", :start_count => ((@page-1)*@users_per_page+1).to_s, :end_count => [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s, :total_count => @xapian_users.matches_estimated.to_s, :user_search_query => h(@query)) %></h1> + <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %> + <% elsif @bodies && !@query.nil? && @xapian_bodies.results.size == 0 && @page == 1 %> + <h2 class="publicbody_results"><%= _('No public authorities found') %></h2> + <% if @spelling_correction %> + <p id="did_you_mean"><%= _('Did you mean: {{correction}}', :correction => search_link(@spelling_correction, @postfix)) %></p> <% end %> + <p><%= _('<a href="%s">Browse all</a> or <a href="%s">ask us to add one</a>.') % [list_public_bodies_default, help_requesting_path + '#missing_body'] %></p> + <% end %> + </div> - <% for result in @xapian_users.results %> - <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %> - <% end %> + <div class="results_section"> + <% if @xapian_users_hits > 0 %> + <% if @xapian_users_hits == 1 && @page == 1 %> + <h2 class="person_results"><%= _("One person found") %></h2> + <% else %> + <h2 class="person_results"><%= _("People {{start_count}} to {{end_count}} of {{total_count}}", :start_count => ((@page-1)*@users_per_page+1).to_s, :end_count => [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s, :total_count => @xapian_users.matches_estimated.to_s) %></h2> + <% end %> - <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %> - <% end %> + <div class="results_block"> + <% for result in @xapian_users.results %> + <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %> + <% end %> + </div> - <% if @xapian_requests.results.size > 0 %> - <% if @xapian_requests.results.size == 1 && @page == 1 %> - <h1><%= _("One FOI request matching ‘{{user_search_query}}’", :user_search_query => h(@query)) %></h1> - <% else %> - <h1><%= _("FOI requests {{start_count}} to {{end_count}} of {{total_count}} for ‘{{user_search_query}}’", :start_count => ((@page-1)*@requests_per_page+1).to_s, :end_count => [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s, :total_count => @xapian_requests.matches_estimated.to_s, :user_search_query => h(@query)) %></h1> - <% end %> + <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %> + <% end %> + </div> - <% if @track_thing %> - <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %> - <% end %> + <div class="results_section"> + <% if @xapian_requests_hits > 0 %> + <% if @xapian_requests_hits == 1 && @page == 1 %> + <h2 class="foi_results"><%= _("One FOI request found") %></h2> + <% else %> + <h2 class="foi_results"><%= _("FOI requests {{start_count}} to {{end_count}} of {{total_count}}", :start_count => ((@page-1)*@requests_per_page+1).to_s, :end_count => [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s, :total_count => @xapian_requests.matches_estimated.to_s) %></h2> + <% end %> - <% for result in @xapian_requests.results %> - <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> - <% end %> + <div class="results_block"> + <% for result in @xapian_requests.results %> + <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> + <% end %> + </div> - <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %> - <% if @track_thing %> - <p></p> - <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %> - <% end %> - <% end %> + <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %> + <% end %> + </div> <% end %> -<% if @show_tips %> +<% if @advanced %> + +<div id="advanced-search-tips"> + <a name="show-tips"></a> <h2><%= _("Advanced search tips")%></h2> <ul> <li><%= _("Enter words that you want to find separated by spaces, e.g. <strong>climbing lane</strong>") %></li> @@ -139,28 +230,30 @@ <h2 id="statuses"><%= _('Table of statuses') %></h2> <table class="status_table"> - <tr><td><strong><%=search_link('status:waiting_response')%></strong></td><td><%= _('Waiting for the public authority to reply') %></td></tr> - <tr><td><strong><%=search_link('status:not_held')%></strong></td><td><%= _('The public authority does not have the information requested') %></td></tr> - <tr><td><strong><%=search_link('status:rejected')%></strong></td><td><%= _('The request was refused by the public authority') %></td></tr> - <tr><td><strong><%=search_link('status:partially_successful')%></strong></td><td><%= _('Some of the information requested has been received') %></td></tr> - <tr><td><strong><%=search_link('status:successful')%></strong></td><td><%= _('All of the information requested has been received') %></td></tr> - <tr><td><strong><%=search_link('status:waiting_clarification')%></strong></td><td><%= _('The public authority would like part of the request explained') %></td></tr> - <tr><td><strong><%=search_link('status:gone_postal')%></strong></td><td><%= _('The public authority would like to / has responded by post') %></td></tr> - <tr><td><strong><%=search_link('status:internal_review')%></strong></td><td><%= _('Waiting for the public authority to complete an internal review of their handling of the request') %></td></tr> - <tr><td><strong><%=search_link('status:error_message')%></strong></td><td><%= _('Received an error message, such as delivery failure.') %></td></tr> - <tr><td><strong><%=search_link('status:requires_admin')%></strong></td><td><%= _('A strange reponse, required attention by the {{site_name}} team', :site_name=>site_name) %></td></tr> - <tr><td><strong><%=search_link('status:user_withdrawn')%></strong></td><td><%= _('The requester has abandoned this request for some reason') %></td></tr> + <tr><td><strong><%=search_link('status:waiting_response', nil, nil, true)%></strong></td><td><%= _('Waiting for the public authority to reply') %></td></tr> + <tr><td><strong><%=search_link('status:not_held', nil, nil, true)%></strong></td><td><%= _('The public authority does not have the information requested') %></td></tr> + <tr><td><strong><%=search_link('status:rejected', nil, nil, true)%></strong></td><td><%= _('The request was refused by the public authority') %></td></tr> + <tr><td><strong><%=search_link('status:partially_successful', nil, nil, true)%></strong></td><td><%= _('Some of the information requested has been received') %></td></tr> + <tr><td><strong><%=search_link('status:successful', nil, nil, true)%></strong></td><td><%= _('All of the information requested has been received') %></td></tr> + <tr><td><strong><%=search_link('status:waiting_clarification', nil, nil, true)%></strong></td><td><%= _('The public authority would like part of the request explained') %></td></tr> + <tr><td><strong><%=search_link('status:gone_postal', nil, nil, true)%></strong></td><td><%= _('The public authority would like to / has responded by post') %></td></tr> + <tr><td><strong><%=search_link('status:internal_review', nil, nil, true)%></strong></td><td><%= _('Waiting for the public authority to complete an internal review of their handling of the request') %></td></tr> + <tr><td><strong><%=search_link('status:error_message', nil, nil, true)%></strong></td><td><%= _('Received an error message, such as delivery failure.') %></td></tr> + <tr><td><strong><%=search_link('status:requires_admin', nil, nil, true)%></strong></td><td><%= _('A strange reponse, required attention by the {{site_name}} team', :site_name=>site_name) %></td></tr> + <tr><td><strong><%=search_link('status:user_withdrawn', nil, nil, true)%></strong></td><td><%= _('The requester has abandoned this request for some reason') %></td></tr> </table> <h2 id="varieties"><%= _('Table of varieties') %></h2> <table class="status_table"> - <tr><td><strong><%=search_link('variety:sent')%></strong></td><td><%= _('Original request sent') %></td></tr> - <tr><td><strong><%=search_link('variety:followup_sent')%></strong></td><td><%= _('Follow up message sent by requester') %></td></tr> - <tr><td><strong><%=search_link('variety:response')%></strong></td><td><%= _('Response from a public authority') %></td></tr> - <tr><td><strong><%=search_link('variety:comment')%></strong></td><td><%= _('Annotation added to request') %></td></tr> - <tr><td><strong><%=search_link('variety:authority')%></strong></td><td><%= _('A public authority') %></td></tr> - <tr><td><strong><%=search_link('variety:user')%></strong></td><td><%= _('A {{site_name}} user', :site_name=>site_name) %></td></tr> + <tr><td><strong><%=search_link('variety:sent', nil, nil, true)%></strong></td><td><%= _('Original request sent') %></td></tr> + <tr><td><strong><%=search_link('variety:followup_sent', nil, nil, true)%></strong></td><td><%= _('Follow up message sent by requester') %></td></tr> + <tr><td><strong><%=search_link('variety:response', nil, nil, true)%></strong></td><td><%= _('Response from a public authority') %></td></tr> + <tr><td><strong><%=search_link('variety:comment', nil, nil, true)%></strong></td><td><%= _('Annotation added to request') %></td></tr> + <tr><td><strong><%=search_link('variety:authority', nil, nil, true)%></strong></td><td><%= _('A public authority') %></td></tr> + <tr><td><strong><%=search_link('variety:user', nil, nil, true)%></strong></td><td><%= _('A {{site_name}} user', :site_name=>site_name) %></td></tr> </table> +</div> + <% end %> diff --git a/app/views/help/_sidebar.rhtml b/app/views/help/_sidebar.rhtml index 99298e9c6..b6d26271e 100644 --- a/app/views/help/_sidebar.rhtml +++ b/app/views/help/_sidebar.rhtml @@ -1,6 +1,6 @@ -<div id="about_sidebar"> - <h1>Help pages</h1> - <ul> +<div id="right_column"> + <h2>Help pages</h2> + <ul class="no_bullets"> <li><%= link_to_unless_current "Introduction", "/help/about" %></li> <li><%= link_to_unless_current "Making requests", "/help/requesting" %></li> <li><%= link_to_unless_current "Your privacy", "/help/privacy" %></li> @@ -10,7 +10,7 @@ <li><%= link_to_unless_current "Advanced search", "/search" %></li> </ul> - <h1 id="contact">Contact us</h1> + <h2 id="contact">Contact us</h2> <p>If your question isn't answered here, or you just wanted to let us know something about the site, <a href="/help/contact">contact us</a>. </p> diff --git a/app/views/help/about.rhtml b/app/views/help/about.rhtml index d22cc5b30..648ca1fb2 100644 --- a/app/views/help/about.rhtml +++ b/app/views/help/about.rhtml @@ -2,50 +2,52 @@ <%= render :partial => 'sidebar' %> -<h1 id="introduction">Introduction to <%= site_name %><a href="#introduction">#</a> </h1> -<dl> - -<dt id="purpose">What is <%= site_name %> for? <a href="#purpose">#</a> </dt> -<dd>To help you find out inside information about what the UK government -is doing. -</dd> - -<dt id="premise">How does the site work? <a href="#premise">#</a> </dt> -<dd>You choose the public authority that you would like information from, then -write a brief note describing what you want to know. We then send your request -to the public authority. Any response they make is automatically published on the -website for you and anyone else to find and read. -</dd> - -<dt id="whybother_me">Why would I bother to do this? <a href="#whybother_me">#</a> </dt> -<dd>You pay taxes, and then government does things with the money. All sorts of -things that affect your life, from healthcare through to national defence. Some -it does badly, some it does well. The more we find out about how government -works, the better able we are to make suggestions to improve the things that -are done badly, and to celebrate the things that are done well. -</dd> - -<dt id="whybother_them">Why would the public authority bother to reply? <a href="#whybother_them">#</a> </dt> -<dd>Under Freedom of Information (FOI) law, they have to respond. The response -will either contain the information you want, or give a valid legal reason why -it must be kept confidential. -</dd> - -<dt id="who">Who makes <%= site_name %>? <a href="#who">#</a> </dt> -<dd><%= site_name %> is created and run by <a href="http://www.mysociety.org">mySociety</a>, -and was initially <a href="http://www.mysociety.org/2006/12/06/funding-for-freedom-of-information/">funded by the JRSST Charitable Trust</a>. mySociety is a project of the -registered charity <a href="http://www.ukcod.org.uk/UK_Citizens_Online_Democracy">UK Citizens Online Democracy</a>. -If you like what we're doing, then you can -<a href="https://secure.mysociety.org/donate/">make a donation</a>. -</dd> - -<dt id="updates">How can I keep up with news about <%= site_name %>?<a href="#updates">#</a> </dt> -<dd>We have a <a href="/blog">blog</a> and a <a href="http://www.twitter.com/whatdotheyknow">twitter feed</a>. -</dd> - - -</dl> - -<p><strong>Next</strong>, read about <a href="/help/requesting">making requests</a> --> - -<div id="hash_link_padding"></div> +<div id="left_column"> + <h1 id="introduction">Introduction</h1> + <dl> + + <dt id="purpose">What is WhatDoTheyKnow for? <a href="#purpose">#</a> </dt> + <dd>To help you find out inside information about what the UK government + is doing. + </dd> + + <dt id="premise">How does the site work? <a href="#premise">#</a> </dt> + <dd>You choose the public authority that you would like information from, then + write a brief note describing what you want to know. We then send your request + to the public authority. Any response they make is automatically published on the + website for you and anyone else to find and read. + </dd> + + <dt id="whybother_me">Why would I bother to do this? <a href="#whybother_me">#</a> </dt> + <dd>You pay taxes, and then government does things with the money. All sorts of + things that affect your life, from healthcare through to national defence. Some + it does badly, some it does well. The more we find out about how government + works, the better able we are to make suggestions to improve the things that + are done badly, and to celebrate the things that are done well. + </dd> + + <dt id="whybother_them">Why would the public authority bother to reply? <a href="#whybother_them">#</a> </dt> + <dd>Under Freedom of Information (FOI) law, they have to respond. The response + will either contain the information you want, or give a valid legal reason why + it must be kept confidential. + </dd> + + <dt id="who">Who makes WhatDoTheyKnow? <a href="#who">#</a> </dt> + <dd>WhatDoTheyKnow is created and run by <a href="http://www.mysociety.org">mySociety</a>, + and was initially <a href="http://www.mysociety.org/2006/12/06/funding-for-freedom-of-information/">funded by the JRSST Charitable Trust</a>. mySociety is a project of the + registered charity <a href="http://www.ukcod.org.uk/UK_Citizens_Online_Democracy">UK Citizens Online Democracy</a>. + If you like what we're doing, then you can + <a href="https://secure.mysociety.org/donate/">make a donation</a>. + </dd> + + <dt id="updates">How can I keep up with news about WhatDoTheyKnow?<a href="#updates">#</a> </dt> + <dd>We have a <a href="/blog">blog</a> and a <a href="http://www.twitter.com/whatdotheyknow">twitter feed</a>. + </dd> + + + </dl> + + <p><strong>Next</strong>, read about <a href="/help/requesting">making requests</a> --> + + <div id="hash_link_padding"></div> +</div> diff --git a/app/views/help/api.rhtml b/app/views/help/api.rhtml index 3cafbb665..297aa1e8b 100644 --- a/app/views/help/api.rhtml +++ b/app/views/help/api.rhtml @@ -1,82 +1,81 @@ -<% @title = "Application Programming Interface - API" %> +<% @title = "About our API" %> <%= render :partial => 'sidebar' %> -<h1><%=@title %></h1> - -<h2> Introduction </h2> - -<p>This page explains how programmers can make other websites and software -interact with <%= site_name %> via an "API". -</p> - -<p><%= site_name %> does not have a full API yet, but we are gradually adding -lots of things that are similar in use to an API as they are requested. -</p> - -<hr> - -<h2> 1. Linking to new requests </h2> - -<p>To encourage your users to make links to a particular public authority, use URLs of the form -<%= link_to new_request_to_body_url(:url_name => "liverpool_city_council") , new_request_to_body_url(:url_name => "liverpool_city_council") %>. -These are the parameters you can add to those URLs, either in the URL or from a form. - -<ul> - <li> <strong>title</strong> - default summary of the new request.</li> - <li> <strong>default_letter</strong> - default text of the body of the letter. The salutation (Dear...) and signoff (Yours...) are wrapped round this. </li> - <li> <strong>body</strong> - as an alternative to default_letter, this sets the default entire text of the request, so you can customise the salutation and signoff. </li> - <li> <strong>tags</strong> - space separated list of tags, so you can find and link up any requests made later, e.g. <em>openlylocal spending_id:12345</em>. The : indicates it is a machine tag. The values of machine tags may also include colons, useful for URIs. -</ul> - -<hr> - -<h2> 2. RSS (actually, Atom) feeds </h2> - -<p>There are Atom feeds on most pages which list FOI requests, which you can -use to get updates and links in XML format. Find the URL of the Atom feed in -one of these ways: -<ul> - <li>Look for the <img src="/images/feed-16.png" alt=""> RSS feed links.</li> - <li>Examine the <tt><link rel="alternate" type="application/atom+xml"></tt> tag in the head of the HTML. </li> - <li>Add <tt>/feed</tt> to the start of another URL. -</ul> - -<p>In particular, even complicated search queries have Atom feeds. -You can do all sorts of things with them, such as query by authority, by file -type, by date range, or by status. See the <a href="/search">advanced search -tips</a> for details. - -<hr> - -<h2> 3. JSON structured data </h2> - -<p>Quite a few pages have JSON versions, which let you download information about -objects in a structured form. Find them by: -<ul> - <li>Adding <tt>.json</tt> to the end of the URL. </li> - <li>Look for the <tt><link rel="alternate" type="application/json"></tt> tag in the head of the HTML. </li> -</ul> -</p> - -<p>Requests, users and authorities all have JSON versions containing basic -information about them. Every Atom feed has a JSON equivalent, containing -information about the list of events in the feed. -</p> - -<hr> -<h2> 4. Spreadsheet of all authorities </h2> - -<p> -A spreadsheet file listing every body in <%= site_name %> is available: -<%= link_to "all-authorities.csv", all_public_bodies_csv_url() %> -</p> - -<hr> - -<p>Please <a href="/help/contact">contact us</a> if you need an API feature that isn't there yet. It's -very much a work in progress, and we do add things when people ask us to.</p> - -<div id="hash_link_padding"></div> - +<div id="left_column"> + <h1><%=@title %></h1> + <dl> + <dt>Introduction</dt> + <dd> + <p>This page explains how programmers can make other websites and software + interact with WhatDoTheyKnow via an "API". + </p> + + <p>WhatDoTheyKnow does not have a full API yet, but we are gradually adding + lots of things that are similar in use to an API as they are requested. + </p> + </dd> + + <dt>Linking to new requests</dt> + <dd> + <p>To encourage your users to make links to a particular public authority, use URLs of the form + <%= link_to new_request_to_body_url(:url_name => "liverpool_city_council") , new_request_to_body_url(:url_name => "liverpool_city_council") %>. + These are the parameters you can add to those URLs, either in the URL or from a form. + + <ul> + <li> <strong>title</strong> - default summary of the new request.</li> + <li> <strong>default_letter</strong> - default text of the body of the letter. The salutation (Dear...) and signoff (Yours...) are wrapped round this. </li> + <li> <strong>body</strong> - as an alternative to default_letter, this sets the default entire text of the request, so you can customise the salutation and signoff. </li> + <li> <strong>tags</strong> - space separated list of tags, so you can find and link up any requests made later, e.g. <em>openlylocal spending_id:12345</em>. The : indicates it is a machine tag. The values of machine tags may also include colons, useful for URIs. + </ul> + </dd> + + <dt>RSS (actually, Atom) feeds</h2> + <dd> + <p>There are Atom feeds on most pages which list FOI requests, which you can + use to get updates and links in XML format. Find the URL of the Atom feed in + one of these ways: + <ul> + <li>Look for the <img src="/images/feed-16.png" alt=""> RSS feed links.</li> + <li>Examine the <tt><link rel="alternate" type="application/atom+xml"></tt> tag in the head of the HTML. </li> + <li>Add <tt>/feed</tt> to the start of another URL. + </ul> + + <p>In particular, even complicated search queries have Atom feeds. + You can do all sorts of things with them, such as query by authority, by file + type, by date range, or by status. See the <a href="/search">advanced search + tips</a> for details. + </dd> + + <dt>JSON structured data</dt> + <dd> + <p>Quite a few pages have JSON versions, which let you download information about + objects in a structured form. Find them by: + <ul> + <li>Adding <tt>.json</tt> to the end of the URL. </li> + <li>Look for the <tt><link rel="alternate" type="application/json"></tt> tag in the head of the HTML. </li> + </ul> + </p> + + <p>Requests, users and authorities all have JSON versions containing basic + information about them. Every Atom feed has a JSON equivalent, containing + information about the list of events in the feed. + </p> + </dd> + + <dt>Spreadsheet of all authorities</dt> + <dd> + <p> + A spreadsheet file listing every body in WhatDoTheyKnow is available: + <%= link_to "all-authorities.csv", all_public_bodies_csv_url() %> + </p> + + </dd> + </dl> + + <p>Please <a href="/help/contact">contact us</a> if you need an API feature that isn't there yet. It's + very much a work in progress, and we do add things when people ask us to.</p> + + <div id="hash_link_padding"></div> +</div> diff --git a/app/views/help/contact.rhtml b/app/views/help/contact.rhtml index 6c65fb1c9..dd49f7951 100644 --- a/app/views/help/contact.rhtml +++ b/app/views/help/contact.rhtml @@ -2,10 +2,12 @@ <%= foi_error_messages_for :contact %> +<h1><%= @title %></h1> + <div id="contact_preamble"> <% if !flash[:notice] %> - <h1>Contact an authority to get official information</h1> + <h2>Contact an authority to get official information</h2> <ul> <li><a href="/new">Go here</a> to make a request, in public, for information from UK public authorities.</li> @@ -17,7 +19,7 @@ </li> </ul> - <h1>Take up an issue with Government</h1> + <h2>Take up an issue with Government</h2> <ul> <li><a href="http://www.writetothem.com">Write to your MP, @@ -28,7 +30,7 @@ <% end %> - <h1>Contact the <%= site_name %> team</h1> + <h2>Contact the WhatDoTheyKnow team</h2> <% if !flash[:notice] %> <ul> <li> diff --git a/app/views/help/credits.rhtml b/app/views/help/credits.rhtml index 02cd55c90..fd753336b 100644 --- a/app/views/help/credits.rhtml +++ b/app/views/help/credits.rhtml @@ -1,90 +1,91 @@ -<% @title = "Credit where credit is due" %> +<% @title = "Credit where credit's due" %> <%= render :partial => 'sidebar' %> -<h1 id="credits"><%= @title%> <a href="#credits">#</a> </h1> +<div id="left_column"> + <h1 id="credits"><%= @title%></h1> -<dl> - -<dt id="thanks">Which people made <%= site_name %>? <a href="#thanks">#</a> </dt> -<dd>Oh, nearly everyone (and <a href="http://www.mysociety.org/helpus">maybe you too</a>)! -<ul> -<li> - <a href="http://www.yrtk.org">Heather Brooke</a> - (<a href="http://www.guardian.co.uk/politics/2008/mar/29/houseofcommons.michaelmartin?gusrc=rss&feed=worldnews">vampy!</a>) has - been pushing the idea of a UK FOI archive for years now. -</li> -<li> - Both Phil Rodgers and <a href="http://www.flourish.org/blog/">Francis Irving</a> - entered it in a mySociety competition for ideas for public interest websites to build. -</li> -<li> - <a href="http://www.mysociety.org/2006/09/27/the-mysociety-call-for-proposals-the-winner-and-runners-up/">It won</a>, - and then Chris Lightfoot (<a href="http://mk.ucant.org/archives/000129.html">RIP :(</a>) - thought up the wheeze of intercepting email responses to requests and - automatically publishing them. -</li> -<li> - Tom Steinberg got the cash to pay for the site from - <a href="http://www.jrrt.org.uk/">a dead chocolate mogul</a> (<em>thank you!</em>) ... -</li> -<li> - ... so that Francis Irving, Angie Ahl, Tommy Martin, Louise Crow, Matthew Somerville - and Tom Steinberg could do the complex mixture of design and coding to build - what you see today. -</li> -<li> - Thanks particularly to Julian Todd (<a href="http://www.freesteel.co.uk/wpblog/">great blog!</a>), - Francis Davey, and Etienne Pollard for using the site early on and giving - feedback (and/or legal advice!), and also to all our other users and - testers. -</li> -<li> - The amazing team of volunteers who run the site, answer your support - emails, maintain the database of public authorities and - <a href="http://www.mysociety.org/2009/10/13/behind-whatdotheyknow/">so much more</a>. - Thanks to John Cross, Ben Harris, Adam McGreggor, Alex Skene, - Richard Taylor. -</li> -<li> - Volunteers who have provided patches to the code - thanks Peter Collingbourne - and Tony Bowden. -</li> -<li> - Everyone who has helped look up FOI email addresses. -</li> -<li> - We couldn't do any of this without those - <a href="http://www.ukcod.org.uk/UKCOD_Trustees">crazy people</a> who volunteer, - amongst many other things, to do the accounts and fill in our VAT return. -</li> -<li> - Finally, all the officers and servants who have answered the many requests - made through the site. Their diligence, patience and professionalism is - what has actually made the information that you see here. Thank them for - helping make Government more transparent. -</li> -</ul> -You're all stars. -</dd> - -<dt id="helpus">Can I help out? <a href="#helpus">#</a> </dt> -<dd> - <p>Yes please! We're built out of our supporters and volunteers.</p> + <dl> + <dt id="thanks">Who made WhatDoTheyKnow? <a href="#thanks">#</a> </dt> + <dd>Oh, nearly everyone (and <a href="http://www.mysociety.org/helpus">maybe you too</a>)! <ul> - <li>You can <a href="https://secure.mysociety.org/donate/">make a donation</a>. We're a registered charity.</li> - <li>Help people find successful requests, and monitor performance of authorities, by - <a href="/categorise/play">playing the categorisation game</a>. </li> - <li>Find out FOI email addresses of <a href="/help/requesting#missing_body">authorities that we're missing</a>.</li> - <li>Write a blog post about either <%= site_name %> or an interesting request that you've - found. Post about it on a forum that you frequent. Tell friends about it.</li> <li>If you're - a programmer, get the source code for our parent project, <a href="http://alaveteli.org">Alaveteli</a> - and tell us about patches we can pull. It's made in Ruby on Rails. - <li>Read more about <a href="http://www.mysociety.org/helpus/">volunteering with mySociety</a>. + <li> + <a href="http://www.yrtk.org">Heather Brooke</a> + (<a href="http://www.guardian.co.uk/politics/2008/mar/29/houseofcommons.michaelmartin?gusrc=rss&feed=worldnews">vampy!</a>) has + been pushing the idea of a UK FOI archive for years now. + </li> + <li> + Both Phil Rodgers and <a href="http://www.flourish.org/blog/">Francis Irving</a> + entered it in a mySociety competition for ideas for public interest websites to build. + </li> + <li> + <a href="http://www.mysociety.org/2006/09/27/the-mysociety-call-for-proposals-the-winner-and-runners-up/">It won</a>, + and then Chris Lightfoot (<a href="http://mk.ucant.org/archives/000129.html">RIP :(</a>) + thought up the wheeze of intercepting email responses to requests and + automatically publishing them. + </li> + <li> + Tom Steinberg got the cash to pay for the site from + <a href="http://www.jrrt.org.uk/">a dead chocolate mogul</a> (<em>thank you!</em>) ... + </li> + <li> + ... so that Francis Irving, Angie Ahl, Tommy Martin, Louise Crow, Matthew Somerville + and Tom Steinberg could do the complex mixture of design and coding to build + what you see today. + </li> + <li> + Thanks particularly to Julian Todd (<a href="http://www.freesteel.co.uk/wpblog/">great blog!</a>), + Francis Davey, and Etienne Pollard for using the site early on and giving + feedback (and/or legal advice!), and also to all our other users and + testers. + </li> + <li> + The amazing team of volunteers who run the site, answer your support + emails, maintain the database of public authorities and + <a href="http://www.mysociety.org/2009/10/13/behind-whatdotheyknow/">so much more</a>. + Thanks to John Cross, Ben Harris, Adam McGreggor, Alex Skene, + Richard Taylor. + </li> + <li> + Volunteers who have provided patches to the code - thanks Peter Collingbourne + and Tony Bowden. + </li> + <li> + Everyone who has helped look up FOI email addresses. + </li> + <li> + We couldn't do any of this without those + <a href="http://www.ukcod.org.uk/UKCOD_Trustees">crazy people</a> who volunteer, + amongst many other things, to do the accounts and fill in our VAT return. + </li> + <li> + Finally, all the officers and servants who have answered the many requests + made through the site. Their diligence, patience and professionalism is + what has actually made the information that you see here. Thank them for + helping make Government more transparent. + </li> </ul> -</dd> + You're all stars. + </dd> + <dt id="helpus">Can I help out? <a href="#helpus">#</a> </dt> + <dd> + <p>Yes please! We're built out of our supporters and volunteers.</p> + <ul> + <li>You can <a href="https://secure.mysociety.org/donate/">make a donation</a>. We're a registered charity.</li> + <li>Help people find successful requests, and monitor performance of authorities, by + <a href="/categorise/play">playing the categorisation game</a>. </li> + <li>Find out FOI email addresses of <a href="/help/requesting#missing_body">authorities that we're missing</a>.</li> + <li>Write a blog post about either WhatDoTheyKnow or an interesting request that you've + found. Post about it on a forum that you frequent. Tell friends about it.</li> <li>If you're + a programmer, get the source code for our parent project, <a href="http://alaveteli.org">Alaveteli</a> + and tell us about patches we can pull. It's made in Ruby on Rails. + <li>Read more about <a href="http://www.mysociety.org/helpus/">volunteering with mySociety</a>. + </ul> + </dd> + </dl> -<div id="hash_link_padding"></div> + <div id="hash_link_padding"></div> +</div> diff --git a/app/views/help/officers.rhtml b/app/views/help/officers.rhtml index d9656186a..b26138db6 100644 --- a/app/views/help/officers.rhtml +++ b/app/views/help/officers.rhtml @@ -2,246 +2,246 @@ <%= render :partial => 'sidebar' %> -<h1 id="officers"><%= @title %> <a href="#officers">#</a> </h1> - -<dl> - -<dt id="top">I just got here from bottom of an FOI request, what is going on? <a href="#top">#</a> </dt> - -<dd><p><%= site_name %> is a service run by a charity. It helps ordinary members -of the public make FOI requests, and easily track and share the responses.</p> - -<p>The FOI request you received was made by someone using <%= site_name %>. You can -simply reply to the request as you would any other request from an individual. -The only difference is that your response will be automatically published on -the Internet. -</p> -<p>If you have privacy or other concerns, please read the answers below. -You might also like to read the <a -href="/help/about">introduction to <%= site_name %></a> to find out more about what -the site does from the point of view of a user. You can also search the -site to find the authority that you work for, and view the status of -any requests made using the site. - -<p>Finally, we welcome comments and -thoughts from FOI officers, please <a href="/help/contact">get in touch</a>. -</p> -</dd> - -<dt id="responses">Why are you publishing responses to FOI requests? <a href="#responses">#</a> </dt> - -<dd>We think there are lots of benefits. Most importantly it will encourage the -public to be more interested and involved in the work of government. We -also hope that it will reduce the number of duplicate requests on any -subject that a public body will receive. Given that Freedom of Information -responses contain public information, which anybody could easily request -again from the public authority, we think there should be no reason not to -publish it widely. -</dd> - -<dt id="realpeople">Are the people making requests real people? <a href="#realpeople">#</a> </dt> - -<dd>Yes. For the purposes of keeping track of responses we use -computer-generated email addresses for each request. However, before -they can send a request, each user must register on the site with a -unique email address that we then verify. You can search this site and -find a page listing all requests that each person has made. -</dd> - -<dt id="email_only">An email isn't a sufficient address for an FOI request! <a href="#email_only">#</a> </dt> - -<dd>Yes it is. This -<a href="http://www.whatdotheyknow.com/request/1142/response/2894/attach/5/20080806100741260.pdf">letter from the ICO to Rother District Council</a> gives guidance on the matter, specifically -in the context of requests made via <%= site_name %>. -</dd> - -<dt id="vexatious">Aren't you making lots of vexatious requests? <a href="#vexatious">#</a> </dt> - -<dd><p><%= site_name %> is not making any requests. We are sending requests on -behalf of our users, who are real people making the requests. </p> -<p>Look at it like this - if lots of different people made requests from -different Hotmail email addresses, then you would not think that Microsoft were -making vexatious requests. It is exactly the same if lots of requests are made -via <%= site_name %>. Moreover, since all requests are public it is much easier -for you to see if one of our users is making vexatious requests. </p> -<p>If that isn't enough for you, the -<a href="http://www.whatdotheyknow.com/request/1142/response/2894/attach/5/20080806100741260.pdf">letter from the ICO to Rother District Council</a> gives some guidance on the matter.</p> -</dd> - -<dt id="spam_problems">I can see a request on <%= site_name %>, but we never got it by email!<a href="#spam_problems">#</a> </dt> - -<dd><p>If a request appears on the site, then we have attempted to send it to -the authority by email. Any delivery failure messages will automatically -appear on the site. You can check the address we're using with the "View FOI -email address" link which appears on the page for the authority. <a -href="/help/contact">Contact us</a> if there is a better address we can -use.</p> -<p>Requests are sometimes not delivered because they are quietly removed by -"spam filters" in the IT department of the authority. Authorities can make -sure this doesn't happen by asking their IT departments to "whitelist" -any email from <strong>@whatdotheyknow.com</strong>. -If you <a href="/help/contact">ask us</a> we will resend any request, -and/or give technical details of delivery so an IT department can chase -up what happened to the message. -</p> -<p>Finally, you can respond to any request from your web browser, without -needing any email, using the "respond to request" link at the bottom of -each request page. -</dd> - -<dt id="days">How do you calculate the deadline shown on request pages?<a href="#days">#</a> </dt> - -<dd> -<p>The Freedom of Information Act says:</p> - -<blockquote><p>A public authority must comply with section 1(1) <strong>promptly</strong> and -in any event not later than the twentieth working day following the date of -receipt.</p></blockquote> - -<p>The nerdy detail of exactly how weekends are counted, and what happens if -the request arrives out of office hours, is just that - detail. What matters -here is that the law says authorities must respond <strong>promptly</strong>.</p> - -<p>If you've got a good reason why the request is going to take a while to -process, requesters find it really helpful if you can send a quick email with a -sentence or two saying what is happening. </p> - -<p>FOI officers often have to do a lot of <strong>hard work</strong> to answer -requests, and this is hidden from the public. We think it would help everyone -to have more of that complexity visible.</p> - -</dd> - -<dt id="days2">But really, how do you calculate the deadline?<a href="#days2">#</a> </dt> - -<dd> - -<p>Please read the answer to the previous question first. Legally, authorities -must respond <strong>promptly</strong> to FOI requests. If they fail to do that, -it is best if they show the hard work they are doing by explaining what is -taking the extra time to do. -</p> - -<p>That said, <%= site_name %> does show the maximum legal deadline -for response on each request. Here's how we calculate it.</p> - -<ul> - -<li>If the day we deliver the request by email is a working day, we count that -as "day zero", even if it was delivered late in the evening. Days end at -midnight. We then count the next working day as "day one", and so on up to -<strong>20 working days</strong>.</li> - -<li>If the day the request email was delivered was a non-working day, we count -the next working day as "day one". Delivery is delivery, even if it happened on -the weekend. Some authorities -<a href="http://www.whatdotheyknow.com/request/policy_regarding_body_scans#incoming-1100">disagree with this</a>, -our lawyer disagrees with them. </li> - -<li>Requesters are encouraged to mark when they have <strong>clarified</strong> -their request so the clock resets, but sometimes they get this wrong. If you -see a problem with a particular request, let us know and we'll fix it.</li> -</ul> - -<p>The date thus calculated is shown on requests with the text "By law, -Liverpool City Council should normally have responded by...". There is only -one case which is not normal, see the next question about -<a href="#public_interest_test">public interest test time extensions</a>. -</p> - -<p>Schools are also a special case, which <%= site_name %> displays differently. -</p> - -<ul> -<li>Since June 2009, <strong>schools</strong> have "20 working days -disregarding any working day which is not a school day, or 60 working days, -whichever is first" (<a href="http://www.opsi.gov.uk/si/si2009/draft/ukdsi_9780111477632_en_1">FOI (Time for Compliance with Request) Regulations 2009</a>). <%= site_name %> indicates on requests to schools that the 20 day deadline is only -during term time, and shows them as definitely overdue after 60 working days -</li> -</ul> - -<p>If you're getting really nerdy about all this, read the <a href="http://www.ico.gov.uk/upload/documents/library/freedom_of_information/detailed_specialist_guides/timeforcompliance.pdf">detailed ICO guidance</a>. -Meanwhile, remember that the law says authorities must respond -<strong>promptly</strong>. That's really what matters.</p> - -</dd> - -<dt id="public_interest_test">How do you reflect time extensions for public interest tests?<a href="#public_interest_test">#</a> </dt> - -<dd> - -<p>The Freedom of Information Act lets authorities claim an indefinite time -extension when applying a <strong>public interest test</strong>. Information -Commissioner guidance says that it should only be used in "exceptionally -complex" cases -(<a href="http://www.ico.gov.uk/upload/documents/library/freedom_of_information/detailed_specialist_guides/foi_good_practice_guidance_4.pdf">FOI Good Practice Guidance No. 4</a>). -<%= site_name %> doesn't specifically handle this case, which is why we use the -phrase "should normally have responded by" when the 20 working day time is -exceeded. -</p> - -<p>The same guidance says that, even in exceptionally complex cases, no -Freedom of Information request should take more than <strong>40 working days</strong> -to answer. <%= site_name %> displays requests which are overdue by that much -with stronger wording to indicate they are definitely late. -</p> +<div id="left_column"> + <h1 id="officers"><%= @title %> <a href="#officers">#</a> </h1> + + <dl> + + <dt id="top">I just got here from bottom of an FOI request, what is going on? <a href="#top">#</a> </dt> + + <dd><p>WhatDoTheyKnow is a service run by a charity. It helps ordinary members + of the public make FOI requests, and easily track and share the responses.</p> + + <p>The FOI request you received was made by someone using WhatDoTheyKnow. You can + simply reply to the request as you would any other request from an individual. + The only difference is that your response will be automatically published on + the Internet. + </p> + <p>If you have privacy or other concerns, please read the answers below. + You might also like to read the <a + href="/help/about">introduction to WhatDoTheyKnow</a> to find out more about what + the site does from the point of view of a user. You can also search the + site to find the authority that you work for, and view the status of + any requests made using the site. + + <p>Finally, we welcome comments and + thoughts from FOI officers, please <a href="/help/contact">get in touch</a>. + </p> + </dd> + + <dt id="responses">Why are you publishing responses to FOI requests? <a href="#responses">#</a> </dt> + + <dd>We think there are lots of benefits. Most importantly it will encourage the + public to be more interested and involved in the work of government. We + also hope that it will reduce the number of duplicate requests on any + subject that a public body will receive. Given that Freedom of Information + responses contain public information, which anybody could easily request + again from the public authority, we think there should be no reason not to + publish it widely. + </dd> + + <dt id="realpeople">Are the people making requests real people? <a href="#realpeople">#</a> </dt> + + <dd>Yes. For the purposes of keeping track of responses we use + computer-generated email addresses for each request. However, before + they can send a request, each user must register on the site with a + unique email address that we then verify. You can search this site and + find a page listing all requests that each person has made. + </dd> + + <dt id="email_only">An email isn't a sufficient address for an FOI request! <a href="#email_only">#</a> </dt> + + <dd>Yes it is. This + <a href="http://www.whatdotheyknow.com/request/1142/response/2894/attach/5/20080806100741260.pdf">letter from the ICO to Rother District Council</a> gives guidance on the matter, specifically + in the context of requests made via WhatDoTheyKnow. + </dd> + + <dt id="vexatious">Aren't you making lots of vexatious requests? <a href="#vexatious">#</a> </dt> + + <dd><p>WhatDoTheyKnow is not making any requests. We are sending requests on + behalf of our users, who are real people making the requests. </p> + <p>Look at it like this - if lots of different people made requests from + different Hotmail email addresses, then you would not think that Microsoft were + making vexatious requests. It is exactly the same if lots of requests are made + via WhatDoTheyKnow. Moreover, since all requests are public it is much easier + for you to see if one of our users is making vexatious requests. </p> + <p>If that isn't enough for you, the + <a href="http://www.whatdotheyknow.com/request/1142/response/2894/attach/5/20080806100741260.pdf">letter from the ICO to Rother District Council</a> gives some guidance on the matter.</p> + </dd> + + <dt id="spam_problems">I can see a request on WhatDoTheyKnow, but we never got it by email!<a href="#spam_problems">#</a> </dt> + + <dd><p>If a request appears on the site, then we have attempted to send it to + the authority by email. Any delivery failure messages will automatically + appear on the site. You can check the address we're using with the "View FOI + email address" link which appears on the page for the authority. <a + href="/help/contact">Contact us</a> if there is a better address we can + use.</p> + <p>Requests are sometimes not delivered because they are quietly removed by + "spam filters" in the IT department of the authority. Authorities can make + sure this doesn't happen by asking their IT departments to "whitelist" + any email from <strong>@whatdotheyknow.com</strong>. + If you <a href="/help/contact">ask us</a> we will resend any request, + and/or give technical details of delivery so an IT department can chase + up what happened to the message. + </p> + <p>Finally, you can respond to any request from your web browser, without + needing any email, using the "respond to request" link at the bottom of + each request page. + </dd> + + <dt id="days">How do you calculate the deadline shown on request pages?<a href="#days">#</a> </dt> + + <dd> + <p>The Freedom of Information Act says:</p> + + <blockquote><p>A public authority must comply with section 1(1) <strong>promptly</strong> and + in any event not later than the twentieth working day following the date of + receipt.</p></blockquote> + + <p>The nerdy detail of exactly how weekends are counted, and what happens if + the request arrives out of office hours, is just that - detail. What matters + here is that the law says authorities must respond <strong>promptly</strong>.</p> + + <p>If you've got a good reason why the request is going to take a while to + process, requesters find it really helpful if you can send a quick email with a + sentence or two saying what is happening. </p> + + <p>FOI officers often have to do a lot of <strong>hard work</strong> to answer + requests, and this is hidden from the public. We think it would help everyone + to have more of that complexity visible.</p> + + </dd> + + <dt id="days2">But really, how do you calculate the deadline?<a href="#days2">#</a> </dt> + + <dd> + + <p>Please read the answer to the previous question first. Legally, authorities + must respond <strong>promptly</strong> to FOI requests. If they fail to do that, + it is best if they show the hard work they are doing by explaining what is + taking the extra time to do. + </p> + + <p>That said, WhatDoTheyKnow does show the maximum legal deadline + for response on each request. Here's how we calculate it.</p> + + <ul> + + <li>If the day we deliver the request by email is a working day, we count that + as "day zero", even if it was delivered late in the evening. Days end at + midnight. We then count the next working day as "day one", and so on up to + <strong>20 working days</strong>.</li> + + <li>If the day the request email was delivered was a non-working day, we count + the next working day as "day one". Delivery is delivery, even if it happened on + the weekend. Some authorities <a href="http://www.whatdotheyknow.com/request/policy_regarding_body_scans#incoming-1100">disagree with this</a>, our lawyer disagrees with them. </li> + + <li>Requesters are encouraged to mark when they have <strong>clarified</strong> + their request so the clock resets, but sometimes they get this wrong. If you + see a problem with a particular request, let us know and we'll fix it.</li> + </ul> + + <p>The date thus calculated is shown on requests with the text "By law, + Liverpool City Council should normally have responded by...". There is only + one case which is not normal, see the next question about + <a href="#public_interest_test">public interest test time extensions</a>. + </p> + + <p>Schools are also a special case, which WhatDoTheyKnow displays differently. + </p> + + <ul> + <li>Since June 2009, <strong>schools</strong> have "20 working days + disregarding any working day which is not a school day, or 60 working days, + whichever is first" (<a href="http://www.opsi.gov.uk/si/si2009/draft/ukdsi_9780111477632_en_1">FOI (Time for Compliance with Request) Regulations 2009</a>). WhatDoTheyKnow indicates on requests to schools that the 20 day deadline is only + during term time, and shows them as definitely overdue after 60 working days + </li> + </ul> + + <p>If you're getting really nerdy about all this, read the <a href="http://www.ico.gov.uk/upload/documents/library/freedom_of_information/detailed_specialist_guides/timeforcompliance.pdf">detailed ICO guidance</a>. + Meanwhile, remember that the law says authorities must respond + <strong>promptly</strong>. That's really what matters.</p> + + </dd> + + <dt id="public_interest_test">How do you reflect time extensions for public interest tests?<a href="#public_interest_test">#</a> </dt> + + <dd> + + <p>The Freedom of Information Act lets authorities claim an indefinite time + extension when applying a <strong>public interest test</strong>. Information + Commissioner guidance says that it should only be used in "exceptionally + complex" cases + (<a href="http://www.ico.gov.uk/upload/documents/library/freedom_of_information/detailed_specialist_guides/foi_good_practice_guidance_4.pdf">FOI Good Practice Guidance No. 4</a>). + WhatDoTheyKnow doesn't specifically handle this case, which is why we use the + phrase "should normally have responded by" when the 20 working day time is + exceeded. + </p> + + <p>The same guidance says that, even in exceptionally complex cases, no + Freedom of Information request should take more than <strong>40 working days</strong> + to answer. WhatDoTheyKnow displays requests which are overdue by that much + with stronger wording to indicate they are definitely late. + </p> -<p>The Freedom of Information (Scotland) Act does not allow such a public -interest extension. <%= site_name %> would like to see the law changed to either -remove the extension from the UK Act, or to reintroduce an absolute time limit -of 40 working days even with the extension (the House of Lords <a -href="http://www.publicwhip.org.uk/division.php?date=2000-10-17&number=1&house=lords">voted -to remove</a> provision for such a time limit during the initial passage -of the UK Act through Parliament). -</p> -</dd> - -<dt id="large_file">How can I send a large file, which won't go by email?<a href="#large_file">#</a> </dt> + <p>The Freedom of Information (Scotland) Act does not allow such a public + interest extension. WhatDoTheyKnow would like to see the law changed to either + remove the extension from the UK Act, or to reintroduce an absolute time limit + of 40 working days even with the extension (the House of Lords <a + href="http://www.publicwhip.org.uk/division.php?date=2000-10-17&number=1&house=lords">voted + to remove</a> provision for such a time limit during the initial passage + of the UK Act through Parliament). + </p> + </dd> -<dd>Instead of email, you can respond to a request directly from your web -browser, including uploading a file. To do this, choose "respond to request" at -the bottom of the request's page. <a href="/help/contact">Contact us</a> if it -is too big for even that (more than, say, 50Mb). -</dd> - -<dt id="names">Why do you publish the names of civil servants and the text of emails? <a href="#names">#</a> </dt> + <dt id="large_file">How can I send a large file, which won't go by email?<a href="#large_file">#</a> </dt> -<dd>We consider what officers or servants do in the course of their employment -to be public information. We will only remove content in exceptional -circumstances, see our <a href="/help/privacy#takedown">take down policy</a>. -</dd> - -<dt id="mobiles">Do you publish email addresses or mobile phone numbers? <a href="#mobiles">#</a> </dt> - -<dd><p>To prevent spam, we automatically remove most emails and some mobile numbers from -responses to requests. Please <a href="/help/contact">contact us</a> if we've -missed one. -For technical reasons we don't always remove them from attachments, such as certain PDFs.</p> -<p>If you need to know what an address was that we've removed, please <a - href="/help/contact">get in touch with us</a>. Occasionally, an email address -forms an important part of a response and we will post it up in an obscured -form in an annotation. -</dd> - -<dt id="copyright"><a name="commercial"></a>What is your policy on copyright of documents?<a href="#copyright">#</a> </dt> - -<dd>Our Freedom of Information law is "applicant blind", so anyone in the -world can request the same document and get a copy of it. - -If you think our making a document available on the internet infringes your -copyright, you may <a href="/help/contact">contact us</a> and ask us -to take it down. However, to save tax payers' money by preventing duplicate -requests, and for good public relations, we'd advise you not to do that. -</dd> - -</dl> - - -</dl> - -<p><strong>If you haven't already</strong>, read <a href="/help/about">the introduction</a> --> -<br><strong>Otherwise</strong>, the <a href="/help/credits">credits</a> or the <a href="/help/api">programmers API</a> --> - -<div id="hash_link_padding"></div> + <dd>Instead of email, you can respond to a request directly from your web + browser, including uploading a file. To do this, choose "respond to request" at + the bottom of the request's page. <a href="/help/contact">Contact us</a> if it + is too big for even that (more than, say, 50Mb). + </dd> + + <dt id="names">Why do you publish the names of civil servants and the text of emails? <a href="#names">#</a> </dt> + + <dd>We consider what officers or servants do in the course of their employment + to be public information. We will only remove content in exceptional + circumstances, see our <a href="/help/privacy#takedown">take down policy</a>. + </dd> + + <dt id="mobiles">Do you publish email addresses or mobile phone numbers? <a href="#mobiles">#</a> </dt> + + <dd><p>To prevent spam, we automatically remove most emails and some mobile numbers from + responses to requests. Please <a href="/help/contact">contact us</a> if we've + missed one. + For technical reasons we don't always remove them from attachments, such as certain PDFs.</p> + <p>If you need to know what an address was that we've removed, please <a + href="/help/contact">get in touch with us</a>. Occasionally, an email address + forms an important part of a response and we will post it up in an obscured + form in an annotation. + </dd> + + <dt id="copyright"><a name="commercial"></a>What is your policy on copyright of documents?<a href="#copyright">#</a> </dt> + + <dd>Our Freedom of Information law is "applicant blind", so anyone in the + world can request the same document and get a copy of it. + + If you think our making a document available on the internet infringes your + copyright, you may <a href="/help/contact">contact us</a> and ask us + to take it down. However, to save tax payers' money by preventing duplicate + requests, and for good public relations, we'd advise you not to do that. + </dd> + + </dl> + + + </dl> + + <p><strong>If you haven't already</strong>, read <a href="/help/about">the introduction</a> --> + <br><strong>Otherwise</strong>, the <a href="/help/credits">credits</a> or the <a href="/help/api">programmers API</a> --> + + <div id="hash_link_padding"></div> +</div> diff --git a/app/views/help/privacy.rhtml b/app/views/help/privacy.rhtml index fc8c54885..d62afa45b 100644 --- a/app/views/help/privacy.rhtml +++ b/app/views/help/privacy.rhtml @@ -2,54 +2,54 @@ <%= render :partial => 'sidebar' %> -<h1 id="privacy"><%= @title %> <a href="#privacy">#</a> </h1> - -<dl> - -<dt id="email_address">Who gets to see my email address? <a href="#email_address">#</a> </dt> - -<dd><p>We will not disclose your email address to anyone unless we are obliged to by law, -or you ask us to. This includes the public authority that you are sending a -request to. They only get to see an email address -@whatdotheyknow.com which is specific to that request. </p> -<p>If you send a message to another user on the site, then it will reveal your -email address to them. You will be told that this is going to happen.</p> -</dd> - -<dt id="nasty_spam">Will you send nasty, brutish spam to my email address? <a href="#nasty_spam">#</a> </dt> -<dd>Nope. After you sign up to <%= site_name %> we will only send you emails -relating to a request you made, an email alert that you have signed up for, -or for other reasons that you specifically authorise. We will never give or -sell your email addresses to anyone else, unless we are obliged to by law, or -you ask us to. -</dd> - -<dt id="public_request">Why will my name and my request appear publicly on the site? <a href="#public_request">#</a> </dt> - -<dd> -<p>We publish your request on the Internet so that anybody can read it and -make use of the information that you have found. We do not normally delete -requests (<a href="#delete_requests">more details</a>). -</p> -<p> -Your name is tangled up with your request, so has to be published as well. -It is only fair, as we're going to publish the name of the civil servant who -writes the response to your request. Using your real name also helps people -get in touch with you to assist you with your research or to campaign with you. -</p> -<p>By law, you must use your real name for the request to be a valid Freedom of -Information request. See the next question for alternatives if you do not want -to publish your full name. -</p> -</dd> - -<dt id="real_name">Can I make an FOI request using a pseudonym? <a href="#real_name">#</a> </dt> - - -<dd> -<p>Technically, you must use your real name for your request to be a valid Freedom of Information request in law. See this -<a href="http://www.ico.gov.uk/upload/documents/library/freedom_of_information/detailed_specialist_guides/name_of_applicant_fop083_v1.pdf">guidance from the Information Commissioner</a> (January 2009). -</p> +<div id="left_column"> + <h1 id="privacy"><%= @title %></h1> + <dl> + + <dt id="email_address">Who gets to see my email address? <a href="#email_address">#</a> </dt> + + <dd><p>We will not disclose your email address to anyone unless we are obliged to by law, + or you ask us to. This includes the public authority that you are sending a + request to. They only get to see an email address + @whatdotheyknow.com which is specific to that request. </p> + <p>If you send a message to another user on the site, then it will reveal your + email address to them. You will be told that this is going to happen.</p> + </dd> + + <dt id="nasty_spam">Will you send nasty, brutish spam to my email address? <a href="#nasty_spam">#</a> </dt> + <dd>Nope. After you sign up to WhatDoTheyKnow we will only send you emails + relating to a request you made, an email alert that you have signed up for, + or for other reasons that you specifically authorise. We will never give or + sell your email addresses to anyone else, unless we are obliged to by law, or + you ask us to. + </dd> + + <dt id="public_request">Why will my name and my request appear publicly on the site? <a href="#public_request">#</a> </dt> + + <dd> + <p>We publish your request on the Internet so that anybody can read it and + make use of the information that you have found. We do not normally delete + requests (<a href="#delete_requests">more details</a>). + </p> + <p> + Your name is tangled up with your request, so has to be published as well. + It is only fair, as we're going to publish the name of the civil servant who + writes the response to your request. Using your real name also helps people + get in touch with you to assist you with your research or to campaign with you. + </p> + <p>By law, you must use your real name for the request to be a valid Freedom of + Information request. See the next question for alternatives if you do not want + to publish your full name. + </p> + </dd> + + <dt id="real_name">Can I make an FOI request using a pseudonym? <a href="#real_name">#</a> </dt> + + + <dd> + <p>Technically, you must use your real name for your request to be a valid Freedom of Information request in law. See this + <a href="http://www.ico.gov.uk/upload/documents/library/freedom_of_information/detailed_specialist_guides/name_of_applicant_fop083_v1.pdf">guidance from the Information Commissioner</a> (January 2009). + </p> <p>However, the same guidance also says it is good practice for the public authority to still consider a request made using an obvious pseudonym. @@ -179,6 +179,6 @@ that authorities resend these with the personal information removed.</p> <p><strong>Learn more</strong> from the help for <a href="/help/officers">FOI officers</a> --> -<div id="hash_link_padding"></div> - + <div id="hash_link_padding"></div> +</div> diff --git a/app/views/help/requesting.rhtml b/app/views/help/requesting.rhtml index eec887950..bd3ce46f3 100644 --- a/app/views/help/requesting.rhtml +++ b/app/views/help/requesting.rhtml @@ -1,293 +1,293 @@ <% @title = "Making requests" %> <%= render :partial => 'sidebar' %> - -<h1 id="making_requests"><%= @title %> <a href="#making_requests">#</a> </h1> -<dl> - -<dt id="which_authority">I'm not sure which authority to make my request to, how can I find out? <a href="#which_authority">#</a> </dt> - -<dd> -<p>It can be hard to untangle government's complicated structured, and work out -who knows the information that you want. Here are a few tips: -<ul> -<li>Browse or search <%= site_name %> looking for similar requests to yours.</li> -<li>When you've found an authority you think might have the information, use -the "home page" link on the right hand side of their page to check what they do -on their website.</li> -<li>Contact the authority by phone or email to ask if they hold the kind of -information you're after.</li> -<li>Don't worry excessively about getting the right authority. If you get it -wrong, they ought to advise you who to make the request to instead. -</li> -<li>If you've got a thorny case, please <a href="/help/contact">contact us</a> for help.</li> -</ul> - -</dd> - - - -<dt id="missing_body">You're missing the public authority that I want to request from! <a href="#missing_body">#</a> </dt> - -<dd> -<p>Please <a href="/help/contact">contact us</a> with the name of the public authority and, -if you can find it, their contact email address for Freedom of Information requests. -</p> -<p>If you'd like to help add a whole category of public authority to the site, we'd love -to hear from you too. -</p> - -</dd> - -<dt id="authorities">Why do you include some authorities that aren't formally subject to FOI?<a href="#authorities">#</a> </dt> - -<dd> -<p><%= site_name %> lets you make requests for information to a range of -organisations:</p> - -<ul> - <li> Those formally subject to the FOI Act</li> - <li> Those formally subject to the Environmental Regulations (a less well - defined group)</li> - <li> Those which voluntarily comply with the FOI Act</li> - <li> Those which aren't subject to the Act but we think should be, on grounds - such as them having significant public responsibilities. +<div id="left_column"> + <h1 id="making_requests"><%= @title %></h1> + <dl> + + <dt id="which_authority">I'm not sure which authority to make my request to, how can I find out? <a href="#which_authority">#</a> </dt> + + <dd> + <p>It can be hard to untangle government's complicated structured, and work out + who knows the information that you want. Here are a few tips: + <ul> + <li>Browse or search WhatDoTheyKnow looking for similar requests to yours.</li> + <li>When you've found an authority you think might have the information, use + the "home page" link on the right hand side of their page to check what they do + on their website.</li> + <li>Contact the authority by phone or email to ask if they hold the kind of + information you're after.</li> + <li>Don't worry excessively about getting the right authority. If you get it + wrong, they ought to advise you who to make the request to instead. </li> -</ul> - -<p>In the last case, we're using the site to lobby for expansion of the -scope of the FOI Act. Even if an organisation is not legally obliged to respond -to an FOI request, they can still do so voluntarily. -</p> - -</dd> - -<dt id="focused">Why must I keep my request focused?<a href="#focused">#</a> </dt> - -<dd> + <li>If you've got a thorny case, please <a href="/help/contact">contact us</a> for help.</li> + </ul> -<p> -Please put in your request only what is needed so that someone can -easily identify what information you are asking for. Please do -<i>not</i> include any of the following: -</p> + </dd> -<ul> -<li>arguments about your cause</li> -<li>statements that could defame or insult others</li> -</ul> -<p> -If you do, we may have to remove your request to avoid problems with -libel law, which is a pain for both you and us. Short, succinct messages -make it easier for authorities to be clear what information you are -requesting, which means you will get a reply more quickly. -</p> -<p> -If you want information to support an argument or campaign, Freedom of -Information is a powerful tool. Although you may not use this site to -run your campaign, we encourage you to use it to get the information you -need. We also encourage to run your campaign elsewhere - one effective -and very easy way is to <%= link_to 'start your own blog', -"http://wordpress.com/"%>. You are welcome to link to your campaign -from this site in an annotation to your request (you can make -annotations after submitting the request). -</p> + <dt id="missing_body">You're missing the public authority that I want to request from! <a href="#missing_body">#</a> </dt> -</dd> + <dd> + <p>Please <a href="/help/contact">contact us</a> with the name of the public authority and, + if you can find it, their contact email address for Freedom of Information requests. + </p> + <p>If you'd like to help add a whole category of public authority to the site, we'd love + to hear from you too. + </p> -<dt id="fees">Does it cost me anything to make a request?<a href="#fees">#</a> </dt> + </dd> -<dd> + <dt id="authorities">Why do you include some authorities that aren't formally subject to FOI?<a href="#authorities">#</a> </dt> -<p>Making an FOI request is nearly always free.</p> + <dd> + <p>WhatDoTheyKnow lets you make requests for information to a range of + organisations:</p> -<p>Authorities often include unnecessary, scary, boilerplate in -acknowledgement messages saying they "may" charge a fee. Ignore such notices. -They hardly ever will actually charge a fee. If they do, they can only charge you if -you have specifically agreed in advance to pay. <a - href="http://www.ico.gov.uk/upload/documents/library/freedom_of_information/practical_application/chargingafee.pdf">More - details</a> from the Information Commissioner. -</p> - -<p>Sometimes an authority will refuse your request, saying that the cost -of handling it exceeds £600 (for central government) or £450 (for all other -public authorities). At this point you can refine your -request. e.g. it would be much cheaper for an authority to tell you the amount -spent on marshmallows in the past year than in the past ten years. -</p> - -</dd> - - - -<dt id="quickly_response">How quickly will I get a response? <a href="#quickly_response">#</a> </dt> - -<dd> -<p>By law, public authorities must respond <strong>promptly</strong> to -requests. -</p> - -<p>Even if they are not prompt, in nearly all cases they must respond within -20 working days. If you had to clarify your request, or they are a school, -or one or two other cases, then they may have more time -(<a href="/help/officers#days">full details</a>). - -<p><%= site_name %> will email you if you don't get a timely response. You can -then send the public authority a message to remind them, and tell them if they -are breaking the law.</p> - -</dd> - -<dt id="deadline_extended">Deadline extended <a href="#deadline_extended">#</a> </dt> - -<dd> -<p>By law, public authorities must needs <strong>more time</strong> for request ... (TO DO) -</p> - - -</dd> -<dt id="no_response">What if I never get a response?<a href="#no_response">#</a> </dt> - -<dd> -<p>There are several things you can do if you never get a response.</p> -<ul> - <li>Sometimes there has been a genuine problem and the authority never - received the request. It is worth telephoning the authority and politely - checking that they received the request. It was sent to them by email. - </li> - <li>If they have not received it, the problem is most likely due to - "spam filters". Refer the authority to the measures in the answer - '<a href="/help/officers#spam_problems">I can see a request on <%= site_name %>, but we never got it by email!</a>' - in the FOI officers section of this help. + <ul> + <li> Those formally subject to the FOI Act</li> + <li> Those formally subject to the Environmental Regulations (a less well + defined group)</li> + <li> Those which voluntarily comply with the FOI Act</li> + <li> Those which aren't subject to the Act but we think should be, on grounds + such as them having significant public responsibilities. </li> - <li>If you're still having no luck, then you can ask for an internal review, - and then complain to the Information Commissioner about the authority. - Read our page '<a href="/help/unhappy">Unhappy about the response you got?</a>'. -</ul> -</dd> - -<dt id="not_satifised">What if I'm not satisfied with the response? <a href="#not_satifised">#</a> </dt> -<dd>If you didn't get the information you asked for, or you didn't get it in time, -then read our page '<a href="/help/unhappy">Unhappy about the response you got?</a>'. -</dd> - -<dt id="reuse">It says I can't re-use the information I got!<a href="#reuse">#</a> </dt> -<dd> -<p>Authorities often add legal boilerplate about the -"<a href="http://www.opsi.gov.uk/si/si2005/20051515">Re-Use of Public Sector -Information Regulations 2005</a>", which at first glance implies you may not -be able do anything with the information. -</p> - -<p>You can, of course, write articles about the information or summarise it, or -quote parts of it. We also think you should feel free to republish the -information in full, just as we do, even though in theory you might not be -allowed to do so. See <a href="/help/officers#copyright">our policy on copyright</a>.</p> - -</dd> - -<dt id="ico_help">Can you tell me more of the nitty gritty about the process of making requests? <a href="#ico_help">#</a> </dt> - -<dd> -<p>Have a look at the -<a href="http://www.ico.gov.uk/for_the_public/access_to_official_information.aspx">access to official information</a> -pages on the Information Commissioner's website.</p> - -<p>If you're requesting information from a Scottish public authority, -the process is very similar. There are differences around time -limits for compliance. -See the <a href="http://www.itspublicknowledge.info/nmsruntime/saveasdialog.asp?lID=1858&sID=321">Scottish -Information Commissioner's guidance</a> for details.</p> -</dd> - -<dt id="data_protection">Can I request information about myself? <a href="#data_protection">#</a> </dt> - -<dd> -<p>No. Requests made using <%= site_name %> are public, made under the Freedom of -Information Act, and cannot help you find information about a private -individual.</p> - -<p>If you would like to know what information a public -authority holds about yourself, you should make a "Subject Access Request" in -private using Data Protection law. The leaflet "<a -href="http://www.ico.gov.uk/upload/documents/library/data_protection/introductory/subject_access_rights.pdf">How to access your information</a>" (on the Information Commissioner's -website) explains how to do this.</p> - -<p>If you see that somebody has included personal information, perhaps -unwittingly, in a request, please <a href="/help/contact">contact us</a> -immediately so we can remove it.</p> -</dd> - - -<dt id="private_requests">I'd like to keep my request secret! (At least until I publish my story) <a href="#private_requests">#</a> </dt> - -<dd><p><%= site_name %> is currently only designed for public requests. All -responses that we receive are automatically published on the website for anyone -to read. </p> -<p>You should contact the public authority directly if you would like to -make a request in private. If you're interested in buying a system which helps -you manage FOI requests in secret, then <a href="/help/contact">contact us</a>. -</p> -</dd> - -<dt id="eir">Why can I only request information about the environment from some authorities? <a href="#eir">#</a> </dt> - -<dd> -<p>Some public authorities, such as <a href="http://www.whatdotheyknow.com/body/south_east_water">South East Water</a>, -don't come under the Freedom of Information Act, but do come under another law called -the Environmental Information Regulations (EIR). -</p> - -<p>It's a very similar law, so you make a request -to them using <%= site_name %> in just the same way as an FOI request. The only -difference is that on the page where your write you request, it reminds you -that you can only request "environmental information" and tells you what that -means. It is quite broad. -</p> - -<p>You can, of course, request environmental information from other -authorities. Just make a Freedom of Information (FOI) request as normal. The -authority has a duty to work out if the Environmental Information Regulations -(EIR) is the more appropriate legislation to reply under. -</p> -</dd> - -<dt id="multiple">Can I make the same to request to lots of authorities, e.g. all councils? <a href="#multiple">#</a> </dt> - -<dd>We ask you to first send a test version of your request to a few -authorities. Their responses will help you improve the wording of your request, -so that you get the best information when you send the request to all of -the authorities. There is currently no automated system for sending the request -to the other authorities, you must copy and paste it by hand. - -</dd> - -<dt id="offsite">I made a request off the site, how do I upload it to the archive?<a href="#offsite">#</a> </dt> - -<dd><%= site_name %> is an archive of requests made through the site, -and does not try to be an archive of all FOI requests. We'll never support uploading -other requests. For one thing, we wouldn't be able to verify that other -responses actually came from the authority. If this really matters to you, -you can always make the same request again via <%= site_name %>. -</dd> - -<dt id="moderation">How do you moderate request annotations? <a href="#moderation">#</a> </dt> - -<dd> -<p>Annotations on <%= site_name %> are to help -people get the information they want, or to give them pointers to places they -can go to help them act on it. We reserve the right to remove anything else. -</p> -<p>Endless, political discussions are not allowed. -Post a link to a suitable forum or campaign site elsewhere.</p> -<dd> + </ul> -</dl> + <p>In the last case, we're using the site to lobby for expansion of the + scope of the FOI Act. Even if an organisation is not legally obliged to respond + to an FOI request, they can still do so voluntarily. + </p> -<p><strong>Next</strong>, read about <a href="/help/privacy">your privacy</a> --> + </dd> -<div id="hash_link_padding"></div> + <dt id="focused">Why must I keep my request focused?<a href="#focused">#</a> </dt> + <dd> + + <p> + Please put in your request only what is needed so that someone can + easily identify what information you are asking for. Please do + <i>not</i> include any of the following: + </p> + + <ul> + <li>arguments about your cause</li> + <li>statements that could defame or insult others</li> + </ul> + + <p> + If you do, we may have to remove your request to avoid problems with + libel law, which is a pain for both you and us. Short, succinct messages + make it easier for authorities to be clear what information you are + requesting, which means you will get a reply more quickly. + </p> + + <p> + If you want information to support an argument or campaign, Freedom of + Information is a powerful tool. Although you may not use this site to + run your campaign, we encourage you to use it to get the information you + need. We also encourage to run your campaign elsewhere - one effective + and very easy way is to <%= link_to 'start your own blog', + "http://wordpress.com/"%>. You are welcome to link to your campaign + from this site in an annotation to your request (you can make + annotations after submitting the request). + </p> + + </dd> + + <dt id="fees">Does it cost me anything to make a request?<a href="#fees">#</a> </dt> + + <dd> + + <p>Making an FOI request is nearly always free.</p> + + <p>Authorities often include unnecessary, scary, boilerplate in + acknowledgement messages saying they "may" charge a fee. Ignore such notices. + They hardly ever will actually charge a fee. If they do, they can only charge you if + you have specifically agreed in advance to pay. <a + href="http://www.ico.gov.uk/upload/documents/library/freedom_of_information/practical_application/chargingafee.pdf">More + details</a> from the Information Commissioner. + </p> + + <p>Sometimes an authority will refuse your request, saying that the cost + of handling it exceeds £600 (for central government) or £450 (for all other + public authorities). At this point you can refine your + request. e.g. it would be much cheaper for an authority to tell you the amount + spent on marshmallows in the past year than in the past ten years. + </p> + + </dd> + + + + <dt id="quickly_response">How quickly will I get a response? <a href="#quickly_response">#</a> </dt> + + <dd> + <p>By law, public authorities must respond <strong>promptly</strong> to + requests. + </p> + + <p>Even if they are not prompt, in nearly all cases they must respond within + 20 working days. If you had to clarify your request, or they are a school, + or one or two other cases, then they may have more time + (<a href="/help/officers#days">full details</a>). + + <p>WhatDoTheyKnow will email you if you don't get a timely response. You can + then send the public authority a message to remind them, and tell them if they + are breaking the law.</p> + + </dd> + + <dt id="deadline_extended">Deadline extended <a href="#deadline_extended">#</a> </dt> + + <dd> + <p>By law, public authorities must needs <strong>more time</strong> for request ... (TO DO) + </p> + + + </dd> + <dt id="no_response">What if I never get a response?<a href="#no_response">#</a> </dt> + + <dd> + <p>There are several things you can do if you never get a response.</p> + <ul> + <li>Sometimes there has been a genuine problem and the authority never + received the request. It is worth telephoning the authority and politely + checking that they received the request. It was sent to them by email. + </li> + <li>If they have not received it, the problem is most likely due to + "spam filters". Refer the authority to the measures in the answer + '<a href="/help/officers#spam_problems">I can see a request on WhatDoTheyKnow, but we never got it by email!</a>' + in the FOI officers section of this help. + </li> + <li>If you're still having no luck, then you can ask for an internal review, + and then complain to the Information Commissioner about the authority. + Read our page '<a href="/help/unhappy">Unhappy about the response you got?</a>'. + </ul> + </dd> + + <dt id="not_satifised">What if I'm not satisfied with the response? <a href="#not_satifised">#</a> </dt> + <dd>If you didn't get the information you asked for, or you didn't get it in time, + then read our page '<a href="/help/unhappy">Unhappy about the response you got?</a>'. + </dd> + + <dt id="reuse">It says I can't re-use the information I got!<a href="#reuse">#</a> </dt> + <dd> + <p>Authorities often add legal boilerplate about the + "<a href="http://www.opsi.gov.uk/si/si2005/20051515">Re-Use of Public Sector + Information Regulations 2005</a>", which at first glance implies you may not + be able do anything with the information. + </p> + + <p>You can, of course, write articles about the information or summarise it, or + quote parts of it. We also think you should feel free to republish the + information in full, just as we do, even though in theory you might not be + allowed to do so. See <a href="/help/officers#copyright">our policy on copyright</a>.</p> + + </dd> + + <dt id="ico_help">Can you tell me more of the nitty gritty about the process of making requests? <a href="#ico_help">#</a> </dt> + + <dd> + <p>Have a look at the + <a href="http://www.ico.gov.uk/for_the_public/access_to_official_information.aspx">access to official information</a> + pages on the Information Commissioner's website.</p> + + <p>If you're requesting information from a Scottish public authority, + the process is very similar. There are differences around time + limits for compliance. + See the <a href="http://www.itspublicknowledge.info/nmsruntime/saveasdialog.asp?lID=1858&sID=321">Scottish + Information Commissioner's guidance</a> for details.</p> + </dd> + + <dt id="data_protection">Can I request information about myself? <a href="#data_protection">#</a> </dt> + + <dd> + <p>No. Requests made using WhatDoTheyKnow are public, made under the Freedom of + Information Act, and cannot help you find information about a private + individual.</p> + + <p>If you would like to know what information a public + authority holds about yourself, you should make a "Subject Access Request" in + private using Data Protection law. The leaflet "<a + href="http://www.ico.gov.uk/upload/documents/library/data_protection/introductory/subject_access_rights.pdf">How to access your information</a>" (on the Information Commissioner's + website) explains how to do this.</p> + + <p>If you see that somebody has included personal information, perhaps + unwittingly, in a request, please <a href="/help/contact">contact us</a> + immediately so we can remove it.</p> + </dd> + + + <dt id="private_requests">I'd like to keep my request secret! (At least until I publish my story) <a href="#private_requests">#</a> </dt> + + <dd><p>WhatDoTheyKnow is currently only designed for public requests. All + responses that we receive are automatically published on the website for anyone + to read. </p> + <p>You should contact the public authority directly if you would like to + make a request in private. If you're interested in buying a system which helps + you manage FOI requests in secret, then <a href="/help/contact">contact us</a>. + </p> + </dd> + + <dt id="eir">Why can I only request information about the environment from some authorities? <a href="#eir">#</a> </dt> + + <dd> + <p>Some public authorities, such as <a href="http://www.whatdotheyknow.com/body/south_east_water">South East Water</a>, + don't come under the Freedom of Information Act, but do come under another law called + the Environmental Information Regulations (EIR). + </p> + + <p>It's a very similar law, so you make a request + to them using WhatDoTheyKnow in just the same way as an FOI request. The only + difference is that on the page where your write you request, it reminds you + that you can only request "environmental information" and tells you what that + means. It is quite broad. + </p> + + <p>You can, of course, request environmental information from other + authorities. Just make a Freedom of Information (FOI) request as normal. The + authority has a duty to work out if the Environmental Information Regulations + (EIR) is the more appropriate legislation to reply under. + </p> + </dd> + + <dt id="multiple">Can I make the same to request to lots of authorities, e.g. all councils? <a href="#multiple">#</a> </dt> + + <dd>We ask you to first send a test version of your request to a few + authorities. Their responses will help you improve the wording of your request, + so that you get the best information when you send the request to all of + the authorities. There is currently no automated system for sending the request + to the other authorities, you must copy and paste it by hand. + + </dd> + + <dt id="offsite">I made a request off the site, how do I upload it to the archive?<a href="#offsite">#</a> </dt> + + <dd>WhatDoTheyKnow is an archive of requests made through the site, + and does not try to be an archive of all FOI requests. We'll never support uploading + other requests. For one thing, we wouldn't be able to verify that other + responses actually came from the authority. If this really matters to you, + you can always make the same request again via WhatDoTheyKnow. + </dd> + + <dt id="moderation">How do you moderate request annotations? <a href="#moderation">#</a> </dt> + + <dd> + <p>Annotations on WhatDoTheyKnow are to help + people get the information they want, or to give them pointers to places they + can go to help them act on it. We reserve the right to remove anything else. + </p> + <p>Endless, political discussions are not allowed. + Post a link to a suitable forum or campaign site elsewhere.</p> + <dd> + + </dl> + + <p><strong>Next</strong>, read about <a href="/help/privacy">your privacy</a> --> + + <div id="hash_link_padding"></div> +</div> diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index 94ec5a956..91980d9d7 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -17,14 +17,20 @@ </title> <link rel="shortcut icon" href="/favicon.ico"> - - <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet" %> + <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet" %> + <%= stylesheet_link_tag 'fonts', :rel => "stylesheet" %> + <%= stylesheet_link_tag 'theme', :rel => "stylesheet" %> + <%= javascript_include_tag 'jquery.js', 'jquery-ui.min' %> + <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%> <!--[if LT IE 7]> <style type="text/css">@import url("/stylesheets/ie6.css");</style> <![endif]--> <!--[if LT IE 7]> <style type="text/css">@import url("/stylesheets/ie6-custom.css");</style> <![endif]--> + <!--[if LT IE 8]> + <style type="text/css">@import url("/stylesheets/ie7.css");</style> + <![endif]--> <%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %> <% if @feed_autodetect %> @@ -57,55 +63,49 @@ =end %> <div class="entirebody"> - <div id="banner"></div> - <div id="header"> - <h1> - <%= link_to site_name, frontpage_url %> - </h1> + <div id="banner"> + <div id="banner_inner"> + <div class="lang"><%= render :partial => 'general/locale_switcher' %></div> + + <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %> + <div id="logged_in_bar"> + <% if @user %> + <%= _('Hello, {{username}}!', :username => h(@user.name))%> - <div id="tagline"> - <%= _('Make and explore Freedom of Information requests') %> - </div> + <% if @user %> + <%=link_to _("My profile"), user_url(@user) %> + <% end %> - </div> - <div id="orglogo"> - <%= render :partial => 'general/orglink' %> - </div> - <div class="lang"><%= render :partial => 'general/locale_switcher' %></div> - - <div id="navigation_search"> - <% form_tag({:controller => "general", :action => "search_redirect"}, {:id => "navigation_search_form"}) do %> - <p> - <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query" } %> - <%= submit_tag _("Search") %> - </p> - <% end %> - </div> - <div id="topnav"> - <ul id="navigation"> - <li><%= link_to _("Make request"), frontpage_url %></li> - <li><%= link_to _("View requests"), request_list_successful_url %></li> - <li><%= link_to _("View authorities"), list_public_bodies_default %></li> - <% if @user %> - <li><%=link_to _("My requests"), user_url(@user) %></li> - <% end %> - <li><%= link_to _("Read blog"), blog_url %></li> - <li><%= link_to _("Help"), help_about_url %></li> - </ul> - <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %> - <div id="logged_in_bar"> - <% if @user %> - <%= _('Hello, {{username}}!', :username => h(@user.name))%> - (<%= link_to _("Sign out"), signout_url(:r => request.request_uri) %>) - <% else %> - <%= _('Hello!') %> - (<%= link_to _("Sign in or sign up"), signin_url(:r => request.request_uri) %>) + <%= link_to _("Sign out"), signout_url(:r => request.request_uri) %> + <% else %> + <%= link_to _("Sign in or sign up"), signin_url(:r => request.request_uri) %> + <% end %> + </div> + <% end %> + + <div id="navigation_search"> + <% form_tag({:controller => "general", :action => "search_redirect"}, {:id => "navigation_search_form"}) do %> + <p> + <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query" } %> + <%= image_submit_tag('search-button.png') %> + </p> <% end %> - </div> - <% end %> + </div> + + <%= link_to image_tag('logo.png'), frontpage_url, :id=>'logo' %> + + <div id="topnav"> + <ul id="navigation"> + <li class="<%= 'selected' if params[:controller] == 'general' and params[:action] != 'blog' %>"><%= link_to _("Make a request"), frontpage_url %></li> + <li class="<%= 'selected' if params[:controller] == 'request' %>"><%= link_to _("View requests"), request_list_successful_url %></li> + <li class="<%= 'selected' if params[:controller] == 'public_body' %>"><%= link_to _("View authorities"), list_public_bodies_default %></li> + <li class="<%= 'selected' if params[:controller] == 'general' and params[:action] == 'blog' %>"><%= link_to _("Read blog"), blog_url %></li> + <li class="<%= 'selected' if params[:controller] == 'help' %>"><%= link_to _("Help"), help_about_url %></li> + </ul> + </div> + </div> </div> - <div id="wrapper"> <div id="content"> diff --git a/app/views/public_body/_body_listing.rhtml b/app/views/public_body/_body_listing.rhtml index 48b6e8245..864ab8c9b 100644 --- a/app/views/public_body/_body_listing.rhtml +++ b/app/views/public_body/_body_listing.rhtml @@ -1,5 +1,7 @@ <% if public_bodies.empty? %> + <p> <%= _("None found.")%> + </p> <% else %> <% for public_body in public_bodies %> <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => public_body } %> diff --git a/app/views/public_body/list.rhtml b/app/views/public_body/list.rhtml index 5d88b1501..06c7d3be9 100644 --- a/app/views/public_body/list.rhtml +++ b/app/views/public_body/list.rhtml @@ -1,8 +1,7 @@ -<div id="body_sidebar"> +<div id="right_column"> + <h2><%=_('Show only...')%></h2> - <h1><%=_('Show only...')%></h1> - - <h2><%=_('Alphabet') %></h2> + <h3><%=_('Beginning with') %></h3> <ul><li> <%= render :partial => 'alphabet' %> </li></ul> @@ -19,7 +18,7 @@ <% else %> <% first_row = false %> <% end %> - <h2><%=h row%></h2> + <h3><%=h row%></h3> <ul> <% end %> <% end %> @@ -31,24 +30,22 @@ <p> <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %> </p> - </div> <% @title = _("Public authorities - {{description}}", :description => @description) %> - -<h1><%=@title%></h1> - -<p class="subtitle"> - <%= @public_bodies.size %> <%= _('in total') %> - (<%= _('<a href="%s">can\'t find the one you want?</a>') % [help_requesting_path + '#missing_body'] %>) -</p> - -<% if @tag.size == 1 %> - <p><%= render :partial => 'alphabet' %></p> +<div id="left_column"> +<h1>Public authorities</h1> + +<% form_tag(list_public_bodies_default_url, :method => "get", :id=>"search_form") do %> + <div> + <%= text_field_tag(:public_body_query, params[:public_body_query]) %> + <%= submit_tag(_("Search")) %> + </div> <% end %> + +<h2 class="publicbody_results"><%= _('Found {{count}} public bodies {{description}}', :count=>@public_bodies.size, :description=>@description) %></h2> <%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %> -<% if @tag.size == 1 && @public_bodies.size > 0 %> - <p><%= render :partial => 'alphabet' %></p> -<% end %> -<%= will_paginate(@public_bodies) %> + <%= will_paginate(@public_bodies) %><br/> + <%= _('<a href="%s">Can\'t find the one you want?</a>') % [help_requesting_path + '#missing_body'] %> +</div> diff --git a/app/views/public_body/show.rhtml b/app/views/public_body/show.rhtml index 36bba8851..85506a1bd 100644 --- a/app/views/public_body/show.rhtml +++ b/app/views/public_body/show.rhtml @@ -1,70 +1,71 @@ <% @title = h(@public_body.name) + " - view and make Freedom of Information requests" %> -<div id="request_sidebar"> - <h2><%= _('Track this authority')%></h2> - <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %> - <h2><%= _('More about this authority')%></h2> - <% if !@public_body.calculated_home_page.nil? %> - <%= link_to _('Home page of authority'), @public_body.calculated_home_page %><br> - <% end %> - <% if !@public_body.publication_scheme.empty? %> - <%= link_to _('Publication scheme'), @public_body.publication_scheme %><br> - <% end %> - <% if @public_body.has_tag?("charity") %> - <% for tag_value in @public_body.get_tag_values("charity") %> - <% if tag_value.match(/^SC/) %> - <%= link_to _('Charity registration'), "http://www.oscr.org.uk/CharityIndexDetails.aspx?id=" + tag_value %><br> - <% else %> - <%= link_to _('Charity registration'), "http://www.charity-commission.gov.uk/SHOWCHARITY/RegisterOfCharities/CharityFramework.aspx?RegisteredCharityNumber=" + tag_value %><br> - <% end %> - <% end %> - <% end %> - <%= link_to _('View FOI email address'), view_public_body_email_url(@public_body.url_name) %><br> -</div> - -<h1><%=h(@public_body.name)%></h1> +<div> + <div id="header_right"> + <h2><%= _('Track this authority')%></h2> + <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %> + <h2><%= _('More about this authority')%></h2> + <% if !@public_body.calculated_home_page.nil? %> + <%= link_to _('Home page of authority'), @public_body.calculated_home_page %><br> + <% end %> + <% if !@public_body.publication_scheme.empty? %> + <%= link_to _('Publication scheme'), @public_body.publication_scheme %><br> + <% end %> + <% if @public_body.has_tag?("charity") %> + <% for tag_value in @public_body.get_tag_values("charity") %> + <% if tag_value.match(/^SC/) %> + <%= link_to _('Charity registration'), "http://www.oscr.org.uk/CharityIndexDetails.aspx?id=" + tag_value %><br> + <% else %> + <%= link_to _('Charity registration'), "http://www.charity-commission.gov.uk/SHOWCHARITY/RegisterOfCharities/CharityFramework.aspx?RegisteredCharityNumber=" + tag_value %><br> + <% end %> + <% end %> + <% end %> + <%= link_to _('View FOI email address'), view_public_body_email_url(@public_body.url_name) %><br> + </div> -<p class="subtitle"> -<%=@public_body.type_of_authority(true)%> -<% if not @public_body.short_name.empty? %>, -<%= _('also called {{public_body_short_name}}', :public_body_short_name => h(@public_body.short_name))%><% end %> -<% if !@user.nil? && @user.admin_page_links? %> -(<%= link_to _("admin"), public_body_admin_url(@public_body) %>) -<% end %> -</p> + <div id="header_left"> + <h1><%=h(@public_body.name)%></h1> -<% if @public_body.has_notes? && (@public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact') %> - <p><%= @public_body.notes_as_html %></p> -<% end %> + <p class="subtitle"> + <%=@public_body.type_of_authority(true)%> + <% if not @public_body.short_name.empty? %>, + <%= _('also called {{public_body_short_name}}', :public_body_short_name => h(@public_body.short_name))%><% end %> + <% if !@user.nil? && @user.admin_page_links? %> + (<%= link_to _("admin"), public_body_admin_url(@public_body) %>) + <% end %> + </p> -<% if @public_body.eir_only? %> - <p><%= _('You can only request information about the environment from this authority.')%></p> -<% end %> + <% if @public_body.has_notes? && (@public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact') %> + <p><%= @public_body.notes_as_html %></p> + <% end %> -<div id="stepwise_make_request"> - <strong> - <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %> - <% if @public_body.eir_only? %> - <%= link_to _("Make a new Environmental Information request"), new_request_to_body_url(:url_name => @public_body.url_name)%> to <%= h(@public_body.name) %> + <% if @public_body.eir_only? %> + <p><%= _('You can only request information about the environment from this authority.')%></p> + <% end %> + <div id="stepwise_make_request"> + <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %> + <% if @public_body.eir_only? %> + Make a new <strong>Environmental Information</strong> request + <% else %> + Make a new <strong>Freedom of Information</strong> request + <% end %> + <%= _('<a class="link_button_green" href="{{url}}">{{text}}</a>', :url=>new_request_to_body_url(:url_name => @public_body.url_name), :text=>_("Start"))%> + <% elsif @public_body.has_notes? %> + <%= @public_body.notes_as_html %> + <% elsif @public_body.not_requestable_reason == 'not_apply' %> + <%= _('Freedom of Information law does not apply to this authority, so you cannot make + a request to it.')%> + <% elsif @public_body.not_requestable_reason == 'defunct' %> + <%= _('This authority no longer exists, so you cannot make a request to it.')%> <% else %> - <%= _('<a href="{{url}}">Make a new Freedom of Information request</a> to {{public_body_name}}', - :public_body_name => h(@public_body.name), :url=>new_request_to_body_url(:url_name => @public_body.url_name))%> + <%= _('For an unknown reason, it is not possible to make a request to this authority.')%> <% end %> - <% elsif @public_body.has_notes? %> - <%= @public_body.notes_as_html %> - <% elsif @public_body.not_requestable_reason == 'not_apply' %> - <%= _('Freedom of Information law does not apply to this authority, so you cannot make - a request to it.')%> - <% elsif @public_body.not_requestable_reason == 'defunct' %> - <%= _('This authority no longer exists, so you cannot make a request to it.')%> - <% else %> - <%= _('For an unknown reason, it is not possible to make a request to this authority.')%> - <% end %> - </strong> + </div> + </div> </div> - +<div style="clear:both"> </div> <% if !@xapian_requests.nil? %> - <% if @xapian_requests.results.empty? %> + <% if @public_body.info_requests.size == 0 %> <% if @public_body.eir_only? %> <h2><%= _('Environmental Information Regulations requests made using this site') %></h2> <p>Nobody has made any Environmental Information Regulations requests to <%=h(@public_body.name)%> using this site yet.</p> @@ -73,7 +74,7 @@ <p><%= _('Nobody has made any Freedom of Information requests to {{public_body_name}} using this site yet.', :public_body_name => h(@public_body.name))%></p> <% end %> <% else %> - <h2> + <h2 class="foi_results"> <% if @public_body.eir_only? %> <%= pluralize(@public_body.info_requests.size, "Environmental Information Regulations request made using this site") %> <% else %> @@ -82,13 +83,19 @@ <%= @page_desc %> </h2> + <%= render :partial => 'request/request_filter_form' %> + <% for result in @xapian_requests.results %> <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> <% end %> <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @public_body.info_requests.size) %> - <p> <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %></p> + <% if @xapian_requests.results.empty? %> + <p><% _('There were no requests matching your query.') %></p> + <% else %> + <p> <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %></p> + <% end %> <% end %> <% else %> diff --git a/app/views/request/_request_filter_form.rhtml b/app/views/request/_request_filter_form.rhtml new file mode 100644 index 000000000..b13637c25 --- /dev/null +++ b/app/views/request/_request_filter_form.rhtml @@ -0,0 +1,52 @@ +<%= render :partial => 'general/localised_datepicker' %> + +<div id="list-filter"> + <div class="list-filter-item"> + <h3 class="title">Showing</h3> + <% statuses = [["all", _("all requests")], + ["successful", _("successful requests")], + ["unsuccessful", _("unsuccessful requests")], + ["awaiting", _("unresolved requests")]] %> + <% for status, label in statuses %> + <% if params[:view] != status %> + <% if params[:controller] == "public_body" %> + <%= link_to label, url_for(:controller => "public_body", :action => "show", :view => status, :url_name => @public_body.url_name) + "?" + request.query_string %> + <% else %> + <%= link_to label, url_for(:controller => "request", :action => "list", :view => status) + "?" + request.query_string %> + <% end %> + <% else %> + <%= label %> + <% end %> + <%= "|" unless statuses.last[0] == status %> + <% end %> + </div> + <% form_tag(request.path, :method => "get", :id=>"filter_requests_form") do %> + <div class="list-filter-item"> + <%= label_tag(:query, _("Keywords"), :class=>"form_label title") %> + <%= text_field_tag(:query, params[:query]) %> + </div> +<% if false # don't think we want this, but leaving as an example %> + <div class="list-filter-item"> + <%= _("Search for words in:") %> <br/> + <% [["sent", _("messages from users")], + ["response", _("messages from authorities")], + ["comment", _("comments")]].each_with_index do |item, index| + variety, title = item %> + + <%= check_box_tag "request_variety[]", variety, params[:request_variety].nil? ? true : params[:request_variety].include?(variety), :id => "request_variety_#{index}" %> + <%= label_tag("request_variety_#{index}", title) %> <br/> + <% end %> + </div> +<% end %> + <div class="list-filter-item"> + <%= label_tag(:query, _("Made between"), :class=>"form_label title") %> + <%= text_field_tag(:request_date_after, params[:request_date_after], {:class => "use-datepicker", :size => 10}) %> + <%= label_tag(:query, _("and"), :class=>"form_label") %> + <%= text_field_tag(:request_date_before, params[:request_date_before], {:class => "use-datepicker", :size => 10}) %> + </div> + + <div class="list-filter-item"> + <%= submit_tag("Search") %> + </div> +<% end %> +</div> diff --git a/app/views/request/_request_listing_via_event.rhtml b/app/views/request/_request_listing_via_event.rhtml index afacabea5..e7c378cec 100644 --- a/app/views/request/_request_listing_via_event.rhtml +++ b/app/views/request/_request_listing_via_event.rhtml @@ -3,7 +3,8 @@ end %> <div class="request_listing"> - <span class="head"> + <div class="request_left"> + <span class="head"> <% if event.is_incoming_message? %> <%= link_to highlight_words(info_request.title, @highlight_words), incoming_message_url(event.incoming_message) %> <% elsif event.is_outgoing_message? and event.event_type == 'followup_sent' %> @@ -13,18 +14,9 @@ end %> <% else %> <%= link_to highlight_words(info_request.title, @highlight_words), request_url(info_request) %> <% end %> - </span> - <span class="desc"> - <%= highlight_and_excerpt(event.search_text_main(true), @highlight_words, 150) %> - </span> - - <span class="bottomline icon_<%= info_request.calculate_status %>"> - - <strong> - <%= info_request.display_status %> - </strong><br> - - <% if event.event_type == 'sent' %> + </span> + <div class="requester"> + <% if event.event_type == 'sent' %> <%= _('Request sent to {{public_body_name}} by {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>user_link_absolute(info_request.user),:date=>simple_date(event.created_at )) %> <% elsif event.event_type == 'followup_sent' %> <%=event.display_status %> @@ -37,6 +29,17 @@ end %> <% else %> <% raise _("unknown event type indexed ") + event.event_type %> <% end %> + </div> + <span class="bottomline icon_<%= info_request.calculate_status %>"> + <strong> + <%= info_request.display_status %> + </strong><br> </span> + </div> + <div class="request_right"> + <span class="desc"> + <%= highlight_and_excerpt(event.search_text_main(true), @highlight_words, 150) %> + </span> + </div> </div> diff --git a/app/views/request/_sidebar.rhtml b/app/views/request/_sidebar.rhtml index 2b9652d9c..4dce18e76 100644 --- a/app/views/request/_sidebar.rhtml +++ b/app/views/request/_sidebar.rhtml @@ -1,4 +1,4 @@ -<div id="request_sidebar"> +<div id="right_column"> <h2><%= _('Track this request') %></h2> <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user == @user, :location => 'sidebar' } %> diff --git a/app/views/request/list.rhtml b/app/views/request/list.rhtml index 04dc0d010..28dc55cdf 100644 --- a/app/views/request/list.rhtml +++ b/app/views/request/list.rhtml @@ -1,40 +1,35 @@ -<div id="list_sidebar"> -<h1><%= _('Show only...')%></h1> -<ul> -<% for view, description, target in [ - ['successful', _('Successful responses'), request_list_successful_url(:view => 'successful')], - ['recent', _('Recently sent requests'), request_list_recent_url(:view => 'recent')] -] %> -<li> - <%= link_to_unless (@view == view), description, target %> -</li> -<% end %> -</ul> + +<div id="header_left"> + <h1><%=@title%></h1> + <%= render :partial => 'request/request_filter_form' %> </div> -<h1><%=@title%></h1> +<div id="header_right"> + <h2>Track these requests</h2> + <% if @track_thing %> + <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %> + <% end %> +</div> -<% if @track_thing %> - <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %> -<% end %> +<div style="clear:both"></div> -<% view_cache :ttl => 5.minutes, :tag => [@view, @page, I18n.locale] do %> - <% if @list_results.empty? %> - <p> <%= _('No requests of this sort yet.')%></p> - <% else %> - <% for result in @list_results%> - <% if result.class.to_s == 'InfoRequestEvent' %> - <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result, :info_request => result.info_request } %> - <% else %> - <p><strong><%= _('Unexpected search result type') %> <%=result.class.to_s%></strong></p> +<div class="results_section"> + <% view_cache :ttl => 5.minutes, :tag => [@view, @page, I18n.locale] do %> + <% if @list_results.empty? %> + <p> <%= _('No requests of this sort yet.')%></p> + <% else %> + <h2 class="foi_results"><%= _('{{count}} FOI requests found', :count => @list_results.size) %></h2> + <div class="results_block"> + <% for result in @list_results%> + <% if result.class.to_s == 'InfoRequestEvent' %> + <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result, :info_request => result.info_request } %> + <% else %> + <p><strong><%= _('Unexpected search result type') %> <%=result.class.to_s%></strong></p> + <% end %> <% end %> - <% end %> - <% end %> + </div> + <% end %> - <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @matches_estimated) %> -<% end %> - -<% if @track_thing %> - <p></p> - <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %> -<% end %> + <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @matches_estimated) %> + <% end %> +</div> diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml index b8625a8e6..9538065ed 100644 --- a/app/views/request/new.rhtml +++ b/app/views/request/new.rhtml @@ -10,11 +10,13 @@ </ul></div> <% end %> +<h1>Make a new request</h1> + <%= foi_error_messages_for :info_request, :outgoing_message %> <div id="request_advice"> - <h1><%= _('Read this before writing your {{info_request_law_used_full}} request', :info_request_law_used_full=>h(@info_request.law_used_full)) %></h1> - <ul> + <h2><%= _('Read this before writing your {{info_request_law_used_full}} request', :info_request_law_used_full=>h(@info_request.law_used_full)) %></h2> + <ol> <li> <% form_tag("http://www.google.co.uk/search", {:id => "search_body_website_form", :method => "get"} ) do %> <p> @@ -26,11 +28,12 @@ <% end %> <% if !@info_request.public_body.calculated_home_page.nil? %> <br> - <%= text_field_tag 'q', params[:q], { :size => 20 } %> - <%= hidden_field_tag 'as_sitesearch', @info_request.public_body.calculated_home_page %> - <%= submit_tag _("Search") %> + <p> + <%= text_field_tag 'q', params[:q], { :size => 20 } %> + <%= hidden_field_tag 'as_sitesearch', @info_request.public_body.calculated_home_page %> + <%= submit_tag _("Search") %> + </p> <% end %> - <br> ... <%= _('to check that the info isn\'t already published.') %> </p> <% end %> @@ -47,7 +50,7 @@ <li><%= _('Ask for <strong>specific</strong> documents or information, this site is not suitable for general enquiries.') %></li> <li><%= _('Keep it <strong>focused</strong>, you\'ll be more likely to get what you want (<a href="%s">why?</a>).') % [help_requesting_path + '#focused'] %></li> <li><%= _('This site is <strong>public</strong>. Everything you type and any response will be published.') %></li> - </ul> + </ol> <% if @info_request.public_body.has_notes? %> <h1><%= _('Special note for this authority!') %></h1> @@ -84,10 +87,8 @@ <% form_for(:info_request, @info_request, :html => { :id => 'write_form' } ) do |f| %> <div id="request_form"> - <h1> <label class="form_label" for="info_request_public_body_id"><%= _('To:') %></label> <span id="to_public_body"><%=h(@info_request.public_body.name)%></span> - </h1> <p> <label class="form_label" for="info_request_title"><%= _('Summary:') %></label> diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml index 2897a3564..c5d040fb7 100644 --- a/app/views/request/show.rhtml +++ b/app/views/request/show.rhtml @@ -22,7 +22,7 @@ <%= render :partial => 'sidebar' %> -<div id="request_main"> +<div id="left_column"> <h1><%=h(@info_request.title)%></h1> <% if @info_request.user.profile_photo %> diff --git a/app/views/track/_tracking_links.rhtml b/app/views/track/_tracking_links.rhtml index a08f97c08..5a8316db4 100644 --- a/app/views/track/_tracking_links.rhtml +++ b/app/views/track/_tracking_links.rhtml @@ -16,15 +16,17 @@ <%= submit_tag "unsubscribe" %> </p> <% end %> -<% else %> +<% elsif track_thing %> <div class="feed_link feed_link_<%=location%>"> <%= link_to '<img src="/images/email-16.png" alt="">', do_track_url(track_thing) %> - <%= link_to track_thing.params[:verb_on_page], do_track_url(track_thing) %> + <%= link_to "Track by email", do_track_url(track_thing) %> + </div> + + <div class="feed_link feed_link_<%=location%>"> + <%= link_to '<img src="/images/feed-16.png" alt="">', do_track_url(track_thing, 'feed') %> + <%= link_to (location == 'sidebar' ? 'RSS feed of updates' : 'RSS feed'), do_track_url(track_thing, 'feed') %> </div> <% end %> -<div class="feed_link feed_link_<%=location%>"> - <%= link_to '<img src="/images/feed-16.png" alt="">', do_track_url(track_thing, 'feed') %> - <%= link_to (location == 'sidebar' ? 'RSS feed of updates' : 'RSS feed'), do_track_url(track_thing, 'feed') %> -</div> + diff --git a/app/views/user/_signin.rhtml b/app/views/user/_signin.rhtml index 79628b3a9..6baed3c25 100644 --- a/app/views/user/_signin.rhtml +++ b/app/views/user/_signin.rhtml @@ -3,9 +3,9 @@ <% form_tag({:action => "signin"}, {:id => "signin_form"}) do %> <%= foi_error_messages_for :user_signin %> - <% if not sign_in_as_existing_user %> + <!--<% if not sign_in_as_existing_user %> <h2><%= _('If you\'ve used {{site_name}} before', :site_name=>site_name)%></h2> - <% end %> + <% end %>--> <p> <label class="form_label" for="user_signin_email"><%= _('Your e-mail:')%></label> diff --git a/app/views/user/_signup.rhtml b/app/views/user/_signup.rhtml index 6b0a1f8c7..f183ac1f1 100644 --- a/app/views/user/_signup.rhtml +++ b/app/views/user/_signup.rhtml @@ -3,15 +3,15 @@ <% form_tag({:action => "signup"}, {:id => "signup_form"}) do %> <%= foi_error_messages_for :user_signup %> - <h2><%= _('If you\'re new to {{site_name}}', :site_name=>site_name)%></h2> + <!--<h2><%= _('If you\'re new to {{site_name}}', :site_name=>site_name)%></h2>--> <p> <label class="form_label" for="user_signup_email"><%= _('Your e-mail:')%></label> <%= text_field 'user_signup', 'email', { :size => 20 } %> </p> <div class="form_item_note"> - <%= ('We will not reveal your email address to anybody unless you or - the law tell us to (<a href="%s">_details</a>). ') %[help_privacy_path] %> + <%= _('We will not reveal your email address to anybody unless you or + the law tell us to (<a href="%s">details</a>). ') %[help_privacy_path] %> </div> <p> @@ -36,6 +36,10 @@ <%= password_field 'user_signup', 'password_confirmation', { :size => 15 } %> </p> + <% if @request_from_foreign_country %> + <%= recaptcha_tags %> + <% end %> + <div class="form_button"> <%= hidden_field_tag 'token', params[:token], { :id => 'signup_token' } %> <%= submit_tag _('Sign up') %> diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml index 8fd6c52ad..17fc0c46d 100644 --- a/app/views/user/show.rhtml +++ b/app/views/user/show.rhtml @@ -24,20 +24,20 @@ </div> <% end %> - -<div id="request_sidebar"> - <h2><%= _('Track this person')%></h2> - <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %> - - <h2><%= _('On this page')%></h2> - <a href="#foi_requests"><%= _('FOI requests')%></a> - <br><a href="#annotations"><%= _('Annotations')%></a> - <% if @is_you %> - <br><a href="#email_subscriptions"><%= _('Email subscriptions')%></a> - <% end %> -</div> - -<div class="single_user"> +<div> + <div id="header_right"> + <h2><%= _('Track this person')%></h2> + <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %> + + <h2><%= _('On this page')%></h2> + <a href="#foi_requests"><%= _('FOI requests')%></a> + <br><a href="#annotations"><%= _('Annotations')%></a> + <% if @is_you %> + <br><a href="#email_subscriptions"><%= _('Email subscriptions')%></a> + <% end %> + </div> + + <div class="header_left"> <p id="user_photo_on_profile"> <% if @display_user.profile_photo %> <% if @is_you %> @@ -113,15 +113,18 @@ <%= _('<a href="%s">Sign in</a> to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name)) % [signin_url(:r => request.request_uri)]%> </p> <% end %> + </div> +</div> +<div style="clear:both"></div> <% if !@xapian_requests.nil? %> <% if @xapian_requests.results.empty? %> <% if @page == 1 %> - <h2 id="foi_requests"><%= @is_you ? 'Freedom of Information requests made by you' : 'Freedom of Information requests made by this person' %> </h2> + <h2 class="foi_results" id="foi_requests"><%= @is_you ? 'Freedom of Information requests made by you' : 'Freedom of Information requests made by this person' %> </h2> <p><%= @is_you ? _('You have made no Freedom of Information requests using this site.') : _('This person has made no Freedom of Information requests using this site.') %> <% end %> <% else %> - <h2 id="foi_requests"> + <h2 class="foi_results" id="foi_requests"> <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @display_user.info_requests.size) % @display_user.info_requests.size : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests', @display_user.info_requests.size) % @display_user.info_requests.size %> <!-- matches_estimated <%=@xapian_requests.matches_estimated%> --> <%= @page_desc %> @@ -134,7 +137,7 @@ <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @display_user.info_requests.size) %> <% end %> <% else %> - <h2 id="foi_requests"><%= @is_you ? _('Freedom of Information requests made by you') : _('Freedom of Information requests made by this person') %> </h2> + <h2 class="foi_results" id="foi_requests"><%= @is_you ? _('Freedom of Information requests made by you') : _('Freedom of Information requests made by this person') %> </h2> <p><%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests this person has made.')%></p> <% end %> diff --git a/app/views/user/sign.rhtml b/app/views/user/sign.rhtml index b76edbc64..1140d961a 100644 --- a/app/views/user/sign.rhtml +++ b/app/views/user/sign.rhtml @@ -21,17 +21,26 @@ <div id="sign_together"> - <p id="sign_in_reason"> + <!--<p id="sign_in_reason"> <% if @post_redirect.reason_params[:web].empty? %> <%= _(' Please sign in or make a new account.') %> <% else %> <%= @post_redirect.reason_params[:web] %>, <%= _('please sign in or make a new account.') %> <% end %> - </p> - - <%= render :partial => 'signin', :locals => { :sign_in_as_existing_user => false } %> - <%= render :partial => 'signup' %> - + </p>--> + + <div id="left_half"> + <h1>Sign in</h1> + <%= render :partial => 'signin', :locals => { :sign_in_as_existing_user => false } %> + </div> + <div id="middle_strip"> + - or - + </div> + <div id="right_half"> + <h1>Sign up</h2> + <%= render :partial => 'signup' %> + </div> + <div style="clear:both"></div> </div> <% end %> |