Applies to:
+ <% if !info_request.nil? %>
+ <%=request_both_links(info_request)%> request
+ <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %>
+ <% end %>
+ <% if !user.nil? %>
+ <%=user_both_links(user)%> user
+ <%= hidden_field 'censor_rule', 'user_id', { :value => user.id } %>
+ <% end %>
+
+
+
(Leave unchecked if you are not sure about this)
+<%= check_box 'censor_rule', 'regexp' %>
+
+
(that you want to remove, case sensitive)
+<%= text_field 'censor_rule', 'text', :size => 60 %>
+
+
(put it in [square brackets], e.g. [personal information removed]. applies to text in emails and HTML conversions of binaries; binaries themselves must stay the same length and the replacement is just a bunch of 'x's)
+<%= text_field 'censor_rule', 'replacement', :size => 60 %>
+
+
(put purpose of the rule, and why the change)
+<%= text_area 'censor_rule', 'last_edit_comment', :rows => 2, :cols => 60 %>
+
+
Warning and notes: This does replace text in binary files, but for
+most formats only in a naive way. It works well on surprisingly many Word documents. Notably
+it doesn't even do UCS-2 (unicode sometimes used in Word). There is also special code
+which works on some PDFs. Please carefully check all attachments have
+changed in the way you expect, and haven't become corrupted.
+
+
+
You may need to manually rebuild the search index afterwards. You can redact
+things by individual request or by user by adding the censor rule from the
+appropriate page. If you need to redact across a whole
+authority, it will be easy enough to make code changes to add it, so do ask.
+
+
Regexp rules that are hard to process will really slow down request display. Please only use regexps if you really need to.
+
Applies to:
- <% if !info_request.nil? %>
- <%=request_both_links(info_request)%> request
- <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %>
- <% end %>
- <% if !user.nil? %>
- <%=user_both_links(user)%> user
- <%= hidden_field 'censor_rule', 'user_id', { :value => user.id } %>
- <% end %>
-
-
-
(Leave unchecked if you are not sure about this)
-<%= check_box 'censor_rule', 'regexp' %>
-
-
(that you want to remove, case sensitive)
-<%= text_field 'censor_rule', 'text', :size => 60 %>
-
-
(put it in [square brackets], e.g. [personal information removed]. applies to text in emails and HTML conversions of binaries; binaries themselves must stay the same length and the replacement is just a bunch of 'x's)
-<%= text_field 'censor_rule', 'replacement', :size => 60 %>
-
-
(put purpose of the rule, and why the change)
-<%= text_area 'censor_rule', 'last_edit_comment', :rows => 2, :cols => 60 %>
-
-
Warning and notes: This does replace text in binary files, but for
-most formats only in a naive way. It works well on surprisingly many Word documents. Notably
-it doesn't even do UCS-2 (unicode sometimes used in Word). There is also special code
-which works on some PDFs. Please carefully check all attachments have
-changed in the way you expect, and haven't become corrupted.
-
-
-
You may need to manually rebuild the search index afterwards. You can redact
-things by individual request or by user by adding the censor rule from the
-appropriate page. If you need to redact across a whole
-authority, it will be easy enough to make code changes to add it, so do ask.
-
-
Regexp rules that are hard to process will really slow down request display. Please only use regexps if you really need to.
-
-
diff --git a/app/views/admin_censor_rule/_show.html.erb b/app/views/admin_censor_rule/_show.html.erb
new file mode 100644
index 000000000..363c3fb6f
--- /dev/null
+++ b/app/views/admin_censor_rule/_show.html.erb
@@ -0,0 +1,39 @@
+
+<% if censor_rules.size > 0 %>
+
+
+
Id
+ <% for column in CensorRule.content_columns %>
+
<%= column.human_name %>
+ <% end %>
+
Actions
+
+
+ <% for censor_rule in censor_rules %>
+
+
<%=h censor_rule.id %>
+ <% for column in CensorRule.content_columns.map { |c| c.name } %>
+
+
+<%
+ for locale in I18n.available_locales do
+ if locale==I18n.default_locale # The default locale is submitted as part of the bigger object...
+ prefix = 'public_body'
+ object = @public_body
+ else # ...but additional locales go "on the side"
+ prefix = "public_body[translated_versions][]"
+ object = @public_body.new_record? ?
+ PublicBody::Translation.new :
+ @public_body.find_translation_by_locale(locale.to_s) || PublicBody::Translation.new
+ end
+
+ fields_for prefix, object do |t|
+%>
+
(HTML, for users to consider when making FOI requests to the authority)
+ <%= t.text_area :notes, :rows => 3, :cols => 60, :id => form_tag_id(t.object_name, :notes, locale) %>
-
-<%
- for locale in I18n.available_locales do
- if locale==I18n.default_locale # The default locale is submitted as part of the bigger object...
- prefix = 'public_body'
- object = @public_body
- else # ...but additional locales go "on the side"
- prefix = "public_body[translated_versions][]"
- object = @public_body.new_record? ?
- PublicBody::Translation.new :
- @public_body.find_translation_by_locale(locale.to_s) || PublicBody::Translation.new
- end
-
- fields_for prefix, object do |t|
-%>
-
(HTML, for users to consider when making FOI requests to the authority)
- <%= t.text_area :notes, :rows => 3, :cols => 60, :id => form_tag_id(t.object_name, :notes, locale) %>
CSV file format: A first row with the list of fields,
+ starting with '#', is optional but highly recommended. The fields 'name'
+ and 'request_email' are required; additionally, translated values are supported by
+ adding the locale name to the field name, e.g. 'name.es', 'name.de'... Example:
+
Note: Choose dry run to test, without
+ actually altering the database. Choose upload to actually
+ make the changes. In either case, you will be shown any errors, or details
+ of the changes. When uploading, any changes since last import will be
+ overwritten - e.g. email addresses changed back.
+
+
+
Note: The import tag will also be added to the imported bodies
+ if no tags are provided in the CSV file or if the import mode is set to
+ "Add new tags to existing ones".
+
CSV file format: A first row with the list of fields,
- starting with '#', is optional but highly recommended. The fields 'name'
- and 'request_email' are required; additionally, translated values are supported by
- adding the locale name to the field name, e.g. 'name.es', 'name.de'... Example:
-
Note: Choose dry run to test, without
- actually altering the database. Choose upload to actually
- make the changes. In either case, you will be shown any errors, or details
- of the changes. When uploading, any changes since last import will be
- overwritten - e.g. email addresses changed back.
-
-
-
Note: The import tag will also be added to the imported bodies
- if no tags are provided in the CSV file or if the import mode is set to
- "Add new tags to existing ones".
-
+<%
+ columns = PublicBody.content_columns + [] # force dup
+ columns.delete_if {|c| ['last_edit_comment'].include?(c.name)}
+
+ for column in columns %>
+ <%= column.human_name %>:
+ <% if ['home_page', 'publication_scheme', 'disclosure_log'].include? column.name %>
+ <%= link_to(h(@public_body.send(column.name)), @public_body.send(column.name)) %>
+ <% elsif column.name == 'request_email' %>
+ <%= link_to(h(@public_body.send(column.name)), "mailto:#{@public_body.send(column.name)}") %>
+ <% if !@public_body.is_requestable? %>
+ (not requestable due to: <%=h @public_body.not_requestable_reason %><% if @public_body.is_followupable? %>; but followupable<% end %>)
+ <% end %>
+ <% else %>
+ <%=h @public_body.send(column.name) %>
+ <% end %>
+
+<% end %>
+Calculated home page:
+<% if !@public_body.calculated_home_page.nil? %>
+ <%= link_to(h(@public_body.calculated_home_page), @public_body.calculated_home_page) %>
+<% else %>
+ *unknown*
+<% end %>
+ Tags: <%= render :partial => 'tags', :locals => { :body => @public_body} %>
+
+
+
+
+ <%=
+ # url_name can be missing if the name hasn't been set for this locale
+ if !@public_body.url_name.nil?
+ link_to 'Public page', main_url(public_body_url(@public_body))
+ else
+ 'Public page not available'
+ end
+ %>
+ | <%= link_to 'Edit', '../edit/' + @public_body.id.to_s %>
+
+
+
History
+
+
+
Updated at
+<%
+ history_columns = PublicBody.content_columns + [] # force dup
+ history_columns.delete_if {|c| ['created_at', 'updated_at', 'first_letter', 'api_key'].include?(c.name)}
+ for column in history_columns %>
+
<%= column.human_name %>
+<% end %>
+
+<%# There may be an option to versions() to specify order, but I can't find it. TB 2009-03-09 %>
+<% for historic_public_body in @public_body.reverse_sorted_versions %>
+
+
<%=h historic_public_body.updated_at %>
+ <% for column in history_columns %>
+ <%
+ value = h(historic_public_body.send(column.name))
+ if column.name == 'last_edit_comment'
+ value = historic_public_body.last_edit_comment_for_html_display
+ end
+ # Highlight entries which have changed since previous version
+ changed = (!['version', 'last_edit_editor', 'last_edit_comment'].include?(column.name)) && ((historic_public_body.send(column.name) != @public_body.sorted_versions[historic_public_body.version - 2].send(column.name)) || (historic_public_body.version == 1)) %>
+
-<%
- columns = PublicBody.content_columns + [] # force dup
- columns.delete_if {|c| ['last_edit_comment'].include?(c.name)}
-
- for column in columns %>
- <%= column.human_name %>:
- <% if ['home_page', 'publication_scheme', 'disclosure_log'].include? column.name %>
- <%= link_to(h(@public_body.send(column.name)), @public_body.send(column.name)) %>
- <% elsif column.name == 'request_email' %>
- <%= link_to(h(@public_body.send(column.name)), "mailto:#{@public_body.send(column.name)}") %>
- <% if !@public_body.is_requestable? %>
- (not requestable due to: <%=h @public_body.not_requestable_reason %><% if @public_body.is_followupable? %>; but followupable<% end %>)
- <% end %>
- <% else %>
- <%=h @public_body.send(column.name) %>
- <% end %>
-
-<% end %>
-Calculated home page:
-<% if !@public_body.calculated_home_page.nil? %>
- <%= link_to(h(@public_body.calculated_home_page), @public_body.calculated_home_page) %>
-<% else %>
- *unknown*
-<% end %>
- Tags: <%= render :partial => 'tags', :locals => { :body => @public_body} %>
-
-
-
-
- <%=
- # url_name can be missing if the name hasn't been set for this locale
- if !@public_body.url_name.nil?
- link_to 'Public page', main_url(public_body_url(@public_body))
- else
- 'Public page not available'
- end
- %>
- | <%= link_to 'Edit', '../edit/' + @public_body.id.to_s %>
-
-
-
History
-
-
-
Updated at
-<%
- history_columns = PublicBody.content_columns + [] # force dup
- history_columns.delete_if {|c| ['created_at', 'updated_at', 'first_letter', 'api_key'].include?(c.name)}
- for column in history_columns %>
-
<%= column.human_name %>
-<% end %>
-
-<%# There may be an option to versions() to specify order, but I can't find it. TB 2009-03-09 %>
-<% for historic_public_body in @public_body.reverse_sorted_versions %>
-
-
<%=h historic_public_body.updated_at %>
- <% for column in history_columns %>
- <%
- value = h(historic_public_body.send(column.name))
- if column.name == 'last_edit_comment'
- value = historic_public_body.last_edit_comment_for_html_display
- end
- # Highlight entries which have changed since previous version
- changed = (!['version', 'last_edit_editor', 'last_edit_comment'].include?(column.name)) && ((historic_public_body.send(column.name) != @public_body.sorted_versions[historic_public_body.version - 2].send(column.name)) || (historic_public_body.version == 1)) %>
-
(warning: editing this will break URLs right now)
+ <%= text_field 'info_request', 'title', :size => 50 %>
+
+
+ <%= select( 'info_request', "prominence", [ "normal", "backpage", "requester_only", "hidden" ]) %>
+ (backpage means hidden from lists/search; hidden means completely hidden; super users can see anything)
+
+
+
+
+ <%= select( 'info_request', "allow_new_responses_from", [ "anybody", "authority_only", "nobody" ] ) %>;
+
+ <%= select( 'info_request', "handle_rejected_responses", [ "bounce", "holding_pen", "blackhole" ] ) %>
+
+ ('authority_only' means email From: domain of authority request email or any domain that has previously sent a response; 'nobody' also stops requester making followups; take care when using 'blackhole' which just drops mail)
+
+
+
+ <%= select( 'info_request', "described_state", InfoRequest.enumerate_states ) %>;
+
+ <%= select('info_request', "awaiting_description", [["Yes - needs state updating",true],["No - state is up to date",false]]) %>
+ (don't forget to change 'awaiting description' when you set described state)
+
+ This is permanent and irreversible! <%= submit_tag 'Destroy request entirely' %>
+ Use it mainly if someone posts private information, e.g. made a Data Protection request. It
+ destroys all responses and tracks as well.
+
(warning: editing this will break URLs right now)
- <%= text_field 'info_request', 'title', :size => 50 %>
-
-
- <%= select( 'info_request', "prominence", [ "normal", "backpage", "requester_only", "hidden" ]) %>
- (backpage means hidden from lists/search; hidden means completely hidden; super users can see anything)
-
-
-
-
- <%= select( 'info_request', "allow_new_responses_from", [ "anybody", "authority_only", "nobody" ] ) %>;
-
- <%= select( 'info_request', "handle_rejected_responses", [ "bounce", "holding_pen", "blackhole" ] ) %>
-
- ('authority_only' means email From: domain of authority request email or any domain that has previously sent a response; 'nobody' also stops requester making followups; take care when using 'blackhole' which just drops mail)
-
-
-
- <%= select( 'info_request', "described_state", InfoRequest.enumerate_states ) %>;
-
- <%= select('info_request', "awaiting_description", [["Yes - needs state updating",true],["No - state is up to date",false]]) %>
- (don't forget to change 'awaiting description' when you set described state)
-
- This is permanent and irreversible! <%= submit_tag 'Destroy request entirely' %>
- Use it mainly if someone posts private information, e.g. made a Data Protection request. It
- destroys all responses and tracks as well.
-
-
-<% end %>
-
-
diff --git a/app/views/admin_request/edit_comment.html.erb b/app/views/admin_request/edit_comment.html.erb
new file mode 100644
index 000000000..2152ee72f
--- /dev/null
+++ b/app/views/admin_request/edit_comment.html.erb
@@ -0,0 +1,22 @@
+
Note: This is mainly to be used to excise information
+ that users inadvertently put in their messages, not realising it would be
+ public. It will already have been sent to the public authority, and their
+ reply may also include that information and be automatically published on
+ this site. You could also use this to edit a message before resending it, but
+ only the edited version will be shown on the public page if you do that.
Note: This is mainly to be used to excise information
- that users inadvertently put in their messages, not realising it would be
- public. It will already have been sent to the public authority, and their
- reply may also include that information and be automatically published on
- this site. You could also use this to edit a message before resending it, but
- only the edited version will be shown on the public page if you do that.
- <%= hidden_field_tag 'outgoing_message_id', @outgoing_message.id %>
- Warning, this is permanent! --->
- <%= submit_tag "Destroy outgoing message" %>
-
-<% end %>
-
-
diff --git a/app/views/admin_request/hidden_user_explanation.html.erb b/app/views/admin_request/hidden_user_explanation.html.erb
new file mode 100644
index 000000000..64387ffee
--- /dev/null
+++ b/app/views/admin_request/hidden_user_explanation.html.erb
@@ -0,0 +1,9 @@
+Dear <%= name_to %>,
+
+Your request '<%= info_request.title %>' at <%= info_request_url %> has been reviewed by moderators.
+
+We consider it <% if reason == 'not_foi' %>is not a valid FOI request<% else %>to be vexatious<% end%>, and have therefore hidden it from other users. You will still be able to view it while logged in to the site. Please reply to this email if you would like to discuss this decision further.
+
+Yours,
+
+The <%= site_name %> team.
diff --git a/app/views/admin_request/hidden_user_explanation.rhtml b/app/views/admin_request/hidden_user_explanation.rhtml
deleted file mode 100644
index 64387ffee..000000000
--- a/app/views/admin_request/hidden_user_explanation.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-Dear <%= name_to %>,
-
-Your request '<%= info_request.title %>' at <%= info_request_url %> has been reviewed by moderators.
-
-We consider it <% if reason == 'not_foi' %>is not a valid FOI request<% else %>to be vexatious<% end%>, and have therefore hidden it from other users. You will still be able to view it while logged in to the site. Please reply to this email if you would like to discuss this decision further.
-
-Yours,
-
-The <%= site_name %> team.
diff --git a/app/views/admin_request/list.html.erb b/app/views/admin_request/list.html.erb
new file mode 100644
index 000000000..ae95cb5ad
--- /dev/null
+++ b/app/views/admin_request/list.html.erb
@@ -0,0 +1,15 @@
+<% @title = 'Listing FOI/EIR requests' %>
+
+
+ FOI request: <%= request_both_links(@raw_email.incoming_message.info_request) %>
+ <% if @holding_pen %>
+ This is in the holding pen because: <%= @rejected_reason %>
+ <% if @public_bodies.size > 0 %>
+ Guessed authority:
+ <% for public_body in @public_bodies %>
+ <%=public_body_both_links(public_body)%>
+ <% end %>
+ (based on From: email domain)
+ <% end %>
+ <% if @info_requests.size > 0 %>
+ Guessed request:
+ <% for info_request in @info_requests %>
+ <%=request_both_links(info_request)%>
+ <% end %>
+ (based on id, not hash, in To/Cc email)
+ <% end %>
+ <% end %>
+
- FOI request: <%= request_both_links(@raw_email.incoming_message.info_request) %>
- <% if @holding_pen %>
- This is in the holding pen because: <%= @rejected_reason %>
- <% if @public_bodies.size > 0 %>
- Guessed authority:
- <% for public_body in @public_bodies %>
- <%=public_body_both_links(public_body)%>
- <% end %>
- (based on From: email domain)
- <% end %>
- <% if @info_requests.size > 0 %>
- Guessed request:
- <% for info_request in @info_requests %>
- <%=request_both_links(info_request)%>
- <% end %>
- (based on id, not hash, in To/Cc email)
- <% end %>
- <% end %>
-
(will change URL name and break URLs; unlike authorities, there is no history; you will need to rebuild the search index afterwards)
+<%= text_field 'admin_user', 'name', :size => 60 %>
+
+
(you must first validate this)
+<%= text_field 'admin_user', 'email', :size => 60 %>
+
+
(none or super; this is for admin features and links which are in the site proper)
+<%= text_field 'admin_user', 'admin_level', :size => 60 %>
+
+
(if not blank will stop the
+ user from filing new requests, making annotations or messaging other users;
+ the text is shown in public on the user's page and when they try to do a
+ forbidden action; write in the second person (you); see
+ <%= link_to 'banned users', '../banned' %> for examples)
+
+<%= text_area 'admin_user', 'ban_text', :cols => 60, :rows => 3 %>
+
+
(user's own text on their profile, format like comments):
+<%= text_area 'admin_user', 'about_me', :cols => 60, :rows => 3 %>
+
+
<%= check_box 'admin_user', 'no_limit' %>
+ (disable the limit on daily requests)
(will change URL name and break URLs; unlike authorities, there is no history; you will need to rebuild the search index afterwards)
-<%= text_field 'admin_user', 'name', :size => 60 %>
-
-
(you must first validate this)
-<%= text_field 'admin_user', 'email', :size => 60 %>
-
-
(none or super; this is for admin features and links which are in the site proper)
-<%= text_field 'admin_user', 'admin_level', :size => 60 %>
-
-
(if not blank will stop the
- user from filing new requests, making annotations or messaging other users;
- the text is shown in public on the user's page and when they try to do a
- forbidden action; write in the second person (you); see
- <%= link_to 'banned users', '../banned' %> for examples)
-
-<%= text_area 'admin_user', 'ban_text', :cols => 60, :rows => 3 %>
-
-
(user's own text on their profile, format like comments):
-<%= text_area 'admin_user', 'about_me', :cols => 60, :rows => 3 %>
-
-
<%= check_box 'admin_user', 'no_limit' %>
- (disable the limit on daily requests)
-
diff --git a/app/views/admin_user/_user_table.html.erb b/app/views/admin_user/_user_table.html.erb
new file mode 100644
index 000000000..d35c78594
--- /dev/null
+++ b/app/views/admin_user/_user_table.html.erb
@@ -0,0 +1,22 @@
+
-<% end %>
-
diff --git a/app/views/comment/_single_comment.html.erb b/app/views/comment/_single_comment.html.erb
new file mode 100644
index 000000000..b645721cf
--- /dev/null
+++ b/app/views/comment/_single_comment.html.erb
@@ -0,0 +1,28 @@
+
+ <% if comment.user && comment.user.profile_photo %>
+
+
+
+ <% end %>
+
+
+ <%# When not logged in, but mid-comment-leaving, there'll be no comment.user %>
+ <%= comment.user ? user_link(comment.user) : _("You") %> <%= _("left an annotation") %> (<%= simple_date(comment.created_at || Time.now) %>)
+
+
+
+
+ <%= comment.get_body_for_html_display %>
+
+
+
+ <% if !comment.id.nil? %>
+ <%= link_to "Link to this", comment_url(comment), :class => "link_to_this" %>
+ <% if !@user.nil? && @user.admin_page_links? %>
+ | <%= link_to "Admin", admin_url("request/edit_comment/" + comment.id.to_s) %>
+ <% end %>
+
+ <% end %>
+
- <% if comment.user && comment.user.profile_photo %>
-
-
-
- <% end %>
-
-
- <%# When not logged in, but mid-comment-leaving, there'll be no comment.user %>
- <%= comment.user ? user_link(comment.user) : _("You") %> <%= _("left an annotation") %> (<%= simple_date(comment.created_at || Time.now) %>)
-
-
-
-
- <%= comment.get_body_for_html_display %>
-
-
-
- <% if !comment.id.nil? %>
- <%= link_to "Link to this", comment_url(comment), :class => "link_to_this" %>
- <% if !@user.nil? && @user.admin_page_links? %>
- | <%= link_to "Admin", admin_url("request/edit_comment/" + comment.id.to_s) %>
- <% end %>
-
- <% end %>
-
-
-
diff --git a/app/views/comment/new.html.erb b/app/views/comment/new.html.erb
new file mode 100644
index 000000000..aa5b6051c
--- /dev/null
+++ b/app/views/comment/new.html.erb
@@ -0,0 +1,77 @@
+<% @title = "Make an annotation on '" + h(@info_request.title) + "'" %>
+
+<% if @existing_comment %>
+
+
+ <%= user_or_you_capital(@existing_comment.user) %> already
+ made this annotation on <%=simple_date(@existing_comment.created_at)%>.
+
+
+<% end %>
+
+<%= foi_error_messages_for :comment %>
+
+
<%= _('Add an annotation')%>
+
to “<%=request_link(@info_request)%>”
+
+
+<%= _('Annotations are so anyone, including you, can help the requester with their request. For example:')%>
+
+
+
+
+<% if [ 'waiting_clarification' ].include?(@info_request.described_state) %>
+
<%= _(' Advise on how to best clarify the request.')%>
+<% end %>
+
+<% if not [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %>
+
<%= _(' Link to the information requested, if it is already available on the Internet. ')%>
+
<%= _(' Suggest where else the requester might find the information. ')%>
+
<%= _(' Offer better ways of wording the request to get the information. ')%>
+<% end %>
+
+<% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %>
+
<%= _(' Summarise the content of any information returned. ')%>
+
<%= _(' Say how you\'ve used the information, with links if possible.')%>
+
<%= _('Thank the public authority or ')%><%=h (@info_request.user_name ? @info_request.user_name : _('the requester')) %>.
+<% end %>
+<% if [ 'partially_successful' ].include?(@info_request.described_state) %>
+
<%= _('Suggest how the requester can find the rest of the information.')%>
+<% end %>
+<% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %>
+
<%= _('Point to related information, campaigns or forums which may be useful.')%>
+<% end %>
+
+<% if [ 'gone_postal' ].include?(@info_request.described_state) %>
+
<%= _('A summary of the response if you have received it by post. ')%>
+<% end %>
+
+<% if [ 'not_held' ].include?(@info_request.described_state) %>
+
<%= _(' Ideas on what other documents to request which the authority may hold. ')%>
+<% end %>
+<% if [ 'rejected' ].include?(@info_request.described_state) %>
+
<%= _('Advise on whether the refusal is legal, and how to complain about it if not.') %>
+<% end %>
+
+<% if [ 'internal_review' ].include?(@info_request.described_state) %>
+
<%= _('Advice on how to get a response that will satisfy the requester.
') %>
+<% end %>
+<% if [ 'error_message' ].include?(@info_request.described_state) %>
+
<%= _('You know what caused the error, and can suggest a solution, such as a working email address.')%>
+<% end %>
+<% if [ 'requires_admin' ].include?(@info_request.described_state) %>
+
<%= _('Your thoughts on what the {{site_name}} administrators should do about the request.', :site_name=>site_name) %>
+<% end %>
+
+
+
+
+
+ <%= _('Annotations will be posted publicly here, and are
+ not sent to {{public_body_name}}.',:public_body_name=>h(@info_request.public_body.name)) %>
+ <% if @info_request.is_external? %>
+ <%= _('Note that the requester will not be notified about your annotation, because the request was published by {{public_body_name}} on their behalf.', :public_body_name => @info_request.public_body.name) %>
+ <% end %>
+
- <%= user_or_you_capital(@existing_comment.user) %> already
- made this annotation on <%=simple_date(@existing_comment.created_at)%>.
-
-
-<% end %>
-
-<%= foi_error_messages_for :comment %>
-
-
<%= _('Add an annotation')%>
-
to “<%=request_link(@info_request)%>”
-
-
-<%= _('Annotations are so anyone, including you, can help the requester with their request. For example:')%>
-
-
-
-
-<% if [ 'waiting_clarification' ].include?(@info_request.described_state) %>
-
<%= _(' Advise on how to best clarify the request.')%>
-<% end %>
-
-<% if not [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %>
-
<%= _(' Link to the information requested, if it is already available on the Internet. ')%>
-
<%= _(' Suggest where else the requester might find the information. ')%>
-
<%= _(' Offer better ways of wording the request to get the information. ')%>
-<% end %>
-
-<% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %>
-
<%= _(' Summarise the content of any information returned. ')%>
-
<%= _(' Say how you\'ve used the information, with links if possible.')%>
-
<%= _('Thank the public authority or ')%><%=h (@info_request.user_name ? @info_request.user_name : _('the requester')) %>.
-<% end %>
-<% if [ 'partially_successful' ].include?(@info_request.described_state) %>
-
<%= _('Suggest how the requester can find the rest of the information.')%>
-<% end %>
-<% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %>
-
<%= _('Point to related information, campaigns or forums which may be useful.')%>
-<% end %>
-
-<% if [ 'gone_postal' ].include?(@info_request.described_state) %>
-
<%= _('A summary of the response if you have received it by post. ')%>
-<% end %>
-
-<% if [ 'not_held' ].include?(@info_request.described_state) %>
-
<%= _(' Ideas on what other documents to request which the authority may hold. ')%>
-<% end %>
-<% if [ 'rejected' ].include?(@info_request.described_state) %>
-
<%= _('Advise on whether the refusal is legal, and how to complain about it if not.') %>
-<% end %>
-
-<% if [ 'internal_review' ].include?(@info_request.described_state) %>
-
<%= _('Advice on how to get a response that will satisfy the requester.
') %>
-<% end %>
-<% if [ 'error_message' ].include?(@info_request.described_state) %>
-
<%= _('You know what caused the error, and can suggest a solution, such as a working email address.')%>
-<% end %>
-<% if [ 'requires_admin' ].include?(@info_request.described_state) %>
-
<%= _('Your thoughts on what the {{site_name}} administrators should do about the request.', :site_name=>site_name) %>
-<% end %>
-
-
-
-
-
- <%= _('Annotations will be posted publicly here, and are
- not sent to {{public_body_name}}.',:public_body_name=>h(@info_request.public_body.name)) %>
- <% if @info_request.is_external? %>
- <%= _('Note that the requester will not be notified about your annotation, because the request was published by {{public_body_name}} on their behalf.', :public_body_name => @info_request.public_body.name) %>
- <% end %>
-
-
-<% end %>
-
-
diff --git a/app/views/contact_mailer/from_admin_message.html.erb b/app/views/contact_mailer/from_admin_message.html.erb
new file mode 100644
index 000000000..bdb48d580
--- /dev/null
+++ b/app/views/contact_mailer/from_admin_message.html.erb
@@ -0,0 +1,2 @@
+<%= @message.strip %>
+
diff --git a/app/views/contact_mailer/from_admin_message.rhtml b/app/views/contact_mailer/from_admin_message.rhtml
deleted file mode 100644
index bdb48d580..000000000
--- a/app/views/contact_mailer/from_admin_message.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= @message.strip %>
-
diff --git a/app/views/contact_mailer/to_admin_message.html.erb b/app/views/contact_mailer/to_admin_message.html.erb
new file mode 100644
index 000000000..9c0a74c02
--- /dev/null
+++ b/app/views/contact_mailer/to_admin_message.html.erb
@@ -0,0 +1,11 @@
+<%= @message.strip %>
+
+---------------------------------------------------------------------
+<%= _('Message sent using {{site_name}} contact form, ', :site_name=>site_name)%>
+<%=(@logged_in_user ? ("logged in as user " + main_url(user_url(@logged_in_user))) : "not logged in")%><% if !@last_request.nil? %>
+
+<%= _('Last request viewed: ')%><%= main_url(request_url(@last_request)) %>
+<% end %> <% if !@last_body.nil? %>
+
+<%= _('Last authority viewed: ')%><%= main_url(public_body_url(@last_body)) %>
+<% end %>---------------------------------------------------------------------
diff --git a/app/views/contact_mailer/to_admin_message.rhtml b/app/views/contact_mailer/to_admin_message.rhtml
deleted file mode 100644
index 9c0a74c02..000000000
--- a/app/views/contact_mailer/to_admin_message.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= @message.strip %>
-
----------------------------------------------------------------------
-<%= _('Message sent using {{site_name}} contact form, ', :site_name=>site_name)%>
-<%=(@logged_in_user ? ("logged in as user " + main_url(user_url(@logged_in_user))) : "not logged in")%><% if !@last_request.nil? %>
-
-<%= _('Last request viewed: ')%><%= main_url(request_url(@last_request)) %>
-<% end %> <% if !@last_body.nil? %>
-
-<%= _('Last authority viewed: ')%><%= main_url(public_body_url(@last_body)) %>
-<% end %>---------------------------------------------------------------------
diff --git a/app/views/contact_mailer/user_message.html.erb b/app/views/contact_mailer/user_message.html.erb
new file mode 100644
index 000000000..b1d6e81ae
--- /dev/null
+++ b/app/views/contact_mailer/user_message.html.erb
@@ -0,0 +1,13 @@
+---------------------------------------------------------------------
+<%= _('{{user_name}} has used {{site_name}} to send you the message below.', :user_name=>@from_user.name, :site_name=>site_name) %>
+<%= _('Your details, including your email address, have not been given to anyone.') %>
+<%= _('If you reply to this message it will go directly to {{user_name}}, who will
+learn your email address. Only reply if that is okay.', :user_name => @from_user.name) %>
+---------------------------------------------------------------------
+
+<%= @message.strip %>
+
+---------------------------------------------------------------------
+<%= _('View Freedom of Information requests made by {{user_name}}:', :user_name=>@from_user.name)%>
+<%= @from_user_url %>
+---------------------------------------------------------------------
diff --git a/app/views/contact_mailer/user_message.rhtml b/app/views/contact_mailer/user_message.rhtml
deleted file mode 100644
index b1d6e81ae..000000000
--- a/app/views/contact_mailer/user_message.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
----------------------------------------------------------------------
-<%= _('{{user_name}} has used {{site_name}} to send you the message below.', :user_name=>@from_user.name, :site_name=>site_name) %>
-<%= _('Your details, including your email address, have not been given to anyone.') %>
-<%= _('If you reply to this message it will go directly to {{user_name}}, who will
-learn your email address. Only reply if that is okay.', :user_name => @from_user.name) %>
----------------------------------------------------------------------
-
-<%= @message.strip %>
-
----------------------------------------------------------------------
-<%= _('View Freedom of Information requests made by {{user_name}}:', :user_name=>@from_user.name)%>
-<%= @from_user_url %>
----------------------------------------------------------------------
diff --git a/app/views/general/_advanced_search_tips.html.erb b/app/views/general/_advanced_search_tips.html.erb
new file mode 100644
index 000000000..914abc1af
--- /dev/null
+++ b/app/views/general/_advanced_search_tips.html.erb
@@ -0,0 +1,49 @@
+
+
+
<%= _("Advanced search tips")%>
+
+
<%= _("Enter words that you want to find separated by spaces, e.g. climbing lane") %>
+
<%= _('Use OR (in capital letters) where you don\'t mind which word, e.g. commons OR lords') %>
+
<%= _('Use quotes when you want to find an exact phrase, e.g. "Liverpool City Council"') %>
+
<%= _('status: to select based on the status or historical status of the request, see the table of statuses below.', :statuses_url => "#statuses") %>
+
<%= _('variety: to select type of thing to search for, see the table of varieties below.', :varieties_url => "#varieties") %>
+
<%= _('requested_from:home_office to search requests from the Home Office, typing the name as in the URL.')%>
+
<%= _('requested_by:julian_todd to search requests made by Julian Todd, typing the name as in the URL.') %>
+
<%= _('commented_by:tony_bowden to search annotations made by Tony Bowden, typing the name as in the URL.')%>
+
<%= _('request: to restrict to a specific request, typing the title as in the URL.')%>
+
<%= _('filetype:pdf to find all responses with PDF attachments. Or try these: {{list_of_file_extensions}}', :list_of_file_extensions => IncomingMessage.get_all_file_extensions)%>
+
<%= _('Type 01/01/2008..14/01/2008 to only show things that happened in the first two weeks of January.')%>
+
<%= _('tag:charity to find all public authorities or requests with a given tag. You can include multiple tags,
+ and tag values, e.g. tag:openlylocal AND tag:financial_transaction:335633. Note that by default any of the tags
+ can be present, you have to put AND explicitly if you only want results them all present.')%>
+
<%= _('Read about advanced search operators, such as proximity and wildcards.', :advanced_search_url => "http://www.xapian.org/docs/queryparser.html") %>
+
+
+
<%= _('Table of statuses') %>
+
<%= _("All the options below can use status or latest_status before the colon. For example, status:not_held will match requests which have ever been marked as not held; latest_status:not_held will match only requests that are currently marked as not held.") %>
<%= _('The requester has abandoned this request for some reason') %>
+
+
+
<%= _('Table of varieties') %>
+
<%= _("All the options below can use variety or latest_variety before the colon. For example, variety:sent will match requests which have ever been sent; latest_variety:sent will match only requests that are currently marked as sent.") %>
<%= _("Enter words that you want to find separated by spaces, e.g. climbing lane") %>
-
<%= _('Use OR (in capital letters) where you don\'t mind which word, e.g. commons OR lords') %>
-
<%= _('Use quotes when you want to find an exact phrase, e.g. "Liverpool City Council"') %>
-
<%= _('status: to select based on the status or historical status of the request, see the table of statuses below.', :statuses_url => "#statuses") %>
-
<%= _('variety: to select type of thing to search for, see the table of varieties below.', :varieties_url => "#varieties") %>
-
<%= _('requested_from:home_office to search requests from the Home Office, typing the name as in the URL.')%>
-
<%= _('requested_by:julian_todd to search requests made by Julian Todd, typing the name as in the URL.') %>
-
<%= _('commented_by:tony_bowden to search annotations made by Tony Bowden, typing the name as in the URL.')%>
-
<%= _('request: to restrict to a specific request, typing the title as in the URL.')%>
-
<%= _('filetype:pdf to find all responses with PDF attachments. Or try these: {{list_of_file_extensions}}', :list_of_file_extensions => IncomingMessage.get_all_file_extensions)%>
-
<%= _('Type 01/01/2008..14/01/2008 to only show things that happened in the first two weeks of January.')%>
-
<%= _('tag:charity to find all public authorities or requests with a given tag. You can include multiple tags,
- and tag values, e.g. tag:openlylocal AND tag:financial_transaction:335633. Note that by default any of the tags
- can be present, you have to put AND explicitly if you only want results them all present.')%>
-
<%= _('Read about advanced search operators, such as proximity and wildcards.', :advanced_search_url => "http://www.xapian.org/docs/queryparser.html") %>
-
-
-
<%= _('Table of statuses') %>
-
<%= _("All the options below can use status or latest_status before the colon. For example, status:not_held will match requests which have ever been marked as not held; latest_status:not_held will match only requests that are currently marked as not held.") %>
<%= _('The requester has abandoned this request for some reason') %>
-
-
-
<%= _('Table of varieties') %>
-
<%= _("All the options below can use variety or latest_variety before the colon. For example, variety:sent will match requests which have ever been sent; latest_variety:sent will match only requests that are currently marked as sent.") %>
- <%= _("Make a new
- Freedom of
- Information
- request") %>
-
-<%= _("Start now »") %>
diff --git a/app/views/general/_frontpage_requests_list.html.erb b/app/views/general/_frontpage_requests_list.html.erb
new file mode 100644
index 000000000..3b0efb65e
--- /dev/null
+++ b/app/views/general/_frontpage_requests_list.html.erb
@@ -0,0 +1,35 @@
+
+
+ <% if @request_events_all_successful %>
+ <%= _("What information has been released?") %>
+ <% else %>
+ <%= _("What information has been requested?") %>
+ <% end %>
+
+ <%= _("{{site_name}} users have made {{number_of_requests}} requests, including:",
+ :site_name => site_name, :number_of_requests => InfoRequest.visible.count) %>
+
+ <% for event in @request_events %>
+
+ <% if @request_events_all_successful %>
+ <%= _("{{public_body_link}} answered a request about",
+ :public_body_link => public_body_link(event.info_request.public_body)) %>
+ <% else %>
+ <%= _("{{public_body_link}} was sent a request about",
+ :public_body_link => public_body_link(event.info_request.public_body)) %>
+ <% end %>
+
+ <%=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)) %>
+
- <% if @request_events_all_successful %>
- <%= _("What information has been released?") %>
- <% else %>
- <%= _("What information has been requested?") %>
- <% end %>
-
- <%= _("{{site_name}} users have made {{number_of_requests}} requests, including:",
- :site_name => site_name, :number_of_requests => InfoRequest.visible.count) %>
-
- <% for event in @request_events %>
-
- <% if @request_events_all_successful %>
- <%= _("{{public_body_link}} answered a request about",
- :public_body_link => public_body_link(event.info_request.public_body)) %>
- <% else %>
- <%= _("{{public_body_link}} was sent a request about",
- :public_body_link => public_body_link(event.info_request.public_body)) %>
- <% end %>
-
- <%=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)) %>
-
-
diff --git a/app/views/general/custom_css.html.erb b/app/views/general/custom_css.html.erb
new file mode 100644
index 000000000..0def82ed0
--- /dev/null
+++ b/app/views/general/custom_css.html.erb
@@ -0,0 +1 @@
+// this should be overridden in a local "theme" plugin
diff --git a/app/views/general/custom_css.rhtml b/app/views/general/custom_css.rhtml
deleted file mode 100644
index 0def82ed0..000000000
--- a/app/views/general/custom_css.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-// this should be overridden in a local "theme" plugin
diff --git a/app/views/general/exception_caught.html.erb b/app/views/general/exception_caught.html.erb
new file mode 100644
index 000000000..94b0d0db7
--- /dev/null
+++ b/app/views/general/exception_caught.html.erb
@@ -0,0 +1,24 @@
+
+ <% if @status == 404 %>
+
<%= _("Sorry, we couldn't find that page") %>
+
+
<%= _("The page doesn't exist. Things you can try now:")%>
+
+
+
<%= _("Check for mistakes if you typed or copied the address.")%>
+
<%= _("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 %>
+
+
+ <% else %>
+
<%= _("Sorry, there was a problem processing this page") %>
+
<%= _('You have found a bug. Please contact us to tell us about the problem', :contact_url => help_contact_path) %>
+
+ <% 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" %>
+
+ <%= 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 %>
+
-
- <% 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" %>
-
- <%= 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 %>
-
If your question isn't answered here, or you just wanted to let us know
- something about the site, contact us.
-
-
-
-
diff --git a/app/views/help/_why_they_should_reply_by_email.html.erb b/app/views/help/_why_they_should_reply_by_email.html.erb
new file mode 100644
index 000000000..faaa2b2e2
--- /dev/null
+++ b/app/views/help/_why_they_should_reply_by_email.html.erb
@@ -0,0 +1,3 @@
+The law, the Ministry of Justice and the Information Commissioner all say that an email is sufficient (more details).
+
+At the bottom of this page, write a reply to the authority explaining this to them.
diff --git a/app/views/help/_why_they_should_reply_by_email.rhtml b/app/views/help/_why_they_should_reply_by_email.rhtml
deleted file mode 100644
index faaa2b2e2..000000000
--- a/app/views/help/_why_they_should_reply_by_email.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-The law, the Ministry of Justice and the Information Commissioner all say that an email is sufficient (more details).
-
-At the bottom of this page, write a reply to the authority explaining this to them.
diff --git a/app/views/help/about.html.erb b/app/views/help/about.html.erb
new file mode 100644
index 000000000..477f0e750
--- /dev/null
+++ b/app/views/help/about.html.erb
@@ -0,0 +1,53 @@
+<% @title = "About" %>
+
+<%= render :partial => 'sidebar' %>
+
+
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.
+
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.
+
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.
+
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.
-
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.
-
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.
-
<%= _("Would you like to see a website like this in your country?") %>
+ <% else %>
+
Powered by Alaveteli
+ <% end %>
+
This website is powered by Alaveteli. Alaveteli is free software
+ for making Freedom of Information requests. It can easily be
+ translated into any language, and customised for variations of FOI
+ law.
+
+
The development of Alaveteli is sponsored and supported by a
+ number of foundations and charities who are interested in
+ transparency across the world.
+
+
If you would like to set up an Alaveteli website in your own
+ country, we can help. You will need a few days to get the site
+ configured and ready to use, and will then have to spend at least an
+ hour a week moderating and managing the site (more for busy
+ websites).
<%= _("Would you like to see a website like this in your country?") %>
- <% else %>
-
Powered by Alaveteli
- <% end %>
-
This website is powered by Alaveteli. Alaveteli is free software
- for making Freedom of Information requests. It can easily be
- translated into any language, and customised for variations of FOI
- law.
-
-
The development of Alaveteli is sponsored and supported by a
- number of foundations and charities who are interested in
- transparency across the world.
-
-
If you would like to set up an Alaveteli website in your own
- country, we can help. You will need a few days to get the site
- configured and ready to use, and will then have to spend at least an
- hour a week moderating and managing the site (more for busy
- websites).
This page explains how programmers can make other websites and software
+ interact with WhatDoTheyKnow via an "API".
+
+
+
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.
+
+
+
+
Linking to new requests
+
+
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.
+
+
+
title - default summary of the new request.
+
default_letter - default text of the body of the letter. The salutation (Dear...) and signoff (Yours...) are wrapped round this.
+
body - as an alternative to default_letter, this sets the default entire text of the request, so you can customise the salutation and signoff.
+
tags - space separated list of tags, so you can find and link up any requests made later, e.g. openlylocal spending_id:12345. The : indicates it is a machine tag. The values of machine tags may also include colons, useful for URIs.
+
+
+
+
RSS (actually, Atom) feeds
+
+
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:
+
+
Look for the RSS feed links.
+
Examine the <link rel="alternate" type="application/atom+xml"> tag in the head of the HTML.
+
Add /feed to the start of another URL.
+
+
+
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 advanced search
+ tips for details.
+
+
+
JSON structured data
+
+
Quite a few pages have JSON versions, which let you download information about
+ objects in a structured form. Find them by:
+
+
+
Adding .json to the end of the URL.
+
Look for the <link rel="alternate" type="application/json"> tag in the head of the HTML.
+
+
+
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.
+
+
+
+
Spreadsheet of all authorities
+
+
+ A spreadsheet file listing every body in WhatDoTheyKnow is available:
+ <%= link_to "all-authorities.csv", all_public_bodies_csv_url() %>
+
+
+
+
+
+
Please contact us 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.
This page explains how programmers can make other websites and software
- interact with WhatDoTheyKnow via an "API".
-
-
-
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.
-
-
-
-
Linking to new requests
-
-
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.
-
-
-
title - default summary of the new request.
-
default_letter - default text of the body of the letter. The salutation (Dear...) and signoff (Yours...) are wrapped round this.
-
body - as an alternative to default_letter, this sets the default entire text of the request, so you can customise the salutation and signoff.
-
tags - space separated list of tags, so you can find and link up any requests made later, e.g. openlylocal spending_id:12345. The : indicates it is a machine tag. The values of machine tags may also include colons, useful for URIs.
-
-
-
-
RSS (actually, Atom) feeds
-
-
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:
-
-
Look for the RSS feed links.
-
Examine the <link rel="alternate" type="application/atom+xml"> tag in the head of the HTML.
-
Add /feed to the start of another URL.
-
-
-
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 advanced search
- tips for details.
-
-
-
JSON structured data
-
-
Quite a few pages have JSON versions, which let you download information about
- objects in a structured form. Find them by:
-
-
-
Adding .json to the end of the URL.
-
Look for the <link rel="alternate" type="application/json"> tag in the head of the HTML.
-
-
-
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.
-
-
-
-
Spreadsheet of all authorities
-
-
- A spreadsheet file listing every body in WhatDoTheyKnow is available:
- <%= link_to "all-authorities.csv", all_public_bodies_csv_url() %>
-
-
-
-
-
-
Please contact us 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.
+ Heather Brooke
+ (vampy!) has
+ been pushing the idea of a UK FOI archive for years now.
+
+
+ Both Phil Rodgers and Francis Irving
+ entered it in a mySociety competition for ideas for public interest websites to build.
+
+
+ It won,
+ and then Chris Lightfoot (RIP :()
+ thought up the wheeze of intercepting email responses to requests and
+ automatically publishing them.
+
+
+ Tom Steinberg got the cash to pay for the site from
+ a dead chocolate mogul (thank you!) ...
+
+
+ ... 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.
+
+
+ Thanks particularly to Julian Todd (great blog!),
+ 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.
+
+
+ The amazing team of volunteers who run the site, answer your support
+ emails, maintain the database of public authorities and
+ so much more.
+ Thanks to John Cross, Ben Harris, Adam McGreggor, Alex Skene,
+ Richard Taylor.
+
+
+ Volunteers who have provided patches to the code - thanks Peter Collingbourne
+ and Tony Bowden.
+
+
+ Everyone who has helped look up FOI email addresses.
+
+
+ We couldn't do any of this without those
+ crazy people who volunteer,
+ amongst many other things, to do the accounts and fill in our VAT return.
+
+
+ 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.
+
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.
If you're
+ a programmer, get the source code for our parent project, Alaveteli
+ and tell us about patches we can pull. It's made in Ruby on Rails.
+
- Heather Brooke
- (vampy!) has
- been pushing the idea of a UK FOI archive for years now.
-
-
- Both Phil Rodgers and Francis Irving
- entered it in a mySociety competition for ideas for public interest websites to build.
-
-
- It won,
- and then Chris Lightfoot (RIP :()
- thought up the wheeze of intercepting email responses to requests and
- automatically publishing them.
-
-
- Tom Steinberg got the cash to pay for the site from
- a dead chocolate mogul (thank you!) ...
-
-
- ... 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.
-
-
- Thanks particularly to Julian Todd (great blog!),
- 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.
-
-
- The amazing team of volunteers who run the site, answer your support
- emails, maintain the database of public authorities and
- so much more.
- Thanks to John Cross, Ben Harris, Adam McGreggor, Alex Skene,
- Richard Taylor.
-
-
- Volunteers who have provided patches to the code - thanks Peter Collingbourne
- and Tony Bowden.
-
-
- Everyone who has helped look up FOI email addresses.
-
-
- We couldn't do any of this without those
- crazy people who volunteer,
- amongst many other things, to do the accounts and fill in our VAT return.
-
-
- 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.
-
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.
If you're
- a programmer, get the source code for our parent project, Alaveteli
- and tell us about patches we can pull. It's made in Ruby on Rails.
-
I just got here from bottom of an FOI request, what is going on? #
+
+
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.
+
+
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.
+
+
If you have privacy or other concerns, please read the answers below.
+ You might also like to read the introduction to WhatDoTheyKnow 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.
+
+
Finally, we welcome comments and
+ thoughts from FOI officers, please get in touch.
+
+
+
+
Why are you publishing responses to FOI requests? #
+
+
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.
+
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.
+
+
+
An email isn't a sufficient address for an FOI request! #
WhatDoTheyKnow is not making any requests. We are sending requests on
+ behalf of our users, who are real people making the requests.
+
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.
I can see a request on WhatDoTheyKnow, but we never got it by email!#
+
+
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. Contact us if there is a better address we can
+ use.
+
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 @whatdotheyknow.com.
+ If you ask us we will resend any request,
+ and/or give technical details of delivery so an IT department can chase
+ up what happened to the message.
+
+
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.
+
+
+
How do you calculate the deadline shown on request pages?#
+
+
+
The Freedom of Information Act says:
+
+
A public authority must comply with section 1(1) promptly and
+ in any event not later than the twentieth working day following the date of
+ receipt.
+
+
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 promptly.
+
+
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.
+
+
FOI officers often have to do a lot of hard work to answer
+ requests, and this is hidden from the public. We think it would help everyone
+ to have more of that complexity visible.
Please read the answer to the previous question first. Legally, authorities
+ must respond promptly 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.
+
+
+
That said, WhatDoTheyKnow does show the maximum legal deadline
+ for response on each request. Here's how we calculate it.
+
+
+
+
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
+ 20 working days.
+
+
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 disagree with this, our lawyer disagrees with them.
+
+
Requesters are encouraged to mark when they have clarified
+ 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.
+
+
+
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
+ public interest test time extensions.
+
+
+
Schools are also a special case, which WhatDoTheyKnow displays differently.
+
+
+
+
Since June 2009, schools have "20 working days
+ disregarding any working day which is not a school day, or 60 working days,
+ whichever is first" (FOI (Time for Compliance with Request) Regulations 2009). 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
+
+
+
+
If you're getting really nerdy about all this, read the detailed ICO guidance.
+ Meanwhile, remember that the law says authorities must respond
+ promptly. That's really what matters.
+
+
+
+
How do you reflect time extensions for public interest tests?#
+
+
+
+
The Freedom of Information Act lets authorities claim an indefinite time
+ extension when applying a public interest test. Information
+ Commissioner guidance says that it should only be used in "exceptionally
+ complex" cases
+ (FOI Good Practice Guidance No. 4).
+ 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.
+
+
+
The same guidance says that, even in exceptionally complex cases, no
+ Freedom of Information request should take more than 40 working days
+ to answer. WhatDoTheyKnow displays requests which are overdue by that much
+ with stronger wording to indicate they are definitely late.
+
+
+
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 voted
+ to remove provision for such a time limit during the initial passage
+ of the UK Act through Parliament).
+
+
+
+
How can I send a large file, which won't go by email?#
+
+
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. Contact us if it
+ is too big for even that (more than, say, 50Mb).
+
+
+
Why do you publish the names of civil servants and the text of emails? #
+
+
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 take down policy.
+
+
+
Do you publish email addresses or mobile phone numbers? #
+
+
To prevent spam, we automatically remove most emails and some mobile numbers from
+ responses to requests. Please contact us if we've
+ missed one.
+ For technical reasons we don't always remove them from attachments, such as certain PDFs.
+
If you need to know what an address was that we've removed, please get in touch with us. Occasionally, an email address
+ forms an important part of a response and we will post it up in an obscured
+ form in an annotation.
+
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 contact us 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.
+
I just got here from bottom of an FOI request, what is going on? #
-
-
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.
-
-
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.
-
-
If you have privacy or other concerns, please read the answers below.
- You might also like to read the introduction to WhatDoTheyKnow 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.
-
-
Finally, we welcome comments and
- thoughts from FOI officers, please get in touch.
-
-
-
-
Why are you publishing responses to FOI requests? #
-
-
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.
-
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.
-
-
-
An email isn't a sufficient address for an FOI request! #
WhatDoTheyKnow is not making any requests. We are sending requests on
- behalf of our users, who are real people making the requests.
-
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.
I can see a request on WhatDoTheyKnow, but we never got it by email!#
-
-
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. Contact us if there is a better address we can
- use.
-
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 @whatdotheyknow.com.
- If you ask us we will resend any request,
- and/or give technical details of delivery so an IT department can chase
- up what happened to the message.
-
-
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.
-
-
-
How do you calculate the deadline shown on request pages?#
-
-
-
The Freedom of Information Act says:
-
-
A public authority must comply with section 1(1) promptly and
- in any event not later than the twentieth working day following the date of
- receipt.
-
-
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 promptly.
-
-
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.
-
-
FOI officers often have to do a lot of hard work to answer
- requests, and this is hidden from the public. We think it would help everyone
- to have more of that complexity visible.
Please read the answer to the previous question first. Legally, authorities
- must respond promptly 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.
-
-
-
That said, WhatDoTheyKnow does show the maximum legal deadline
- for response on each request. Here's how we calculate it.
-
-
-
-
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
- 20 working days.
-
-
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 disagree with this, our lawyer disagrees with them.
-
-
Requesters are encouraged to mark when they have clarified
- 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.
-
-
-
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
- public interest test time extensions.
-
-
-
Schools are also a special case, which WhatDoTheyKnow displays differently.
-
-
-
-
Since June 2009, schools have "20 working days
- disregarding any working day which is not a school day, or 60 working days,
- whichever is first" (FOI (Time for Compliance with Request) Regulations 2009). 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
-
-
-
-
If you're getting really nerdy about all this, read the detailed ICO guidance.
- Meanwhile, remember that the law says authorities must respond
- promptly. That's really what matters.
-
-
-
-
How do you reflect time extensions for public interest tests?#
-
-
-
-
The Freedom of Information Act lets authorities claim an indefinite time
- extension when applying a public interest test. Information
- Commissioner guidance says that it should only be used in "exceptionally
- complex" cases
- (FOI Good Practice Guidance No. 4).
- 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.
-
-
-
The same guidance says that, even in exceptionally complex cases, no
- Freedom of Information request should take more than 40 working days
- to answer. WhatDoTheyKnow displays requests which are overdue by that much
- with stronger wording to indicate they are definitely late.
-
-
-
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 voted
- to remove provision for such a time limit during the initial passage
- of the UK Act through Parliament).
-
-
-
-
How can I send a large file, which won't go by email?#
-
-
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. Contact us if it
- is too big for even that (more than, say, 50Mb).
-
-
-
Why do you publish the names of civil servants and the text of emails? #
-
-
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 take down policy.
-
-
-
Do you publish email addresses or mobile phone numbers? #
-
-
To prevent spam, we automatically remove most emails and some mobile numbers from
- responses to requests. Please contact us if we've
- missed one.
- For technical reasons we don't always remove them from attachments, such as certain PDFs.
-
If you need to know what an address was that we've removed, please get in touch with us. Occasionally, an email address
- forms an important part of a response and we will post it up in an obscured
- form in an annotation.
-
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 contact us 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.
-
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.
+
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.
+
+
+
Will you send nasty, brutish spam to my email address? #
+
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.
+
+
+
Why will my name and my request appear publicly on the site? #
+
+
+
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 (more details).
+
+
+ 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.
+
+
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.
+
Technically, you must use your real name for your request to be a valid Freedom of Information request in law. See this
+ guidance from the Information Commissioner (January 2009).
+
+
+
However, the same guidance also says it is good practice for the public
+authority to still consider a request made using an obvious pseudonym.
+You should refer to this if a public authority refuses a request because you
+used a pseudonym.
+
+
Be careful though, even if the authority follows this good practice, the
+pseudonym will probably make it impossible for you to complain to the
+Information Commissioner later about the handling of your request.
+
+
+
There are several good alternatives to using a pseudonym.
+
+
+
Use a different form of your name. The guidance says
+that "Mr Arthur Thomas Roberts" can make a valid request as "Arthur Roberts",
+"A. T. Roberts", or "Mr Roberts", but not as "Arthur" or "A.T.R.".
+
+
Women may use their maiden name.
+
In most cases, you may use any name by which you are "widely known and/or
+is regularly used".
+
Use the name of an organisation, the name of a company, the trading name of
+a company, or the trading name of a sole trader.
+
Ask someone else to make the request on your behalf.
+
You may, if you are really stuck, ask us to make the request on
+your behalf. Please contact us with
+a good reason why you cannot make the request yourself and cannot
+ask a friend to. We don't have the resources to do this for everyone.
+
If a public authority asks you for your full, physical address, reply to them saying
+that section 8.1.b of the FOI Act asks for an "address for correspondence",
+and that the email address you are using is sufficient.
+
+
+The Ministry of Justice has guidance
+on this –
+"As well as hard copy written correspondence, requests that are
+transmitted electronically (for example, in emails) are acceptable
+... If a request is received by email and no postal address is given, the email
+address should be treated as the return address."
+
+
+
As if that isn't enough, the Information Commissioner's
+Hints for Practitioners say
+"Any correspondence could include a request for information. If it is written (this includes e-mail), legible, gives the name of the applicant, an address for reply (which could be electronic), and includes a description of the information required, then it will fall within the scope of the legislation."
+
+
+
+
No no, they need a postal address to send a paper response! #
+
+
+
If an authority only has a paper copy of the information that you want,
+they may ask you for a postal address. To start with, try persuading them
+to scan in the documents for you. You can even offer to gift them a scanner, which in that particular case
+embarrassed the authority into finding one they had already.
+
+
If that doesn't work, and you want to provide your postal address privately
+in order to receive the documents, mark your request as "They are going to reply by post", and it will
+give you an email address to use for that purpose.
<%= site_name %> is a permanent, public archive of Freedom of
+Information requests. Even though you may not find the response to
+a request useful any more, it may be of interest to others. For this
+reason, we will not delete requests.
+
+
+
Under exceptional circumstances we may remove or change your name
+on the website, see the next question.
+Similarly, we may also remove other personal information.
+
+
+
If you're worried about this before you make your request,
+see the section on pseudonyms.
+
+
+
+
Can you take down personal information about me? #
+
+
+
+
If you see any personal information about you on the site which you'd like
+us to remove or hide, then please let us know.
+Specify exactly what information you believe to be problematic and why, and
+where it appears on the site.
+
+
If it is sensitive personal information that has been accidentally
+posted, then we will usually remove it. Normally we will only consider
+requests to remove personal information which come from the individual
+concerned, but for sensitive information we would appreciate anyone
+pointing out anything they see.
+
+
We consider that there is a strong public interest in
+retaining the names of officers or servants of public authorities. We will only
+remove such names in exceptional circumstances, such as where the disclosure of
+a name and position of employment would substantially risk an individual's
+safety. If you are such an official and you wish to have your name removed for
+such an urgent reason, you must supply us with a request to do so from your
+line manager. This request must demonstrate that a risk has been perceived
+which outweighs the public interest, and must demonstrate that efforts have
+been made to conceal the name on the organisation's own website.
+
+
For all other requests we apply a public interest test to decide
+whether information should be removed.
+ Section 32
+of the Data Protection Act 1998 permits us to do this, as the material we
+publish is journalistic. We cannot easily edit many types of attachments (such
+as PDFs, or Microsoft Word or Excel files), so we will usually ask
+that authorities resend these with the personal information removed.
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.
-
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.
-
-
-
Will you send nasty, brutish spam to my email address? #
-
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.
-
-
-
Why will my name and my request appear publicly on the site? #
-
-
-
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 (more details).
-
-
- 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.
-
-
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.
-
Technically, you must use your real name for your request to be a valid Freedom of Information request in law. See this
- guidance from the Information Commissioner (January 2009).
-
-
-
However, the same guidance also says it is good practice for the public
-authority to still consider a request made using an obvious pseudonym.
-You should refer to this if a public authority refuses a request because you
-used a pseudonym.
-
-
Be careful though, even if the authority follows this good practice, the
-pseudonym will probably make it impossible for you to complain to the
-Information Commissioner later about the handling of your request.
-
-
-
There are several good alternatives to using a pseudonym.
-
-
-
Use a different form of your name. The guidance says
-that "Mr Arthur Thomas Roberts" can make a valid request as "Arthur Roberts",
-"A. T. Roberts", or "Mr Roberts", but not as "Arthur" or "A.T.R.".
-
-
Women may use their maiden name.
-
In most cases, you may use any name by which you are "widely known and/or
-is regularly used".
-
Use the name of an organisation, the name of a company, the trading name of
-a company, or the trading name of a sole trader.
-
Ask someone else to make the request on your behalf.
-
You may, if you are really stuck, ask us to make the request on
-your behalf. Please contact us with
-a good reason why you cannot make the request yourself and cannot
-ask a friend to. We don't have the resources to do this for everyone.
-
If a public authority asks you for your full, physical address, reply to them saying
-that section 8.1.b of the FOI Act asks for an "address for correspondence",
-and that the email address you are using is sufficient.
-
-
-The Ministry of Justice has guidance
-on this –
-"As well as hard copy written correspondence, requests that are
-transmitted electronically (for example, in emails) are acceptable
-... If a request is received by email and no postal address is given, the email
-address should be treated as the return address."
-
-
-
As if that isn't enough, the Information Commissioner's
-Hints for Practitioners say
-"Any correspondence could include a request for information. If it is written (this includes e-mail), legible, gives the name of the applicant, an address for reply (which could be electronic), and includes a description of the information required, then it will fall within the scope of the legislation."
-
-
-
-
No no, they need a postal address to send a paper response! #
-
-
-
If an authority only has a paper copy of the information that you want,
-they may ask you for a postal address. To start with, try persuading them
-to scan in the documents for you. You can even offer to gift them a scanner, which in that particular case
-embarrassed the authority into finding one they had already.
-
-
If that doesn't work, and you want to provide your postal address privately
-in order to receive the documents, mark your request as "They are going to reply by post", and it will
-give you an email address to use for that purpose.
<%= site_name %> is a permanent, public archive of Freedom of
-Information requests. Even though you may not find the response to
-a request useful any more, it may be of interest to others. For this
-reason, we will not delete requests.
-
-
-
Under exceptional circumstances we may remove or change your name
-on the website, see the next question.
-Similarly, we may also remove other personal information.
-
-
-
If you're worried about this before you make your request,
-see the section on pseudonyms.
-
-
-
-
Can you take down personal information about me? #
-
-
-
-
If you see any personal information about you on the site which you'd like
-us to remove or hide, then please let us know.
-Specify exactly what information you believe to be problematic and why, and
-where it appears on the site.
-
-
If it is sensitive personal information that has been accidentally
-posted, then we will usually remove it. Normally we will only consider
-requests to remove personal information which come from the individual
-concerned, but for sensitive information we would appreciate anyone
-pointing out anything they see.
-
-
We consider that there is a strong public interest in
-retaining the names of officers or servants of public authorities. We will only
-remove such names in exceptional circumstances, such as where the disclosure of
-a name and position of employment would substantially risk an individual's
-safety. If you are such an official and you wish to have your name removed for
-such an urgent reason, you must supply us with a request to do so from your
-line manager. This request must demonstrate that a risk has been perceived
-which outweighs the public interest, and must demonstrate that efforts have
-been made to conceal the name on the organisation's own website.
-
-
For all other requests we apply a public interest test to decide
-whether information should be removed.
- Section 32
-of the Data Protection Act 1998 permits us to do this, as the material we
-publish is journalistic. We cannot easily edit many types of attachments (such
-as PDFs, or Microsoft Word or Excel files), so we will usually ask
-that authorities resend these with the personal information removed.
I'm not sure which authority to make my request to, how can I find out? #
+
+
+
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:
+
+
Browse or search WhatDoTheyKnow looking for similar requests to yours.
+
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.
+
Contact the authority by phone or email to ask if they hold the kind of
+ information you're after.
+
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.
+
+
If you've got a thorny case, please contact us for help.
+
+
+
+
+
+
+
You're missing the public authority that I want to request from! #
+
+
+
Please contact us with the name of the public authority and,
+ if you can find it, their contact email address for Freedom of Information requests.
+
+
If you'd like to help add a whole category of public authority to the site, we'd love
+ to hear from you too.
+
+
+
+
+
Why do you include some authorities that aren't formally subject to FOI?#
+
+
+
WhatDoTheyKnow lets you make requests for information to a range of
+ organisations:
+
+
+
Those formally subject to the FOI Act
+
Those formally subject to the Environmental Regulations (a less well
+ defined group)
+
Those which voluntarily comply with the FOI Act
+
Those which aren't subject to the Act but we think should be, on grounds
+ such as them having significant public responsibilities.
+
+
+
+
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.
+
+ Please put in your request only what is needed so that someone can
+ easily identify what information you are asking for. Please do
+ not include any of the following:
+
+
+
+
arguments about your cause
+
statements that could defame or insult others
+
+
+
+ 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.
+
+
+
+ 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).
+
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. More
+ details from the Information Commissioner.
+
+
+
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.
+
By law, public authorities must respond promptly to
+ requests.
+
+
+
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
+ (full details).
+
+
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.
There are several things you can do if you never get a response.
+
+
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.
+
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 'Unhappy about the response you got?'.
+
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 our policy on copyright.
+
+
+
+
Can you tell me more of the nitty gritty about the process of making requests? #
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 Scottish
+ Information Commissioner's guidance for details.
No. Requests made using WhatDoTheyKnow are public, made under the Freedom of
+ Information Act, and cannot help you find information about a private
+ individual.
+
+
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 "How to access your information" (on the Information Commissioner's
+ website) explains how to do this.
+
+
If you see that somebody has included personal information, perhaps
+ unwittingly, in a request, please contact us
+ immediately so we can remove it.
+
+
+
+
I'd like to keep my request secret! (At least until I publish my story) #
+
+
WhatDoTheyKnow is currently only designed for public requests. All
+ responses that we receive are automatically published on the website for anyone
+ to read.
+
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 contact us.
+
+
+
+
Why can I only request information about the environment from some authorities? #
+
+
+
Some public authorities, such as South East Water,
+ don't come under the Freedom of Information Act, but do come under another law called
+ the Environmental Information Regulations (EIR).
+
+
+
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.
+
+
+
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.
+
+
+
+
Can I make the same to request to lots of authorities, e.g. all councils? #
+
+
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.
+
+
+
+
I made a request off the site, how do I upload it to the archive?#
+
+
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.
+
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.
+
+
Endless, political discussions are not allowed.
+ Post a link to a suitable forum or campaign site elsewhere.
I'm not sure which authority to make my request to, how can I find out? #
-
-
-
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:
-
-
Browse or search WhatDoTheyKnow looking for similar requests to yours.
-
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.
-
Contact the authority by phone or email to ask if they hold the kind of
- information you're after.
-
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.
-
-
If you've got a thorny case, please contact us for help.
-
-
-
-
-
-
-
You're missing the public authority that I want to request from! #
-
-
-
Please contact us with the name of the public authority and,
- if you can find it, their contact email address for Freedom of Information requests.
-
-
If you'd like to help add a whole category of public authority to the site, we'd love
- to hear from you too.
-
-
-
-
-
Why do you include some authorities that aren't formally subject to FOI?#
-
-
-
WhatDoTheyKnow lets you make requests for information to a range of
- organisations:
-
-
-
Those formally subject to the FOI Act
-
Those formally subject to the Environmental Regulations (a less well
- defined group)
-
Those which voluntarily comply with the FOI Act
-
Those which aren't subject to the Act but we think should be, on grounds
- such as them having significant public responsibilities.
-
-
-
-
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.
-
- Please put in your request only what is needed so that someone can
- easily identify what information you are asking for. Please do
- not include any of the following:
-
-
-
-
arguments about your cause
-
statements that could defame or insult others
-
-
-
- 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.
-
-
-
- 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).
-
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. More
- details from the Information Commissioner.
-
-
-
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.
-
By law, public authorities must respond promptly to
- requests.
-
-
-
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
- (full details).
-
-
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.
There are several things you can do if you never get a response.
-
-
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.
-
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 'Unhappy about the response you got?'.
-
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 our policy on copyright.
-
-
-
-
Can you tell me more of the nitty gritty about the process of making requests? #
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 Scottish
- Information Commissioner's guidance for details.
No. Requests made using WhatDoTheyKnow are public, made under the Freedom of
- Information Act, and cannot help you find information about a private
- individual.
-
-
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 "How to access your information" (on the Information Commissioner's
- website) explains how to do this.
-
-
If you see that somebody has included personal information, perhaps
- unwittingly, in a request, please contact us
- immediately so we can remove it.
-
-
-
-
I'd like to keep my request secret! (At least until I publish my story) #
-
-
WhatDoTheyKnow is currently only designed for public requests. All
- responses that we receive are automatically published on the website for anyone
- to read.
-
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 contact us.
-
-
-
-
Why can I only request information about the environment from some authorities? #
-
-
-
Some public authorities, such as South East Water,
- don't come under the Freedom of Information Act, but do come under another law called
- the Environmental Information Regulations (EIR).
-
-
-
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.
-
-
-
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.
-
-
-
-
Can I make the same to request to lots of authorities, e.g. all councils? #
-
-
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.
-
-
-
-
I made a request off the site, how do I upload it to the archive?#
-
-
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.
-
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.
-
-
Endless, political discussions are not allowed.
- Post a link to a suitable forum or campaign site elsewhere.
+<% if !@info_request.nil? %>
+ <%= link_to "Request an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup", :class => 'link_button_green' %> and then write a message asking the authority to review your request.
+<% else %>
+ At the bottom of the relevant request page on <%= site_name %> choose
+ "request an internal review". Then write a message asking for an internal
+ review of your request. You may want to include a link to the
+ request page, to make it clear which request you are talking about.
+<% end %>
+
+
+
Internal reviews should be quick. If one takes longer than 20 working days
+then the authority should write and let you know, and it should never take
+longer than 40 working days (see this
+good
+practice guide).
+You will then either get the information that
+you originally requested, or you will be told that the review upholds the
+original decision.
+
If you are still unhappy after the public authority has done their internal review,
+then you can complain to the Information Commissioner. To do this read
+Complaints about Freedom of Information
+on the Information Commissioner's website. If you requested information from a Scottish
+authority, then appeal
+to the Scottish Information Commissioner.
+
+
+
To make it easier to send the relevant information to the
+Information Commissioner, either
+<% if !@info_request.nil? %>
+ include a link to your request
+ <%=h main_url(request_url(@info_request)) %>
+<% else %>
+ include a link to your request on <%= site_name %>
+<% end %>
+in your complaint or print out the whole page of your request and all attachments.
+
+
+
<%= site_name %> has no special facilities for handling a request at this stage - it
+passes into the Information Commissioner's system. You can leave annotations on your
+request keeping people informed of progress.
+
+
A warning. There is a backlog of work at the Information Commissioner, and
+it can take literally years to get resolution from them. If you reach this point,
+you should accept that you won't get the information quickly by this means. Maybe
+you want to help the fight to improve Freedom of Information, or maybe
+getting the information slowly is still worthwhile. You can also try and
+get the information by other means...
You can try persuing your problem or your research in other ways.
+
+
+
Make a new FOI request for summary information, or for
+documentation relating indirectly to matters in your refused request.
+Ask us for ideas if you're stuck.
+
If any other public authorities or publicly owned companies are involved,
+then make FOI requests to them.
+
Write to your MP or other politician using WriteToThem and ask for their help
+finding the answer. MPs can write directly to ministers or departments, and
+can ask written questions in the House of Commons. Councillors in local authorities
+can talk directly to council officers.
+
Ask other researchers who are interested in a similar
+issue to yours for ideas. You can sometimes find them by browsing this site;
+contact any registered user from their page. There may be an Internet
+forum or group that they hang out in. If it is a local matter, use GroupsNearYou to find such a
+forum.
+
Start a pledge on PledgeBank to get
+others to act together with you. For example, you could arrange a meeting with
+staff from the authority. Or you could form a small local campaigns group.
+
+
+
+
diff --git a/app/views/help/unhappy.rhtml b/app/views/help/unhappy.rhtml
deleted file mode 100644
index 2b00341c2..000000000
--- a/app/views/help/unhappy.rhtml
+++ /dev/null
@@ -1,110 +0,0 @@
-<% @title = "Unhappy about a Freedom of Information request?" %>
-
-
-<% if !@info_request.nil? %>
-
Unhappy about the response you got
-to your request '<%=request_link(@info_request) %>'?
-
-<% else %>
-
Unhappy about the response you got?
-<% end %>
-
-
If ...
-
-
-
You didn't get a reply within 20 working days
-
You did not get all of the information that you requested or
-
Your request was refused, but without a reason valid under the law
-
-
-
... you can
-
-
-
Ask for an internal review at the public authority.
-
If that doesn't help, complain to the Information Commissioner.
-
Either way, also use other means to answer your question.
-<% if !@info_request.nil? %>
- <%= link_to "Request an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup", :class => 'link_button_green' %> and then write a message asking the authority to review your request.
-<% else %>
- At the bottom of the relevant request page on <%= site_name %> choose
- "request an internal review". Then write a message asking for an internal
- review of your request. You may want to include a link to the
- request page, to make it clear which request you are talking about.
-<% end %>
-
-
-
Internal reviews should be quick. If one takes longer than 20 working days
-then the authority should write and let you know, and it should never take
-longer than 40 working days (see this
-good
-practice guide).
-You will then either get the information that
-you originally requested, or you will be told that the review upholds the
-original decision.
-
If you are still unhappy after the public authority has done their internal review,
-then you can complain to the Information Commissioner. To do this read
-Complaints about Freedom of Information
-on the Information Commissioner's website. If you requested information from a Scottish
-authority, then appeal
-to the Scottish Information Commissioner.
-
-
-
To make it easier to send the relevant information to the
-Information Commissioner, either
-<% if !@info_request.nil? %>
- include a link to your request
- <%=h main_url(request_url(@info_request)) %>
-<% else %>
- include a link to your request on <%= site_name %>
-<% end %>
-in your complaint or print out the whole page of your request and all attachments.
-
-
-
<%= site_name %> has no special facilities for handling a request at this stage - it
-passes into the Information Commissioner's system. You can leave annotations on your
-request keeping people informed of progress.
-
-
A warning. There is a backlog of work at the Information Commissioner, and
-it can take literally years to get resolution from them. If you reach this point,
-you should accept that you won't get the information quickly by this means. Maybe
-you want to help the fight to improve Freedom of Information, or maybe
-getting the information slowly is still worthwhile. You can also try and
-get the information by other means...
You can try persuing your problem or your research in other ways.
-
-
-
Make a new FOI request for summary information, or for
-documentation relating indirectly to matters in your refused request.
-Ask us for ideas if you're stuck.
-
If any other public authorities or publicly owned companies are involved,
-then make FOI requests to them.
-
Write to your MP or other politician using WriteToThem and ask for their help
-finding the answer. MPs can write directly to ministers or departments, and
-can ask written questions in the House of Commons. Councillors in local authorities
-can talk directly to council officers.
-
Ask other researchers who are interested in a similar
-issue to yours for ideas. You can sometimes find them by browsing this site;
-contact any registered user from their page. There may be an Internet
-forum or group that they hang out in. If it is a local matter, use GroupsNearYou to find such a
-forum.
-
Start a pledge on PledgeBank to get
-others to act together with you. For example, you could arrange a meeting with
-staff from the authority. Or you could form a small local campaigns group.
-
-
-
\ No newline at end of file
diff --git a/app/views/layouts/outgoing_mailer.html.erb b/app/views/layouts/outgoing_mailer.html.erb
new file mode 100644
index 000000000..8bf8ef216
--- /dev/null
+++ b/app/views/layouts/outgoing_mailer.html.erb
@@ -0,0 +1 @@
+<%= raw MySociety::Format.wrap_email_body_by_lines(yield) %>
diff --git a/app/views/layouts/outgoing_mailer.rhtml b/app/views/layouts/outgoing_mailer.rhtml
deleted file mode 100644
index 8bf8ef216..000000000
--- a/app/views/layouts/outgoing_mailer.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= raw MySociety::Format.wrap_email_body_by_lines(yield) %>
diff --git a/app/views/layouts/request_mailer.html.erb b/app/views/layouts/request_mailer.html.erb
new file mode 100644
index 000000000..3cdc75009
--- /dev/null
+++ b/app/views/layouts/request_mailer.html.erb
@@ -0,0 +1 @@
+<%= raw MySociety::Format.wrap_email_body_by_paragraphs(yield) %>
diff --git a/app/views/layouts/request_mailer.rhtml b/app/views/layouts/request_mailer.rhtml
deleted file mode 100644
index 3cdc75009..000000000
--- a/app/views/layouts/request_mailer.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= raw MySociety::Format.wrap_email_body_by_paragraphs(yield) %>
diff --git a/app/views/layouts/user_mailer.html.erb b/app/views/layouts/user_mailer.html.erb
new file mode 100644
index 000000000..3cdc75009
--- /dev/null
+++ b/app/views/layouts/user_mailer.html.erb
@@ -0,0 +1 @@
+<%= raw MySociety::Format.wrap_email_body_by_paragraphs(yield) %>
diff --git a/app/views/layouts/user_mailer.rhtml b/app/views/layouts/user_mailer.rhtml
deleted file mode 100644
index 3cdc75009..000000000
--- a/app/views/layouts/user_mailer.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= raw MySociety::Format.wrap_email_body_by_paragraphs(yield) %>
diff --git a/app/views/outgoing_mailer/_followup_footer.html.erb b/app/views/outgoing_mailer/_followup_footer.html.erb
new file mode 100644
index 000000000..d7bc7c5aa
--- /dev/null
+++ b/app/views/outgoing_mailer/_followup_footer.html.erb
@@ -0,0 +1,4 @@
+<%= _('Disclaimer: This message and any reply that you make will be published on the internet. Our privacy and copyright policies:')%>
+<%= help_officers_url %>
+
+<%= _('If you find this service useful as an FOI officer, please ask your web manager to link to us from your organisation\'s FOI page.')%>
diff --git a/app/views/outgoing_mailer/_followup_footer.rhtml b/app/views/outgoing_mailer/_followup_footer.rhtml
deleted file mode 100644
index d7bc7c5aa..000000000
--- a/app/views/outgoing_mailer/_followup_footer.rhtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<%= _('Disclaimer: This message and any reply that you make will be published on the internet. Our privacy and copyright policies:')%>
-<%= help_officers_url %>
-
-<%= _('If you find this service useful as an FOI officer, please ask your web manager to link to us from your organisation\'s FOI page.')%>
diff --git a/app/views/outgoing_mailer/followup.html.erb b/app/views/outgoing_mailer/followup.html.erb
new file mode 100644
index 000000000..7050a295b
--- /dev/null
+++ b/app/views/outgoing_mailer/followup.html.erb
@@ -0,0 +1,10 @@
+<%= @outgoing_message.body.strip %>
+
+<%= @outgoing_message.quoted_part_to_append_to_email.strip %>
+
+-------------------------------------------------------------------
+<%= _('Please use this email address for all replies to this request:')%>
+<%= @info_request.incoming_email %>
+
+<%= render :partial => 'followup_footer' %>
+-------------------------------------------------------------------
diff --git a/app/views/outgoing_mailer/followup.rhtml b/app/views/outgoing_mailer/followup.rhtml
deleted file mode 100644
index 7050a295b..000000000
--- a/app/views/outgoing_mailer/followup.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<%= @outgoing_message.body.strip %>
-
-<%= @outgoing_message.quoted_part_to_append_to_email.strip %>
-
--------------------------------------------------------------------
-<%= _('Please use this email address for all replies to this request:')%>
-<%= @info_request.incoming_email %>
-
-<%= render :partial => 'followup_footer' %>
--------------------------------------------------------------------
diff --git a/app/views/outgoing_mailer/initial_request.html.erb b/app/views/outgoing_mailer/initial_request.html.erb
new file mode 100644
index 000000000..d537a20bc
--- /dev/null
+++ b/app/views/outgoing_mailer/initial_request.html.erb
@@ -0,0 +1,13 @@
+<%= @outgoing_message.body.strip %>
+
+-------------------------------------------------------------------
+
+<%= _('Please use this email address for all replies to this request:')%>
+<%= @info_request.incoming_email %>
+
+<%= _('Is {{email_address}} the wrong address for {{type_of_request}} requests to {{public_body_name}}? If so, please contact us using this form:', :email_address => @info_request.public_body.request_email, :type_of_request => @info_request.law_used_full, :public_body_name => @info_request.public_body.name)%>
+<%= help_contact_url %>
+
+<%= render :partial => 'followup_footer' %>
+
+-------------------------------------------------------------------
diff --git a/app/views/outgoing_mailer/initial_request.rhtml b/app/views/outgoing_mailer/initial_request.rhtml
deleted file mode 100644
index d537a20bc..000000000
--- a/app/views/outgoing_mailer/initial_request.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-<%= @outgoing_message.body.strip %>
-
--------------------------------------------------------------------
-
-<%= _('Please use this email address for all replies to this request:')%>
-<%= @info_request.incoming_email %>
-
-<%= _('Is {{email_address}} the wrong address for {{type_of_request}} requests to {{public_body_name}}? If so, please contact us using this form:', :email_address => @info_request.public_body.request_email, :type_of_request => @info_request.law_used_full, :public_body_name => @info_request.public_body.name)%>
-<%= help_contact_url %>
-
-<%= render :partial => 'followup_footer' %>
-
--------------------------------------------------------------------
diff --git a/app/views/public_body/_alphabet.html.erb b/app/views/public_body/_alphabet.html.erb
new file mode 100644
index 000000000..a3359f3ab
--- /dev/null
+++ b/app/views/public_body/_alphabet.html.erb
@@ -0,0 +1,3 @@
+<%= "A".upto("Z") do |l| -%>
+ <%= link_to_unless (@tag == l), l, list_public_bodies_url(:tag => l.downcase) %>
+<% end %>
diff --git a/app/views/public_body/_alphabet.rhtml b/app/views/public_body/_alphabet.rhtml
deleted file mode 100644
index a3359f3ab..000000000
--- a/app/views/public_body/_alphabet.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= "A".upto("Z") do |l| -%>
- <%= link_to_unless (@tag == l), l, list_public_bodies_url(:tag => l.downcase) %>
-<% end %>
diff --git a/app/views/public_body/_body_listing.html.erb b/app/views/public_body/_body_listing.html.erb
new file mode 100644
index 000000000..864ab8c9b
--- /dev/null
+++ b/app/views/public_body/_body_listing.html.erb
@@ -0,0 +1,9 @@
+<% if public_bodies.empty? %>
+
+ <%= _("None found.")%>
+
+<% else %>
+ <% for public_body in public_bodies %>
+ <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => public_body } %>
+ <% end %>
+<% end %>
diff --git a/app/views/public_body/_body_listing.rhtml b/app/views/public_body/_body_listing.rhtml
deleted file mode 100644
index 864ab8c9b..000000000
--- a/app/views/public_body/_body_listing.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-<% if public_bodies.empty? %>
-
- <%= _("None found.")%>
-
-<% else %>
- <% for public_body in public_bodies %>
- <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => public_body } %>
- <% end %>
-<% end %>
diff --git a/app/views/public_body/_body_listing_single.html.erb b/app/views/public_body/_body_listing_single.html.erb
new file mode 100644
index 000000000..b01d2ebb2
--- /dev/null
+++ b/app/views/public_body/_body_listing_single.html.erb
@@ -0,0 +1,31 @@
+<% if @highlight_words.nil?
+ @highlight_words = []
+ end %>
+
+
+
+ <%= link_to highlight_words(public_body.name, @highlight_words), public_body_url(public_body) %>
+
+
+ <% if !public_body.short_name.empty? || !public_body.notes_without_html.empty? %>
+ <% if !public_body.short_name.empty? %>
+ <%= _("Also called {{other_name}}.", :other_name => highlight_words(public_body.short_name, @highlight_words)) %>
+ <% end %>
+ <% if !public_body.notes_without_html.empty? %>
+ <%= highlight_and_excerpt(public_body.notes_without_html, @highlight_words, 150) %>
+ <% end %>
+
+ <% end %>
+
+
+ <%= n_('%d request made.', '%d requests made.', public_body.info_requests.size) % public_body.info_requests.size %>
+ <% if !@include_request_link_in_authority_listing.nil? %>
+ <%= link_to _("Make your own request"), public_body_url(public_body) %>.
+ <% end %>
+
+
+ <%= _("Added on {{date}}", :date => simple_date(public_body.created_at)) %>.
+
+
+
<%= _('You can only request information about the environment from this authority.')%>
+ <% end %>
+
+
+ <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %>
+ <% if @public_body.eir_only? %>
+ <%= _('Make a new Environmental Information request')%>
+ <% else %>
+ <%= _('Make a new Freedom of Information request to {{public_body}}', :public_body => h(@public_body.name))%>
+ <% end %>
+ <%= _('{{text}}', :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 %>
+ <%= _('For an unknown reason, it is not possible to make a request to this authority.')%>
+ <% end %>
+
+ <% if @public_body.override_request_email %>
+
+ <%= _("Note: Because we're testing, requests are being sent to {{email}} rather than to the actual authority.", :email => @public_body.override_request_email) %>
+
+ <% end %>
+
+
+
+
+ <% if @public_body.info_requests.size == 0 %>
+ <% if @public_body.eir_only? %>
+
<%= _('Environmental Information Regulations requests made using this site') %>
+
Nobody has made any Environmental Information Regulations requests to <%=h(@public_body.name)%> using this site yet.
+ <% else %>
+
<%= _('Freedom of Information requests made using this site')%>
+
<%= _('Nobody has made any Freedom of Information requests to {{public_body_name}} using this site yet.', :public_body_name => h(@public_body.name))%>
+ <% end %>
+ <% else %>
+
+ <% if @public_body.eir_only? %>
+ <%= pluralize(@public_body.info_requests.size, "Environmental Information Regulations request made using this site") %>
+ <% else %>
+ <% if @public_body.info_requests.size > 4 %>
+ <%= n_('Search within the %d Freedom of Information requests to %s', 'Search within the %d Freedom of Information requests made to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %>
+ <% else %>
+ <%= n_('%d Freedom of Information request to %s', '%d Freedom of Information requests to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %>
+ <% end %>
+ <% end %>
+ <%= @page_desc %>
+
+
+
+ <% if @public_body.info_requests.size > 4 %>
+ <%= render :partial => 'request/request_filter_form' %>
+ <% end %>
+ <% end %>
+
+
+ <% if !@xapian_requests.nil? %>
+
+ <% 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, @xapian_requests.matches_estimated) %>
+
+ <% if @xapian_requests.results.empty? %>
+
<% _('There were no requests matching your query.') %>
+ <% else %>
+
<%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %>
+ <% end %>
+
+ <% else %>
+ <% if @public_body.eir_only? %>
+
<%= _('Environmental Information Regulations requests made') %>
+ <% else %>
+
<%= _('Freedom of Information requests made')%>
+ <% end %>
+
<%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests that have been made to this authority.')%>
+ <% end %>
+
+
diff --git a/app/views/public_body/show.rhtml b/app/views/public_body/show.rhtml
deleted file mode 100644
index 6431b4742..000000000
--- a/app/views/public_body/show.rhtml
+++ /dev/null
@@ -1,132 +0,0 @@
-<% @title = h(@public_body.name) + _(" - view and make Freedom of Information requests") %>
-
<%= _('You can only request information about the environment from this authority.')%>
- <% end %>
-
-
- <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %>
- <% if @public_body.eir_only? %>
- <%= _('Make a new Environmental Information request')%>
- <% else %>
- <%= _('Make a new Freedom of Information request to {{public_body}}', :public_body => h(@public_body.name))%>
- <% end %>
- <%= _('{{text}}', :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 %>
- <%= _('For an unknown reason, it is not possible to make a request to this authority.')%>
- <% end %>
-
- <% if @public_body.override_request_email %>
-
- <%= _("Note: Because we're testing, requests are being sent to {{email}} rather than to the actual authority.", :email => @public_body.override_request_email) %>
-
- <% end %>
-
-
-
-
- <% if @public_body.info_requests.size == 0 %>
- <% if @public_body.eir_only? %>
-
<%= _('Environmental Information Regulations requests made using this site') %>
-
Nobody has made any Environmental Information Regulations requests to <%=h(@public_body.name)%> using this site yet.
- <% else %>
-
<%= _('Freedom of Information requests made using this site')%>
-
<%= _('Nobody has made any Freedom of Information requests to {{public_body_name}} using this site yet.', :public_body_name => h(@public_body.name))%>
- <% end %>
- <% else %>
-
- <% if @public_body.eir_only? %>
- <%= pluralize(@public_body.info_requests.size, "Environmental Information Regulations request made using this site") %>
- <% else %>
- <% if @public_body.info_requests.size > 4 %>
- <%= n_('Search within the %d Freedom of Information requests to %s', 'Search within the %d Freedom of Information requests made to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %>
- <% else %>
- <%= n_('%d Freedom of Information request to %s', '%d Freedom of Information requests to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %>
- <% end %>
- <% end %>
- <%= @page_desc %>
-
-
-
- <% if @public_body.info_requests.size > 4 %>
- <%= render :partial => 'request/request_filter_form' %>
- <% end %>
- <% end %>
-
-
- <% if !@xapian_requests.nil? %>
-
- <% 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, @xapian_requests.matches_estimated) %>
-
- <% if @xapian_requests.results.empty? %>
-
<% _('There were no requests matching your query.') %>
- <% else %>
-
<%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %>
- <% end %>
-
- <% else %>
- <% if @public_body.eir_only? %>
-
<%= _('Environmental Information Regulations requests made') %>
- <% else %>
-
<%= _('Freedom of Information requests made')%>
- <% end %>
-
<%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests that have been made to this authority.')%>
<%= _('FOI email address for {{public_body}}',:public_body=> public_body_link(@public_body))%>
+
+
+<% if @public_body.is_requestable? %>
+<%= _('{{site_name}} sends new requests to {{request_email}} for this authority.', :site_name=>site_name, :request_email=> h(@public_body.request_email))%>
+<% else %>
+ <% if @public_body.not_requestable_reason == 'not_apply' %>
+
<%= _('Freedom of Information law no longer applies to this authority.Follow up messages to existing requests are sent to ')%><%=h @public_body.request_email%>.
+
+ <% if @public_body.is_requestable? || @public_body.not_requestable_reason != 'bad_contact' %>
+ <%= raw _('If the address is wrong, or you know a better address, please contact us.')% [help_contact_path]%>
+ <% else %>
+ <%= raw _(' If you know the address to use, then please send it to us.
+ You may be able to find the address on their website, or by phoning them up and asking.')% [help_contact_path] %>
+ <% end %>
+
+
+
+
+ <% if @public_body.eir_only? %>
+ <%= link_to "Make a new EIR request", new_request_to_body_url(:url_name => @public_body.url_name)%>
+ <% else %>
+ <%= link_to "Make a new FOI request", new_request_to_body_url(:url_name => @public_body.url_name)%>
+ <% end %>
+ to <%= h(@public_body.name) %>
+
+
<%= _('FOI email address for {{public_body}}',:public_body=> public_body_link(@public_body))%>
-
-
-<% if @public_body.is_requestable? %>
-<%= _('{{site_name}} sends new requests to {{request_email}} for this authority.', :site_name=>site_name, :request_email=> h(@public_body.request_email))%>
-<% else %>
- <% if @public_body.not_requestable_reason == 'not_apply' %>
-
<%= _('Freedom of Information law no longer applies to this authority.Follow up messages to existing requests are sent to ')%><%=h @public_body.request_email%>.
-
- <% if @public_body.is_requestable? || @public_body.not_requestable_reason != 'bad_contact' %>
- <%= raw _('If the address is wrong, or you know a better address, please contact us.')% [help_contact_path]%>
- <% else %>
- <%= raw _(' If you know the address to use, then please send it to us.
- You may be able to find the address on their website, or by phoning them up and asking.')% [help_contact_path] %>
- <% end %>
-
-
-
-
- <% if @public_body.eir_only? %>
- <%= link_to "Make a new EIR request", new_request_to_body_url(:url_name => @public_body.url_name)%>
- <% else %>
- <%= link_to "Make a new FOI request", new_request_to_body_url(:url_name => @public_body.url_name)%>
- <% end %>
- to <%= h(@public_body.name) %>
-
-
-
-
diff --git a/app/views/public_body/view_email_captcha.html.erb b/app/views/public_body/view_email_captcha.html.erb
new file mode 100644
index 000000000..4f6db5b67
--- /dev/null
+++ b/app/views/public_body/view_email_captcha.html.erb
@@ -0,0 +1,13 @@
+<% @title = _("View FOI email address for '{{public_body_name}}'",:public_body_name => h(@public_body.name)) %>
+
+
<%= _('View FOI email address for {{public_body_name}}',:public_body_name=>public_body_link(@public_body))%>
+
+
<%= _('To view the email address that we use to send FOI requests to {{public_body_name}}, please enter these words.', :public_body_name => h(@public_body.name))%>
+<% end %>
diff --git a/app/views/public_body/view_email_captcha.rhtml b/app/views/public_body/view_email_captcha.rhtml
deleted file mode 100644
index 4f6db5b67..000000000
--- a/app/views/public_body/view_email_captcha.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-<% @title = _("View FOI email address for '{{public_body_name}}'",:public_body_name => h(@public_body.name)) %>
-
-
<%= _('View FOI email address for {{public_body_name}}',:public_body_name=>public_body_link(@public_body))%>
-
-
<%= _('To view the email address that we use to send FOI requests to {{public_body_name}}, please enter these words.', :public_body_name => h(@public_body.name))%>
+ <% if outgoing_message.status == 'ready' && !@info_request.is_external? %>
+ Warning: This message has not yet been sent for an unknown reason.
+ <% end %>
+
+
+
+ <%= link_to _("Link to this"), outgoing_message_url(outgoing_message), :class => "link_to_this" %>
+
+ Sent
+ <% if info_request_event.outgoing_message.message_type == 'initial_request' %>
+ request
+ <% elsif info_request_event.outgoing_message.message_type == 'followup' %>
+ a follow up
+ <% else %>
+ <% raise "unknown message_type" %>
+ <% end %>
+
+ to <%= public_body_link(@info_request.public_body) %> again<% if not info_request_event.same_email_as_previous_send? %>, using a new contact address<% end %>.
+
- <% if outgoing_message.status == 'ready' && !@info_request.is_external? %>
- Warning: This message has not yet been sent for an unknown reason.
- <% end %>
-
-
-
- <%= link_to _("Link to this"), outgoing_message_url(outgoing_message), :class => "link_to_this" %>
-
- Sent
- <% if info_request_event.outgoing_message.message_type == 'initial_request' %>
- request
- <% elsif info_request_event.outgoing_message.message_type == 'followup' %>
- a follow up
- <% else %>
- <% raise "unknown message_type" %>
- <% end %>
-
- to <%= public_body_link(@info_request.public_body) %> again<% if not info_request_event.same_email_as_previous_send? %>, using a new contact address<% end %>.
-
- <% end %>
-<% elsif @old_unclassified %>
- <%= render :partial => 'request/other_describe_state', :locals => {:id_suffix => id_suffix } %>
-<% else %>
- <% if !@info_request.is_external? %>
- <%= _('We don\'t know whether the most recent response to this request contains
- information or not
- –
- if you are {{user_link}} please sign in and let everyone know.',:user_link=>user_link(@info_request.user), :url=>signin_url(:r => request.fullpath)) %>
- <% end %>
-<% end %>
-
diff --git a/app/views/request/_followup.html.erb b/app/views/request/_followup.html.erb
new file mode 100644
index 000000000..127866d5d
--- /dev/null
+++ b/app/views/request/_followup.html.erb
@@ -0,0 +1,140 @@
+
+ <% if (incoming_message.nil? || !incoming_message.valid_to_reply_to?)
+ # TRANSLATORS: This phrase completes the following sentences:
+ # Request an internal review from...
+ # Send a public follow up message to...
+ # Send a public reply to...
+ # Don't want to address your message to... ?
+ name_for_followup = _("the main FOI contact at {{public_body}}", :public_body => h(OutgoingMailer.name_for_followup(@info_request, nil)))
+ else
+ name_for_followup = h(OutgoingMailer.name_for_followup(@info_request, incoming_message))
+ end %>
+ <% if @internal_review %>
+
<%= _('Request an internal review from {{person_or_body}}', :person_or_body => name_for_followup) %>
+
<%= link_to(_("the main FOI contact address for {{public_body}}", :public_body => name), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil)) %>
+ <% end %>
+ <% end %>
+
+<% end %>
+
+
+<% end %>
+ <% if @info_request.allow_new_responses_from == 'nobody' %>
+
<%= _('Follow ups and new responses to this request have been stopped to prevent spam. Please contact us if you are {{user_link}} and need to send a follow up.',:user_link=>user_link(@info_request.user), :url=>help_contact_path) %>
+ <% else %>
+ <% if @internal_review %>
+
+ <%= raw(_('If you are dissatisfied by the response you got from
+ the public authority, you have the right to
+ complain (details).') % "http://foiwiki.com/foiwiki/index.php/Internal_reviews") %>
+
+ <% end %>
+
+
+ <%= _('Please only write messages directly relating to your request {{request_link}}. If you would like to ask for information that was not in your original request, then file a new request.', :request_link=>request_link(@info_request), :new_request_link => new_request_to_body_url(:url_name => @info_request.public_body.url_name)) %>
+
+
+ <% status = @info_request.calculate_status %>
+ <% if status == 'waiting_response_overdue' %>
+
<%= _('The response to your request has been delayed. You can say that,
+ by law, the authority should normally have responded
+ promptly and') %>
+ <% if @info_request.public_body.is_school? %>
+ <%= _('in term time') %>
+ <% end %>
+ <%= _('by {{date}}',:date=>simple_date(@info_request.date_response_required_by)) %>
+ (<%= raw(_('details') % ["#{help_requesting_path}#quickly_response"]) %>).
+
+
+ <% elsif status == 'waiting_response_very_overdue' %>
+
+ <%= _('The response to your request is long overdue. You can say that, by
+ law, under all circumstances, the authority should have responded
+ by now') %> (<%= raw(_('details') % ["#{help_requesting_path}#quickly_response"]) %>).
+
- <% if (incoming_message.nil? || !incoming_message.valid_to_reply_to?)
- # TRANSLATORS: This phrase completes the following sentences:
- # Request an internal review from...
- # Send a public follow up message to...
- # Send a public reply to...
- # Don't want to address your message to... ?
- name_for_followup = _("the main FOI contact at {{public_body}}", :public_body => h(OutgoingMailer.name_for_followup(@info_request, nil)))
- else
- name_for_followup = h(OutgoingMailer.name_for_followup(@info_request, incoming_message))
- end %>
- <% if @internal_review %>
-
<%= _('Request an internal review from {{person_or_body}}', :person_or_body => name_for_followup) %>
-
<%= link_to(_("the main FOI contact address for {{public_body}}", :public_body => name), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil)) %>
- <% end %>
- <% end %>
-
-<% end %>
-
-
-<% end %>
- <% if @info_request.allow_new_responses_from == 'nobody' %>
-
<%= _('Follow ups and new responses to this request have been stopped to prevent spam. Please contact us if you are {{user_link}} and need to send a follow up.',:user_link=>user_link(@info_request.user), :url=>help_contact_path) %>
- <% else %>
- <% if @internal_review %>
-
- <%= raw(_('If you are dissatisfied by the response you got from
- the public authority, you have the right to
- complain (details).') % "http://foiwiki.com/foiwiki/index.php/Internal_reviews") %>
-
- <% end %>
-
-
- <%= _('Please only write messages directly relating to your request {{request_link}}. If you would like to ask for information that was not in your original request, then file a new request.', :request_link=>request_link(@info_request), :new_request_link => new_request_to_body_url(:url_name => @info_request.public_body.url_name)) %>
-
-
- <% status = @info_request.calculate_status %>
- <% if status == 'waiting_response_overdue' %>
-
<%= _('The response to your request has been delayed. You can say that,
- by law, the authority should normally have responded
- promptly and') %>
- <% if @info_request.public_body.is_school? %>
- <%= _('in term time') %>
- <% end %>
- <%= _('by {{date}}',:date=>simple_date(@info_request.date_response_required_by)) %>
- (<%= raw(_('details') % ["#{help_requesting_path}#quickly_response"]) %>).
-
-
- <% elsif status == 'waiting_response_very_overdue' %>
-
- <%= _('The response to your request is long overdue. You can say that, by
- law, under all circumstances, the authority should have responded
- by now') %> (<%= raw(_('details') % ["#{help_requesting_path}#quickly_response"]) %>).
-
- <% if not @is_owning_user %>
- (You will be asked to sign in as <%= user_link(@info_request.user) %>)
- <% end %>
-
- <% end %>
-
-
-
diff --git a/app/views/request/_hidden_correspondence.html.erb b/app/views/request/_hidden_correspondence.html.erb
new file mode 100644
index 000000000..a5e680385
--- /dev/null
+++ b/app/views/request/_hidden_correspondence.html.erb
@@ -0,0 +1,33 @@
+<% if info_request_event.prominence == 'requester_only' %>
+ <%
+ if !info_request_event.nil? && info_request_event.event_type == 'response'
+ incoming_message = info_request_event.incoming_message
+ end
+ if not incoming_message.nil?
+ %>
+
+
+ <%= raw(_('This response has been hidden. See annotations to find out why.
+ If you are the requester, then you may sign in to view the response.') % [signin_url(:r => request.fullpath)]) %>
+
+ <%= raw(_('This outgoing message has been hidden. See annotations to
+ find out why. If you are the requester, then you may sign in to view the response.') % [signin_url(:r => request.fullpath)]) %>
+
<%= raw(_('This comment has been hidden. See annotations to
+ find out why. If you are the requester, then you may sign in to view the response.') % [signin_url(:r => request.fullpath)]) %>
+
+
+ <% end %>
+
+<% elsif info_request_event.prominence == 'hidden' %>
+ <% # show nothing when hidden %>
+<% else %>
+ <% raise _("unexpected prominence on request event") %>
+<% end %>
diff --git a/app/views/request/_hidden_correspondence.rhtml b/app/views/request/_hidden_correspondence.rhtml
deleted file mode 100644
index a5e680385..000000000
--- a/app/views/request/_hidden_correspondence.rhtml
+++ /dev/null
@@ -1,33 +0,0 @@
-<% if info_request_event.prominence == 'requester_only' %>
- <%
- if !info_request_event.nil? && info_request_event.event_type == 'response'
- incoming_message = info_request_event.incoming_message
- end
- if not incoming_message.nil?
- %>
-
-
- <%= raw(_('This response has been hidden. See annotations to find out why.
- If you are the requester, then you may sign in to view the response.') % [signin_url(:r => request.fullpath)]) %>
-
- <%= raw(_('This outgoing message has been hidden. See annotations to
- find out why. If you are the requester, then you may sign in to view the response.') % [signin_url(:r => request.fullpath)]) %>
-
<%= raw(_('This comment has been hidden. See annotations to
- find out why. If you are the requester, then you may sign in to view the response.') % [signin_url(:r => request.fullpath)]) %>
-
-
- <% end %>
-
-<% elsif info_request_event.prominence == 'hidden' %>
- <% # show nothing when hidden %>
-<% else %>
- <% raise _("unexpected prominence on request event") %>
-<% end %>
diff --git a/app/views/request/_next_actions.html.erb b/app/views/request/_next_actions.html.erb
new file mode 100644
index 000000000..f318df6e4
--- /dev/null
+++ b/app/views/request/_next_actions.html.erb
@@ -0,0 +1 @@
+
diff --git a/app/views/request/_next_actions.rhtml b/app/views/request/_next_actions.rhtml
deleted file mode 100644
index f318df6e4..000000000
--- a/app/views/request/_next_actions.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/app/views/request/_other_describe_state.html.erb b/app/views/request/_other_describe_state.html.erb
new file mode 100644
index 000000000..735353e86
--- /dev/null
+++ b/app/views/request/_other_describe_state.html.erb
@@ -0,0 +1,81 @@
+
+
+<%= form_for(:incoming_message, @info_request, :url => describe_state_url(:id => @info_request.id)) do |f| %>
+
<%= _('Hi! We need your help. The person who made the following request
+ hasn\'t told us whether or not it was successful. Would you mind taking
+ a moment to read it and help us keep the place tidy for everyone?
+ Thanks.') %>
+
+
+
<%= _('This request is still in progress:') %>
+ <% if @info_request.described_state != 'internal_review' %>
+
<%= _('Hi! We need your help. The person who made the following request
- hasn\'t told us whether or not it was successful. Would you mind taking
- a moment to read it and help us keep the place tidy for everyone?
- Thanks.') %>
-
-
-
<%= _('This request is still in progress:') %>
- <% if @info_request.described_state != 'internal_review' %>
-
+ <% 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=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at )) %>
+ <% elsif event.event_type == 'followup_sent' %>
+ <%=event.display_status %>
+ <%= _('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=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at )) %>
+ <% elsif event.event_type == 'response' %>
+ <%=event.display_status %>
+ <%= _('by {{public_body_name}} to {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at )) %>
+ <% elsif event.event_type == 'comment' %>
+ <%= _('Request to {{public_body_name}} by {{info_request_user}}. Annotated by {{event_comment_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at)) %>
+ <% else %>
+ <%# Events of other types will not be indexed: see InfoRequestEvent#indexed_by_search?
+ However, it can happen that we see other types of event transiently here in the period
+ between a change being made and the update-xapian-index job being run. %>
+
+ <% end %>
+
- <% 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=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at )) %>
- <% elsif event.event_type == 'followup_sent' %>
- <%=event.display_status %>
- <%= _('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=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at )) %>
- <% elsif event.event_type == 'response' %>
- <%=event.display_status %>
- <%= _('by {{public_body_name}} to {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at )) %>
- <% elsif event.event_type == 'comment' %>
- <%= _('Request to {{public_body_name}} by {{info_request_user}}. Annotated by {{event_comment_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at)) %>
- <% else %>
- <%# Events of other types will not be indexed: see InfoRequestEvent#indexed_by_search?
- However, it can happen that we see other types of event transiently here in the period
- between a change being made and the update-xapian-index job being run. %>
-
- <% end %>
-
+ <% if @info_request.described_state != "attention_requested" %>
+
<%= _('Offensive? Unsuitable?') %>
+ <% if @info_request.attention_requested %>
+ <% if @info_request.prominence == 'hidden' %>
+ <%# The eccentric formatting of the following string is in order that it be identical
+ to the corresponding string in request/show.html.erb %>
+
<%= _('This request has prominence \'hidden\'. You can only see it because you are logged
+ in as a super user.') %>
+ <% elsif @info_request.prominence == 'requester_only' %>
+ <%# The eccentric formatting of the following string is in order that it be identical
+ to the corresponding string in request/show.html.erb %>
+
<%= raw(_('This request is hidden, so that only you the requester can see it. Please
+ contact us if you are not sure why.') % [help_requesting_path]) %>
+ <% else %>
+
<%= raw(_('This request has been marked for review by the site administrators, who have not hidden it at this time. If you believe it should be hidden, please contact us.') % [help_requesting_path]) %>
+ <% end %>
+ <% else %>
+
<%= _('Requests for personal information and vexatious requests are not considered valid for FOI purposes (read more).') %>
+
<%= _('If you believe this request is not suitable, you can report it for attention by the site administrators') %>
+ <%= button_to _("Report this request"), report_path, :class => "link_button_green" %>
+ <% end %>
+ <% end %>
+
- <% if @info_request.described_state != "attention_requested" %>
-
<%= _('Offensive? Unsuitable?') %>
- <% if @info_request.attention_requested %>
- <% if @info_request.prominence == 'hidden' %>
- <%# The eccentric formatting of the following string is in order that it be identical
- to the corresponding string in request/show.rhtml %>
-
<%= _('This request has prominence \'hidden\'. You can only see it because you are logged
- in as a super user.') %>
- <% elsif @info_request.prominence == 'requester_only' %>
- <%# The eccentric formatting of the following string is in order that it be identical
- to the corresponding string in request/show.rhtml %>
-
<%= raw(_('This request is hidden, so that only you the requester can see it. Please
- contact us if you are not sure why.') % [help_requesting_path]) %>
- <% else %>
-
<%= raw(_('This request has been marked for review by the site administrators, who have not hidden it at this time. If you believe it should be hidden, please contact us.') % [help_requesting_path]) %>
- <% end %>
- <% else %>
-
<%= _('Requests for personal information and vexatious requests are not considered valid for FOI purposes (read more).') %>
-
<%= _('If you believe this request is not suitable, you can report it for attention by the site administrators') %>
- <%= button_to _("Report this request"), report_path, :class => "link_button_green" %>
- <% end %>
- <% end %>
-
+ <%= _('This is an HTML version of an attachment to the Freedom of Information request')%>
+ '<%=link_to h(@info_request.title), incoming_message_url(@incoming_message)%>'.
+
- <%= _('This is an HTML version of an attachment to the Freedom of Information request')%>
- '<%=link_to h(@info_request.title), incoming_message_url(@incoming_message)%>'.
-
+ <% if event.event_type == 'sent' %>
+ <%= _('A new request, {{request_title}}, was 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=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at),:request_url=>request_url(info_request),:request_title=>info_request.title) %>
+ <% elsif event.event_type == 'followup_sent' %>
+ <%= _('A follow up to {{request_title}} was 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=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at),:request_url=>outgoing_message_url(event.outgoing_message),:request_title=>info_request.title) %>
+ <% elsif event.event_type == 'response' %>
+ <%= _('A response to {{request_title}} was sent by {{public_body_name}} to {{info_request_user}} on {{date}}. The request status is: {{request_status}}',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at),:request_url=>incoming_message_url(event.incoming_message_selective_columns("incoming_messages.id")),:request_title=>info_request.title,:request_status=>info_request.display_status) %>
+ <% elsif event.event_type == 'comment' %>
+ <%= _('An annotation to {{request_title}} was made by {{event_comment_user}} on {{date}}',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at),:request_url=>comment_url(event.comment),:request_title=>info_request.title) %>
+ <% else %>
+ <%# Events of other types will not be indexed: see InfoRequestEvent#indexed_by_search?
+ However, it can happen that we see other types of event transiently here in the period
+ between a change being made and the update-xapian-index job being run. %>
+
+ <% end %>
+
- <% if event.event_type == 'sent' %>
- <%= _('A new request, {{request_title}}, was 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=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at),:request_url=>request_url(info_request),:request_title=>info_request.title) %>
- <% elsif event.event_type == 'followup_sent' %>
- <%= _('A follow up to {{request_title}} was 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=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at),:request_url=>outgoing_message_url(event.outgoing_message),:request_title=>info_request.title) %>
- <% elsif event.event_type == 'response' %>
- <%= _('A response to {{request_title}} was sent by {{public_body_name}} to {{info_request_user}} on {{date}}. The request status is: {{request_status}}',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at),:request_url=>incoming_message_url(event.incoming_message_selective_columns("incoming_messages.id")),:request_title=>info_request.title,:request_status=>info_request.display_status) %>
- <% elsif event.event_type == 'comment' %>
- <%= _('An annotation to {{request_title}} was made by {{event_comment_user}} on {{date}}',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at),:request_url=>comment_url(event.comment),:request_title=>info_request.title) %>
- <% else %>
- <%# Events of other types will not be indexed: see InfoRequestEvent#indexed_by_search?
- However, it can happen that we see other types of event transiently here in the period
- between a change being made and the update-xapian-index job being run. %>
-
- <% end %>
-
<%= _("Details of request '") + request_link(@info_request) + "'" %>
+
+
<%= _('Event history') %>
+
+
<%= _('This table shows the technical details of the internal events that happened
+to this request on {{site_name}}. This could be used to generate information about
+the speed with which authorities respond to requests, the number of requests
+which require a postal response and much more.', :site_name=>site_name) %>
+
+
+
<%= _('Caveat emptor! To use this data in an honourable way, you will need
+a good internal knowledge of user behaviour on {{site_name}}. How,
+why and by whom requests are categorised is not straightforward, and there will
+be user error and ambiguity. You will also need to understand FOI law, and the
+way authorities use it. Plus you\'ll need to be an elite statistician. Please
+contact us with questions.', :site_name=>site_name, :contact_path=>help_contact_path) %>
+
+
+<% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>
+
+ <% for column in @columns %>
+
+ <%=h info_request_event.send(column) %>
+
+ <% end %>
+
+ <% if info_request_event.outgoing_message %>
+ <%= link_to "outgoing", outgoing_message_url(info_request_event.outgoing_message) %>
+ <% end %>
+ <% if info_request_event.incoming_message %>
+ <%= link_to "incoming", incoming_message_url(info_request_event.incoming_message) %>
+ <% end %>
+
+
+<% end %>
+
+
+
+<%= _('Here described means when a user selected a status for the request, and
+the most recent event had its status updated to that value. calculated is then inferred by
+{{site_name}} for intermediate events, which weren\'t given an explicit
+description by a user. See the search tips for description of the states.',
+:site_name=>site_name, :search_path=>search_redirect_path) %>
+
+
+
+<%= _('You can get this page in computer-readable format as part of the main JSON
+page for the request. See the API documentation.', :api_path=>help_api_path) %>
+
<%= _("Details of request '") + request_link(@info_request) + "'" %>
-
-
<%= _('Event history') %>
-
-
<%= _('This table shows the technical details of the internal events that happened
-to this request on {{site_name}}. This could be used to generate information about
-the speed with which authorities respond to requests, the number of requests
-which require a postal response and much more.', :site_name=>site_name) %>
-
-
-
<%= _('Caveat emptor! To use this data in an honourable way, you will need
-a good internal knowledge of user behaviour on {{site_name}}. How,
-why and by whom requests are categorised is not straightforward, and there will
-be user error and ambiguity. You will also need to understand FOI law, and the
-way authorities use it. Plus you\'ll need to be an elite statistician. Please
-contact us with questions.', :site_name=>site_name, :contact_path=>help_contact_path) %>
-
-
-<% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>
-
- <% for column in @columns %>
-
- <%=h info_request_event.send(column) %>
-
- <% end %>
-
- <% if info_request_event.outgoing_message %>
- <%= link_to "outgoing", outgoing_message_url(info_request_event.outgoing_message) %>
- <% end %>
- <% if info_request_event.incoming_message %>
- <%= link_to "incoming", incoming_message_url(info_request_event.incoming_message) %>
- <% end %>
-
-
-<% end %>
-
-
-
-<%= _('Here described means when a user selected a status for the request, and
-the most recent event had its status updated to that value. calculated is then inferred by
-{{site_name}} for intermediate events, which weren\'t given an explicit
-description by a user. See the search tips for description of the states.',
-:site_name=>site_name, :search_path=>search_redirect_path) %>
-
-
-
-<%= _('You can get this page in computer-readable format as part of the main JSON
-page for the request. See the API documentation.', :api_path=>help_api_path) %>
-
diff --git a/app/views/request/followup_bad.html.erb b/app/views/request/followup_bad.html.erb
new file mode 100644
index 000000000..c892263e6
--- /dev/null
+++ b/app/views/request/followup_bad.html.erb
@@ -0,0 +1,34 @@
+<% if @incoming_message.nil? || !@incoming_message.valid_to_reply_to? %>
+ <% @title = _("Unable to send follow up message to {{username}}",:username=>OutgoingMailer.name_for_followup(@info_request, nil)) %>
+<% else %>
+ <% @title = _("Unable to send a reply to {{username}}",:username=>OutgoingMailer.name_for_followup(@info_request, @incoming_message)) %>
+<% end %>
+
+
<%=@title%>
+
+<% if @reason == 'not_apply' %>
+
+
<%= _('Freedom of Information law no longer applies to') %> <%=h @info_request.public_body.name %>.
+ <%= raw(_('From the request page, try replying to a particular message, rather than sending
+ a general followup. If you need to make a general followup, and know
+ an email which will go to the right place, please send it to us.') % [help_contact_path]) %>
+
+<% elsif @reason == 'defunct' %>
+
+
<%=h @info_request.public_body.name %> <%= raw(_('no longer exists. If you are trying to make
+ From the request page, try replying to a particular message, rather than sending
+ a general followup. If you need to make a general followup, and know
+ an email which will go to the right place, please send it to us.') % [help_contact_path]) %>
+
+<% elsif @reason == 'bad_contact' %>
+
<%= _('We do not have a working {{law_used_full}} address for {{public_body_name}}.',:law_used_full=>h(@info_request.law_used_full),:public_body_name=>h(@info_request.public_body.name)) %> <%= raw(_('You may be able to find
+ one on their website, or by phoning them up and asking. If you manage
+ to find one, then please send it to us.') % [help_contact_path]) %>
+
+<% elsif @reason == 'external' %>
+
<%= _("Followups cannot be sent for this request, as it was made externally, and published here by {{public_body_name}} on the requester's behalf.", :public_body_name => h(@info_request.public_body.name)) %>
+
+<% else %>
+ <% raise _("unknown reason ") + @reason %>
+<% end %>
+
diff --git a/app/views/request/followup_bad.rhtml b/app/views/request/followup_bad.rhtml
deleted file mode 100644
index c892263e6..000000000
--- a/app/views/request/followup_bad.rhtml
+++ /dev/null
@@ -1,34 +0,0 @@
-<% if @incoming_message.nil? || !@incoming_message.valid_to_reply_to? %>
- <% @title = _("Unable to send follow up message to {{username}}",:username=>OutgoingMailer.name_for_followup(@info_request, nil)) %>
-<% else %>
- <% @title = _("Unable to send a reply to {{username}}",:username=>OutgoingMailer.name_for_followup(@info_request, @incoming_message)) %>
-<% end %>
-
-
<%=@title%>
-
-<% if @reason == 'not_apply' %>
-
-
<%= _('Freedom of Information law no longer applies to') %> <%=h @info_request.public_body.name %>.
- <%= raw(_('From the request page, try replying to a particular message, rather than sending
- a general followup. If you need to make a general followup, and know
- an email which will go to the right place, please send it to us.') % [help_contact_path]) %>
-
-<% elsif @reason == 'defunct' %>
-
-
<%=h @info_request.public_body.name %> <%= raw(_('no longer exists. If you are trying to make
- From the request page, try replying to a particular message, rather than sending
- a general followup. If you need to make a general followup, and know
- an email which will go to the right place, please send it to us.') % [help_contact_path]) %>
-
-<% elsif @reason == 'bad_contact' %>
-
<%= _('We do not have a working {{law_used_full}} address for {{public_body_name}}.',:law_used_full=>h(@info_request.law_used_full),:public_body_name=>h(@info_request.public_body.name)) %> <%= raw(_('You may be able to find
- one on their website, or by phoning them up and asking. If you manage
- to find one, then please send it to us.') % [help_contact_path]) %>
-
-<% elsif @reason == 'external' %>
-
<%= _("Followups cannot be sent for this request, as it was made externally, and published here by {{public_body_name}} on the requester's behalf.", :public_body_name => h(@info_request.public_body.name)) %>
-
-<% else %>
- <% raise _("unknown reason ") + @reason %>
-<% end %>
-
diff --git a/app/views/request/followup_preview.html.erb b/app/views/request/followup_preview.html.erb
new file mode 100644
index 000000000..55afc0245
--- /dev/null
+++ b/app/views/request/followup_preview.html.erb
@@ -0,0 +1,56 @@
+<% @title = _("Preview follow up to '") + h(@info_request.public_body.name) + "'" %>
+
+
+ <%= _('Privacy warning: Your message, and any response
+ to it, will be displayed publicly on this website.') %>
+
+ <%= o.hidden_field(:what_doing) %>
+
- <%= _('Privacy warning: Your message, and any response
- to it, will be displayed publicly on this website.') %>
-
- <%= o.hidden_field(:what_doing) %>
-
-
diff --git a/app/views/request/hidden.html.erb b/app/views/request/hidden.html.erb
new file mode 100644
index 000000000..41b2ff7e4
--- /dev/null
+++ b/app/views/request/hidden.html.erb
@@ -0,0 +1,19 @@
+<% @title = _("Request has been removed") %>
+
+
<%=@title%>
+
+
+<%=@details%>
+
+
+
<%= raw(_('The request you have tried to view has been removed. There are
+various reasons why we might have done this, sorry we can\'t be more specific here. Please contact us if you have any questions.') % [help_contact_path]) %>
+
+<% if @info_request.prominence == 'requester_only' %>
+
+ <%= raw(_('If you are the requester, then you may sign in to view the request.') % [signin_url(:r => request.fullpath)]) %>
+
+<% end %>
+
+
diff --git a/app/views/request/hidden.rhtml b/app/views/request/hidden.rhtml
deleted file mode 100644
index 41b2ff7e4..000000000
--- a/app/views/request/hidden.rhtml
+++ /dev/null
@@ -1,19 +0,0 @@
-<% @title = _("Request has been removed") %>
-
-
<%=@title%>
-
-
-<%=@details%>
-
-
-
<%= raw(_('The request you have tried to view has been removed. There are
-various reasons why we might have done this, sorry we can\'t be more specific here. Please contact us if you have any questions.') % [help_contact_path]) %>
-
-<% if @info_request.prominence == 'requester_only' %>
-
- <%= raw(_('If you are the requester, then you may sign in to view the request.') % [signin_url(:r => request.fullpath)]) %>
-
-<% end %>
-
-
diff --git a/app/views/request/list.html.erb b/app/views/request/list.html.erb
new file mode 100644
index 000000000..062b77c3e
--- /dev/null
+++ b/app/views/request/list.html.erb
@@ -0,0 +1,34 @@
+
+
diff --git a/app/views/request/new.html.erb b/app/views/request/new.html.erb
new file mode 100644
index 000000000..70719405c
--- /dev/null
+++ b/app/views/request/new.html.erb
@@ -0,0 +1,154 @@
+
+
+
+<% @title = _("Make an {{law_used_short}} request to '{{public_body_name}}'",:law_used_short=>h(@info_request.law_used_short),:public_body_name=>h(@info_request.public_body.name)) %>
+
+
<%= _('2. Ask for Information') %>
+
+ <% if @existing_request %>
+
+
+ <%= _('{{existing_request_user}} already
+ created the same request on {{date}}. You can either view the existing request,
+ or edit the details below to make a new but similar request.',:existing_request_user=>user_or_you_capital_link(@existing_request.user), :date=>simple_date(@existing_request.created_at), :existing_request=>request_url(@existing_request)) %>
+
+ <% if @info_request.public_body.info_requests.size > 0 %>
+ <%= _("Browse other requests to '{{public_body_name}}' for examples of how to word your request.", :public_body_name=>h(@info_request.public_body.name), :url=>public_body_url(@info_request.public_body)) %>
+ <% else %>
+ <%= _("Browse other requests for examples of how to word your request.", :url=>request_list_url) %>
+ <% end %>
+
+
+ <% if @info_request.public_body.has_notes? %>
+
+
<%= _('Special note for this authority!') %>
+
<%= @info_request.public_body.notes_as_html %>
+
+ <% end %>
+
+ <% if @info_request.public_body.eir_only? %>
+
<%= _('Please ask for environmental information only') %>
+
+
<%= _('The Freedom of Information Act does not apply to') %> <%=h(@info_request.public_body.name)%>.
+ <%= _('However, you have the right to request environmental
+ information under a different law') %> (explanation).
+ <%= _('This covers a very wide spectrum of information about the state of
+ the natural and built environment, such as:') %>
+
+
+
<%= _('Air, water, soil, land, flora and fauna (including how these effect
+ human beings)') %>
+
<%= _('Information on emissions and discharges (e.g. noise, energy,
+ radiation, waste materials)') %>
+
<%= _('Human health and safety') %>
+
<%= _('Cultural sites and built structures (as they may be affected by the
+ environmental factors listed above)') %>
+
<%= _('Plans and administrative measures that affect these matters') %>
+
+
+
<%= _('Please only request information that comes under those categories, do not waste your
+ time or the time of the public authority by requesting unrelated information.') %>
+ <%= raw(_('Everything that you enter on this page, including your name,
+ will be displayed publicly on
+ this website forever (why?).') % [help_privacy_path+"#public_request"]) %>
+ <%= raw(_('If you are thinking of using a pseudonym,
+ please read this first.') % [help_privacy_path+"#real_name"]) %>
+
+ <% else %>
+
+ <%= raw(_('Everything that you enter on this page
+ will be displayed publicly on
+ this website forever (why?).') % [help_privacy_path+"#public_request"]) %>
+
+ <% end %>
+
+
+ <%= raw(_(" Can I request information about myself?\n" +
+ "\t\t\tNo! (Click here for details)") % [help_requesting_path+"#data_protection"]) %>
+
+<% end %>
+
+
diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml
deleted file mode 100644
index 70719405c..000000000
--- a/app/views/request/new.rhtml
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-
-<% @title = _("Make an {{law_used_short}} request to '{{public_body_name}}'",:law_used_short=>h(@info_request.law_used_short),:public_body_name=>h(@info_request.public_body.name)) %>
-
-
<%= _('2. Ask for Information') %>
-
- <% if @existing_request %>
-
-
- <%= _('{{existing_request_user}} already
- created the same request on {{date}}. You can either view the existing request,
- or edit the details below to make a new but similar request.',:existing_request_user=>user_or_you_capital_link(@existing_request.user), :date=>simple_date(@existing_request.created_at), :existing_request=>request_url(@existing_request)) %>
-
- <% if @info_request.public_body.info_requests.size > 0 %>
- <%= _("Browse other requests to '{{public_body_name}}' for examples of how to word your request.", :public_body_name=>h(@info_request.public_body.name), :url=>public_body_url(@info_request.public_body)) %>
- <% else %>
- <%= _("Browse other requests for examples of how to word your request.", :url=>request_list_url) %>
- <% end %>
-
-
- <% if @info_request.public_body.has_notes? %>
-
-
<%= _('Special note for this authority!') %>
-
<%= @info_request.public_body.notes_as_html %>
-
- <% end %>
-
- <% if @info_request.public_body.eir_only? %>
-
<%= _('Please ask for environmental information only') %>
-
-
<%= _('The Freedom of Information Act does not apply to') %> <%=h(@info_request.public_body.name)%>.
- <%= _('However, you have the right to request environmental
- information under a different law') %> (explanation).
- <%= _('This covers a very wide spectrum of information about the state of
- the natural and built environment, such as:') %>
-
-
-
<%= _('Air, water, soil, land, flora and fauna (including how these effect
- human beings)') %>
-
<%= _('Information on emissions and discharges (e.g. noise, energy,
- radiation, waste materials)') %>
-
<%= _('Human health and safety') %>
-
<%= _('Cultural sites and built structures (as they may be affected by the
- environmental factors listed above)') %>
-
<%= _('Plans and administrative measures that affect these matters') %>
-
-
-
<%= _('Please only request information that comes under those categories, do not waste your
- time or the time of the public authority by requesting unrelated information.') %>
- <%= raw(_('Everything that you enter on this page, including your name,
- will be displayed publicly on
- this website forever (why?).') % [help_privacy_path+"#public_request"]) %>
- <%= raw(_('If you are thinking of using a pseudonym,
- please read this first.') % [help_privacy_path+"#real_name"]) %>
-
- <% else %>
-
- <%= raw(_('Everything that you enter on this page
- will be displayed publicly on
- this website forever (why?).') % [help_privacy_path+"#public_request"]) %>
-
- <% end %>
-
-
- <%= raw(_(" Can I request information about myself?\n" +
- "\t\t\tNo! (Click here for details)") % [help_requesting_path+"#data_protection"]) %>
-
-<% end %>
-
-
diff --git a/app/views/request/new_bad_contact.html.erb b/app/views/request/new_bad_contact.html.erb
new file mode 100644
index 000000000..56f3f4168
--- /dev/null
+++ b/app/views/request/new_bad_contact.html.erb
@@ -0,0 +1,10 @@
+<% @title = _("Missing contact details for '") + h(@info_request.public_body.name) + "'" %>
+
+
<%=@title%>
+
+
<%= _('Unfortunately, we do not have a working {{info_request_law_used_full}}
+address for', :info_request_law_used_full => @info_request.law_used_full) %> <%=h @info_request.public_body.name %>. <%= _('You may be able to find
+one on their website, or by phoning them up and asking. If you manage
+to find one, then please send it to us.', :help_url => help_contact_path) %>
+
<%= _('Unfortunately, we do not have a working {{info_request_law_used_full}}
-address for', :info_request_law_used_full => @info_request.law_used_full) %> <%=h @info_request.public_body.name %>. <%= _('You may be able to find
-one on their website, or by phoning them up and asking. If you manage
-to find one, then please send it to us.', :help_url => help_contact_path) %>
-
-
diff --git a/app/views/request/new_please_describe.html.erb b/app/views/request/new_please_describe.html.erb
new file mode 100644
index 000000000..6a193e70d
--- /dev/null
+++ b/app/views/request/new_please_describe.html.erb
@@ -0,0 +1,23 @@
+<% @title = "First, did your other requests succeed?" %>
+
+
<%=@title%>
+
+
<%= _('Please select each of these requests in turn, and let everyone know
+if they are successful yet or not.') %>
+
+
+
+<% for undescribed_request in @undescribed_requests %>
+
<%=request_link(undescribed_request)%>
+<% end %>
+
+
+
+ <%= raw(_('When you\'re done, come back here, reload this page and file your new request.') % [request.fullpath]) %>
+
+
+
+ <%= _('Thanks very much for helping keep everything neat and organised.
+ We\'ll also, if you need it, give you advice on what to do next about each of your
+ requests.') %>
+
diff --git a/app/views/request/new_please_describe.rhtml b/app/views/request/new_please_describe.rhtml
deleted file mode 100644
index 6a193e70d..000000000
--- a/app/views/request/new_please_describe.rhtml
+++ /dev/null
@@ -1,23 +0,0 @@
-<% @title = "First, did your other requests succeed?" %>
-
-
<%=@title%>
-
-
<%= _('Please select each of these requests in turn, and let everyone know
-if they are successful yet or not.') %>
-
-
-
-<% for undescribed_request in @undescribed_requests %>
-
<%=request_link(undescribed_request)%>
-<% end %>
-
-
-
- <%= raw(_('When you\'re done, come back here, reload this page and file your new request.') % [request.fullpath]) %>
-
-
-
- <%= _('Thanks very much for helping keep everything neat and organised.
- We\'ll also, if you need it, give you advice on what to do next about each of your
- requests.') %>
-
<%= raw(_('Privacy note: If you want to request private information about
+ yourself then click here.') % [help_requesting_path+"#data_protection"]) %>
+
+
<%= raw(_('Privacy note: If you want to request private information about
- yourself then click here.') % [help_requesting_path+"#data_protection"]) %>
-
-
+ <%= raw(_('First, type in the name of the UK public authority you\'d
+ like information from. By law, they have to respond
+ (why?).') % [help_about_url, "whybother_them"]) %>
+
- <%= raw(_('First, type in the name of the UK public authority you\'d
- like information from. By law, they have to respond
- (why?).') % [help_about_url, "whybother_them"]) %>
-
- <% if !@xapian_requests.nil? %>
- <% if @xapian_requests.results.size > 0 %>
-
<%= _('Top search results:') %>
-
- <%= _('Select one to see more information about the authority.')%>
-
- <% else %>
-
<%= _('No results found.') %>
- <% end %>
-
- <% for result in @xapian_requests.results %>
- <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %>
- <% end %>
-
-
- <% end %>
-
-
-
-
-
-
-
-
-
diff --git a/app/views/request/show.html.erb b/app/views/request/show.html.erb
new file mode 100644
index 000000000..fa75a6529
--- /dev/null
+++ b/app/views/request/show.html.erb
@@ -0,0 +1,149 @@
+<% @title = _("{{title}} - a Freedom of Information request to {{public_body}}",
+ :title => h(@info_request.title),
+ :public_body => (@info_request.public_body.name)) %>
+
+<% if @info_request.prominence == 'hidden' %>
+
+ <%= _('This request has prominence \'hidden\'. You can only see it because you are logged
+ in as a super user.') %>
+
+<% end %>
+<% if @info_request.prominence == 'requester_only' %>
+
+ <%= raw(_('This request is hidden, so that only you the requester can see it. Please
+ contact us if you are not sure why.') % [help_requesting_path]) %>
+
+<% end %>
+
+
+<% if ( @update_status || @info_request.awaiting_description ) && ! @info_request.is_external? %>
+
+ <% if @info_request.awaiting_description %>
+ <% if @is_owning_user && !@info_request.is_external? %>
+ <%= _('Please answer the question above so we know whether the ')%>
+ <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> <%= _('useful information.') %>
+ <% else %>
+ <%= _('This request has an unknown status.') %>
+ <% if @old_unclassified %>
+ <%= _('We\'re waiting for someone to read') %>
+ <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
+ <%= _('and update the status accordingly. Perhaps you might like to help out by doing that?') %>
+ <% else %>
+ <%= _('We\'re waiting for') %>
+ <%= user_link_for_request(@info_request) %> <%= _('to read') %>
+ <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
+ <%= _('and update the status.') %>
+ <% end %>
+ <% end %>
+ <% elsif @status == 'waiting_response' %>
+ <%= _('Currently waiting for a response from {{public_body_link}}, they must respond promptly and', :public_body_link=> public_body_link(@info_request.public_body)) %>
+ <% if @info_request.public_body.is_school? %>
+ <%= _('in term time') %>
+ <% else %>
+ <%= _('normally') %>
+ <% end %>
+ <%= _('no later than') %> <%= simple_date(@info_request.date_response_required_by) %>
+ (<%= link_to _("details"), "/help/requesting#quickly_response" %>).
+ <% elsif @status == 'waiting_response_overdue' %>
+ <%= _('Response to this request is delayed.') %>
+ <%= _('By law, {{public_body_link}} should normally have responded promptly and',:public_body_link=>public_body_link(@info_request.public_body)) %>
+ <% if @info_request.public_body.is_school? %>
+ <%= _('in term time') %>
+ <% end %>
+ <%= _('by') %> <%= simple_date(@info_request.date_response_required_by) %>
+ (<%= raw(_('details') % [help_requesting_path + '#quickly_response']) %>)
+ <% elsif @status == 'waiting_response_very_overdue' %>
+ <%= _('Response to this request is long overdue.') %>
+ <%= _('By law, under all circumstances, {{public_body_link}} should have responded by now',:public_body_link => public_body_link(@info_request.public_body)) %>
+ (<%= raw(_('details') % [help_requesting_path + '#quickly_response']) %>).
+ <% if !@info_request.is_external? %>
+ <%= _('You can complain by') %>
+ <%= link_to _("requesting an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>.
+ <% end %>
+ <% elsif @status == 'not_held' %>
+ <%= public_body_link(@info_request.public_body) %> <%= _('did not have the information requested.') %>
+ <% elsif @status == 'rejected' %>
+ <%= _('The request was refused by') %> <%= public_body_link(@info_request.public_body) %>.
+ <% elsif @status == 'successful' %>
+ <%= _('The request was successful.') %>
+ <% elsif @status == 'partially_successful' %>
+ <%= _('The request was partially successful.') %>
+ <% elsif @status == 'waiting_clarification' %>
+ <% if @is_owning_user && !@info_request.is_external? %>
+ <%=h @info_request.public_body.name %> <%= _('is waiting for your clarification.') %>
+ <%= _('Please') %>
+ <%= link_to _("send a follow up message"), respond_to_last_url(@info_request) + '#followup' %>.
+ <% else %>
+ <%= _('The request is waiting for clarification.') %>
+ <% if !@info_request.is_external? %>
+ <%= _('If you are {{user_link}}, please',:user_link=>user_link_for_request(@info_request)) %>
+ <%= link_to _("sign in"), signin_url(:r => request.fullpath) %> <%= _('to send a follow up message.') %>
+ <% end %>
+ <% end %>
+ <% elsif @status == 'gone_postal' %>
+ <%= _('The authority would like to / has responded by post to this request.') %>
+ <% elsif @status == 'internal_review' %>
+ <%= _('Waiting for an internal review by {{public_body_link}} of their handling of this request.',:public_body_link=>public_body_link(@info_request.public_body)) %>
+ <% elsif @status == 'error_message' %>
+ <%= _('There was a delivery error or similar, which needs fixing by the {{site_name}} team.', :site_name=>site_name) %>
+ <% elsif @status == 'requires_admin' %>
+ <%= _('This request has had an unusual response, and requires attention from the {{site_name}} team.', :site_name=>site_name) %>
+ <% elsif @status == 'user_withdrawn' %>
+ <%= _('This request has been withdrawn by the person who made it.
+ There may be an explanation in the correspondence below.') %>
+ <% elsif @status == 'attention_requested' %>
+ <%= _('This request has been reported as needing administrator attention (perhaps because it is vexatious, or a request for personal information)') %>
+ <% elsif @status == 'vexatious' %>
+ <%= _('This request has been hidden from the site, because an administrator considers it vexatious') %>
+ <% elsif @status == 'not_foi' %>
+ <%= _('This request has been hidden from the site, because an administrator considers it not to be an FOI request') %>
+ <% else %>
+ <%= render :partial => 'general/custom_state_descriptions', :locals => { :status => @status } %>
+ <% end %>
+
+
+ <% for info_request_event in @info_request_events %>
+ <% if info_request_event.visible %>
+ <%= render :partial => 'correspondence', :locals => { :info_request_event => info_request_event } %>
+ <% end %>
+ <% end %>
+
+ <% if @info_request.awaiting_description && ! @info_request.is_external? %>
+
+
+<%= render :partial => 'sidebar' %>
diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml
deleted file mode 100644
index fa75a6529..000000000
--- a/app/views/request/show.rhtml
+++ /dev/null
@@ -1,149 +0,0 @@
-<% @title = _("{{title}} - a Freedom of Information request to {{public_body}}",
- :title => h(@info_request.title),
- :public_body => (@info_request.public_body.name)) %>
-
-<% if @info_request.prominence == 'hidden' %>
-
- <%= _('This request has prominence \'hidden\'. You can only see it because you are logged
- in as a super user.') %>
-
-<% end %>
-<% if @info_request.prominence == 'requester_only' %>
-
- <%= raw(_('This request is hidden, so that only you the requester can see it. Please
- contact us if you are not sure why.') % [help_requesting_path]) %>
-
-<% end %>
-
-
-<% if ( @update_status || @info_request.awaiting_description ) && ! @info_request.is_external? %>
-
- <% if @info_request.awaiting_description %>
- <% if @is_owning_user && !@info_request.is_external? %>
- <%= _('Please answer the question above so we know whether the ')%>
- <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> <%= _('useful information.') %>
- <% else %>
- <%= _('This request has an unknown status.') %>
- <% if @old_unclassified %>
- <%= _('We\'re waiting for someone to read') %>
- <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
- <%= _('and update the status accordingly. Perhaps you might like to help out by doing that?') %>
- <% else %>
- <%= _('We\'re waiting for') %>
- <%= user_link_for_request(@info_request) %> <%= _('to read') %>
- <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
- <%= _('and update the status.') %>
- <% end %>
- <% end %>
- <% elsif @status == 'waiting_response' %>
- <%= _('Currently waiting for a response from {{public_body_link}}, they must respond promptly and', :public_body_link=> public_body_link(@info_request.public_body)) %>
- <% if @info_request.public_body.is_school? %>
- <%= _('in term time') %>
- <% else %>
- <%= _('normally') %>
- <% end %>
- <%= _('no later than') %> <%= simple_date(@info_request.date_response_required_by) %>
- (<%= link_to _("details"), "/help/requesting#quickly_response" %>).
- <% elsif @status == 'waiting_response_overdue' %>
- <%= _('Response to this request is delayed.') %>
- <%= _('By law, {{public_body_link}} should normally have responded promptly and',:public_body_link=>public_body_link(@info_request.public_body)) %>
- <% if @info_request.public_body.is_school? %>
- <%= _('in term time') %>
- <% end %>
- <%= _('by') %> <%= simple_date(@info_request.date_response_required_by) %>
- (<%= raw(_('details') % [help_requesting_path + '#quickly_response']) %>)
- <% elsif @status == 'waiting_response_very_overdue' %>
- <%= _('Response to this request is long overdue.') %>
- <%= _('By law, under all circumstances, {{public_body_link}} should have responded by now',:public_body_link => public_body_link(@info_request.public_body)) %>
- (<%= raw(_('details') % [help_requesting_path + '#quickly_response']) %>).
- <% if !@info_request.is_external? %>
- <%= _('You can complain by') %>
- <%= link_to _("requesting an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>.
- <% end %>
- <% elsif @status == 'not_held' %>
- <%= public_body_link(@info_request.public_body) %> <%= _('did not have the information requested.') %>
- <% elsif @status == 'rejected' %>
- <%= _('The request was refused by') %> <%= public_body_link(@info_request.public_body) %>.
- <% elsif @status == 'successful' %>
- <%= _('The request was successful.') %>
- <% elsif @status == 'partially_successful' %>
- <%= _('The request was partially successful.') %>
- <% elsif @status == 'waiting_clarification' %>
- <% if @is_owning_user && !@info_request.is_external? %>
- <%=h @info_request.public_body.name %> <%= _('is waiting for your clarification.') %>
- <%= _('Please') %>
- <%= link_to _("send a follow up message"), respond_to_last_url(@info_request) + '#followup' %>.
- <% else %>
- <%= _('The request is waiting for clarification.') %>
- <% if !@info_request.is_external? %>
- <%= _('If you are {{user_link}}, please',:user_link=>user_link_for_request(@info_request)) %>
- <%= link_to _("sign in"), signin_url(:r => request.fullpath) %> <%= _('to send a follow up message.') %>
- <% end %>
- <% end %>
- <% elsif @status == 'gone_postal' %>
- <%= _('The authority would like to / has responded by post to this request.') %>
- <% elsif @status == 'internal_review' %>
- <%= _('Waiting for an internal review by {{public_body_link}} of their handling of this request.',:public_body_link=>public_body_link(@info_request.public_body)) %>
- <% elsif @status == 'error_message' %>
- <%= _('There was a delivery error or similar, which needs fixing by the {{site_name}} team.', :site_name=>site_name) %>
- <% elsif @status == 'requires_admin' %>
- <%= _('This request has had an unusual response, and requires attention from the {{site_name}} team.', :site_name=>site_name) %>
- <% elsif @status == 'user_withdrawn' %>
- <%= _('This request has been withdrawn by the person who made it.
- There may be an explanation in the correspondence below.') %>
- <% elsif @status == 'attention_requested' %>
- <%= _('This request has been reported as needing administrator attention (perhaps because it is vexatious, or a request for personal information)') %>
- <% elsif @status == 'vexatious' %>
- <%= _('This request has been hidden from the site, because an administrator considers it vexatious') %>
- <% elsif @status == 'not_foi' %>
- <%= _('This request has been hidden from the site, because an administrator considers it not to be an FOI request') %>
- <% else %>
- <%= render :partial => 'general/custom_state_descriptions', :locals => { :status => @status } %>
- <% end %>
-
-
- <% for info_request_event in @info_request_events %>
- <% if info_request_event.visible %>
- <%= render :partial => 'correspondence', :locals => { :info_request_event => info_request_event } %>
- <% end %>
- <% end %>
-
- <% if @info_request.awaiting_description && ! @info_request.is_external? %>
-
+ <%= _('The authority only has a paper copy of the information.') %>
+
+
+ <%= raw(_('At the bottom of this page, write a reply to them trying to persuade them to scan it in
+ (more details).') % [help_privacy_path + '#postal_answer']) %>
+
+
+
+ <%= _('You want to give your postal address to the authority in private.') %>
+
+
+ <%= _('To do that please send a private email to ') %><%=h(@postal_email_name)%>
+ <<%=link_to h(@postal_email), "mailto:" + @postal_email%>>
+ <%= _('containing your postal address, and asking them to reply to this request.
+ Or you could phone them.') %>
+
+ <%= _('When you receive the paper response, please help
+ others find out what it says:') %>
+
+
<%= _('Add an annotation to your request with choice quotes, or
+ a summary of the response.') %>
+
<%= _('If you can, scan in or photograph the response, and send us
+ a copy to upload.') %>
+
+
+
+
+
+<% end %>
+
+
+ <% if !@incoming_message.nil? %>
+ <% if @is_owning_user %>
+ <% if @incoming_message.recently_arrived %>
+
<%= _('New response to your request') %> '<%= request_link @info_request %>'
+ <% else %>
+
<%= _('Response to your request') %> '<%= request_link @info_request %>'
+ <% end %>
+ <% else %>
+ <% if @incoming_message.recently_arrived %>
+
- <%= _('The authority only has a paper copy of the information.') %>
-
-
- <%= raw(_('At the bottom of this page, write a reply to them trying to persuade them to scan it in
- (more details).') % [help_privacy_path + '#postal_answer']) %>
-
-
-
- <%= _('You want to give your postal address to the authority in private.') %>
-
-
- <%= _('To do that please send a private email to ') %><%=h(@postal_email_name)%>
- <<%=link_to h(@postal_email), "mailto:" + @postal_email%>>
- <%= _('containing your postal address, and asking them to reply to this request.
- Or you could phone them.') %>
-
- <%= _('When you receive the paper response, please help
- others find out what it says:') %>
-
-
<%= _('Add an annotation to your request with choice quotes, or
- a summary of the response.') %>
-
<%= _('If you can, scan in or photograph the response, and send us
- a copy to upload.') %>
-
-
-
-
-
-<% end %>
-
-
- <% if !@incoming_message.nil? %>
- <% if @is_owning_user %>
- <% if @incoming_message.recently_arrived %>
-
<%= _('New response to your request') %> '<%= request_link @info_request %>'
- <% else %>
-
<%= _('Response to your request') %> '<%= request_link @info_request %>'
- <% end %>
- <% else %>
- <% if @incoming_message.recently_arrived %>
-
-
diff --git a/app/views/request/similar.html.erb b/app/views/request/similar.html.erb
new file mode 100644
index 000000000..0d53f6919
--- /dev/null
+++ b/app/views/request/similar.html.erb
@@ -0,0 +1,23 @@
+<% @title = "Requests similar to '" + h(@info_request.title) + "'" + @page_desc %>
+
<%="Requests similar to '" + request_link(@info_request) + "'" + @page_desc %>
+
+
+
+<% if @xapian_object.results.empty? %>
+
<%= _('No similar requests found.')%>
+<% else %>
+
+ <% for result in @xapian_object.results %>
+ <% if result[:model].class.to_s == 'InfoRequestEvent' %>
+ <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
+ <% else %>
+
<%= _('Unexpected search result type ')%><%=result[:model].class.to_s%>
+ <% end %>
+ <% end %>
+<% end %>
+
+<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @show_no_more_than) %>
diff --git a/app/views/request/similar.rhtml b/app/views/request/similar.rhtml
deleted file mode 100644
index 0d53f6919..000000000
--- a/app/views/request/similar.rhtml
+++ /dev/null
@@ -1,23 +0,0 @@
-<% @title = "Requests similar to '" + h(@info_request.title) + "'" + @page_desc %>
-
<%="Requests similar to '" + request_link(@info_request) + "'" + @page_desc %>
-
-
-
-<% if @xapian_object.results.empty? %>
-
<%= _('No similar requests found.')%>
-<% else %>
-
- <% for result in @xapian_object.results %>
- <% if result[:model].class.to_s == 'InfoRequestEvent' %>
- <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
- <% else %>
-
<%= _('Unexpected search result type ')%><%=result[:model].class.to_s%>
- <% end %>
- <% end %>
-<% end %>
-
-<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @show_no_more_than) %>
diff --git a/app/views/request/simple_correspondence.html.erb b/app/views/request/simple_correspondence.html.erb
new file mode 100644
index 000000000..0da9ef172
--- /dev/null
+++ b/app/views/request/simple_correspondence.html.erb
@@ -0,0 +1,45 @@
+<%= _('This is a plain-text version of the Freedom of Information request "{{request_title}}". The latest, full version is available online at {{full_url}}', :request_title => @info_request.title, :full_url => "http://#{Configuration::domain}#{show_request_path(:url_title=>@info_request.url_title)}") %>.
+
+<% for info_request_event in @info_request_events %>
+<%
+ incoming_message = nil
+ if info_request_event.visible
+ if !info_request_event.nil? && info_request_event.event_type == 'response'
+ incoming_message = info_request_event.incoming_message
+ end
+
+
+ if not incoming_message.nil?
+ if !incoming_message.safe_mail_from.nil? && incoming_message.safe_mail_from.strip != @info_request.public_body.name.strip %>
+<%= _('From:') %> <%= incoming_message.safe_mail_from %><% end
+ if incoming_message.safe_mail_from.nil? || (incoming_message.mail_from_domain == @info_request.public_body.request_email_domain) %>, <%= @info_request.public_body.name %><% end %>
+<%= _('To:') %> <% if @info_request.user_name %><%= @info_request.user_name %><% else %><%= "[#{_('An anonymous user')}]"%><% end %>
+<%= _('Date:') %> <%= simple_date(incoming_message.sent_at) %>
+
+<%= incoming_message.get_body_for_quoting %>
+<% incoming_message.get_attachments_for_display.each do |a| %>
+ <%= _('Attachment:') %> <%= a.display_filename %> (<%= a.display_size %>)
+ <% end %>
+<%
+elsif [ 'sent', 'followup_sent' ].include?(info_request_event.event_type)
+ outgoing_message = info_request_event.outgoing_message
+ %>
+<%= _('From:') %> <% if @info_request.user_name %><%= @info_request.user_name %><% else %><%= "[#{_('An anonymous user')}]"%><% end %>
+<%= _('To:') %> <%= @info_request.public_body.name %>
+<%= _('Date:') %> <%= simple_date(info_request_event.created_at) %>
+<%
+ text = outgoing_message.body.strip
+ outgoing_message.remove_privacy_sensitive_things!(text) %>
+
+<%= text %>
+<% elsif [ 'resent', 'followup_resent' ].include?(info_request_event.event_type) %>
+<%= _('Date:') %> <%= simple_date(info_request_event.created_at) %>
+Sent <% if info_request_event.outgoing_message.message_type == 'initial_request' %> request <% elsif info_request_event.outgoing_message.message_type == 'followup' %> a follow up <% else %> <% raise "unknown message_type" %><% end %> to <%= public_body_link(@info_request.public_body) %> again<% if not info_request_event.same_email_as_previous_send? %>, using a new contact address<% end %>.
+
+<% elsif info_request_event.event_type == 'comment'
+ comment = info_request_event.comment
+%>
+<%= _("{{username}} left an annotation:", :username =>comment.user.name) %> (<%= simple_date(comment.created_at || Time.now) %>)
+<%= comment.body.strip %>
+<% end %>
+-------------------------------<% end %><% end %>
diff --git a/app/views/request/simple_correspondence.rhtml b/app/views/request/simple_correspondence.rhtml
deleted file mode 100644
index 0da9ef172..000000000
--- a/app/views/request/simple_correspondence.rhtml
+++ /dev/null
@@ -1,45 +0,0 @@
-<%= _('This is a plain-text version of the Freedom of Information request "{{request_title}}". The latest, full version is available online at {{full_url}}', :request_title => @info_request.title, :full_url => "http://#{Configuration::domain}#{show_request_path(:url_title=>@info_request.url_title)}") %>.
-
-<% for info_request_event in @info_request_events %>
-<%
- incoming_message = nil
- if info_request_event.visible
- if !info_request_event.nil? && info_request_event.event_type == 'response'
- incoming_message = info_request_event.incoming_message
- end
-
-
- if not incoming_message.nil?
- if !incoming_message.safe_mail_from.nil? && incoming_message.safe_mail_from.strip != @info_request.public_body.name.strip %>
-<%= _('From:') %> <%= incoming_message.safe_mail_from %><% end
- if incoming_message.safe_mail_from.nil? || (incoming_message.mail_from_domain == @info_request.public_body.request_email_domain) %>, <%= @info_request.public_body.name %><% end %>
-<%= _('To:') %> <% if @info_request.user_name %><%= @info_request.user_name %><% else %><%= "[#{_('An anonymous user')}]"%><% end %>
-<%= _('Date:') %> <%= simple_date(incoming_message.sent_at) %>
-
-<%= incoming_message.get_body_for_quoting %>
-<% incoming_message.get_attachments_for_display.each do |a| %>
- <%= _('Attachment:') %> <%= a.display_filename %> (<%= a.display_size %>)
- <% end %>
-<%
-elsif [ 'sent', 'followup_sent' ].include?(info_request_event.event_type)
- outgoing_message = info_request_event.outgoing_message
- %>
-<%= _('From:') %> <% if @info_request.user_name %><%= @info_request.user_name %><% else %><%= "[#{_('An anonymous user')}]"%><% end %>
-<%= _('To:') %> <%= @info_request.public_body.name %>
-<%= _('Date:') %> <%= simple_date(info_request_event.created_at) %>
-<%
- text = outgoing_message.body.strip
- outgoing_message.remove_privacy_sensitive_things!(text) %>
-
-<%= text %>
-<% elsif [ 'resent', 'followup_resent' ].include?(info_request_event.event_type) %>
-<%= _('Date:') %> <%= simple_date(info_request_event.created_at) %>
-Sent <% if info_request_event.outgoing_message.message_type == 'initial_request' %> request <% elsif info_request_event.outgoing_message.message_type == 'followup' %> a follow up <% else %> <% raise "unknown message_type" %><% end %> to <%= public_body_link(@info_request.public_body) %> again<% if not info_request_event.same_email_as_previous_send? %>, using a new contact address<% end %>.
-
-<% elsif info_request_event.event_type == 'comment'
- comment = info_request_event.comment
-%>
-<%= _("{{username}} left an annotation:", :username =>comment.user.name) %> (<%= simple_date(comment.created_at || Time.now) %>)
-<%= comment.body.strip %>
-<% end %>
--------------------------------<% end %><% end %>
diff --git a/app/views/request/upload_response.html.erb b/app/views/request/upload_response.html.erb
new file mode 100644
index 000000000..158d5d3c4
--- /dev/null
+++ b/app/views/request/upload_response.html.erb
@@ -0,0 +1,52 @@
+<% @title = "Respond to the FOI request '" + h(@info_request.title) + "' made by " + h(@info_request.user_name) %>
+
+<% if @info_request.is_external? %>
+
+
<%= _('This request was not made via {{site_name}}', :site_name => site_name) %>
+
<%= _('Sorry - you cannot respond to this request via {{site_name}}, because this is a copy of the request originally at {{link_to_original_request}}.', :site_name => site_name, :link_to_original_request => link_to(@info_request.external_url, @info_request.external_url)) %>
<%= _('Respond to the FOI request')%> '<%=request_link(@info_request)%>'<% _(' made by ')%><%=user_link(@info_request.user) %>
+
+
+ <%= raw(_('Your response will appear on the Internet, read why and answers to other questions.') % [help_officers_path]) %>
+
+
+
<%= _('Respond by email')%>
+
+
<%= _('You should have received a copy of the request by email, and you can respond
+ by simply replying to that email. For your convenience, here is the address:')%>
+ <%=h @info_request.incoming_email%>.
+ <%= _('You may include attachments. If you would like to attach a
+ file too large for email, use the form below.')%>
+
+
+
+
<%= _('Respond using the web')%>
+
+
<%= raw(_('Enter your response below. You may attach one file (use email, or
+ contact us if you need more).')% [help_contact_path]) %>
+ <%= hidden_field_tag 'submitted_upload_response', 1 %>
+ <%= submit_tag _("Upload FOI response") %>
+ <%= _(' (patience, especially for large files, it may take a while!)')%>
+
+ <% end %>
+<% end %>
+
+
diff --git a/app/views/request/upload_response.rhtml b/app/views/request/upload_response.rhtml
deleted file mode 100644
index 158d5d3c4..000000000
--- a/app/views/request/upload_response.rhtml
+++ /dev/null
@@ -1,52 +0,0 @@
-<% @title = "Respond to the FOI request '" + h(@info_request.title) + "' made by " + h(@info_request.user_name) %>
-
-<% if @info_request.is_external? %>
-
-
<%= _('This request was not made via {{site_name}}', :site_name => site_name) %>
-
<%= _('Sorry - you cannot respond to this request via {{site_name}}, because this is a copy of the request originally at {{link_to_original_request}}.', :site_name => site_name, :link_to_original_request => link_to(@info_request.external_url, @info_request.external_url)) %>
<%= _('Respond to the FOI request')%> '<%=request_link(@info_request)%>'<% _(' made by ')%><%=user_link(@info_request.user) %>
-
-
- <%= raw(_('Your response will appear on the Internet, read why and answers to other questions.') % [help_officers_path]) %>
-
-
-
<%= _('Respond by email')%>
-
-
<%= _('You should have received a copy of the request by email, and you can respond
- by simply replying to that email. For your convenience, here is the address:')%>
- <%=h @info_request.incoming_email%>.
- <%= _('You may include attachments. If you would like to attach a
- file too large for email, use the form below.')%>
-
-
-
-
<%= _('Respond using the web')%>
-
-
<%= raw(_('Enter your response below. You may attach one file (use email, or
- contact us if you need more).')% [help_contact_path]) %>
- <%= hidden_field_tag 'submitted_upload_response', 1 %>
- <%= submit_tag _("Upload FOI response") %>
- <%= _(' (patience, especially for large files, it may take a while!)')%>
-
- <% end %>
-<% end %>
-
-
diff --git a/app/views/request_game/play.html.erb b/app/views/request_game/play.html.erb
new file mode 100644
index 000000000..eedf19ca2
--- /dev/null
+++ b/app/views/request_game/play.html.erb
@@ -0,0 +1,46 @@
+<% @title = _("Play the request categorisation game!") %>
+
+
+
+
+ <%=pluralize(@missing, 'request')%> left to categorise / <%=@total %> total
+
+
Top recent players
+
+ <% c = 0; for classifications in @league_table_28_days %>
+
<%= _("Some people who've made requests haven't let us know whether they were
+successful or not. We need your help –
+choose one of these requests, read it, and let everyone know whether or not the
+information has been provided. Everyone'll be exceedingly grateful.")%>
+<% for info_request in @requests %>
+ <%= render :partial => 'request/request_listing_single', :locals => { :info_request => info_request } %>
+<% end %>
+
+<%= button_to _('I don\'t like these ones — give me some more!'), play_url %>
+<%= button_to _('I don\'t want to do any more tidying now!'), stop_url %>
+
+
<%= _('Thanks for helping - your work will make it easier for everyone to find successful
+responses, and maybe even let us make league tables...')%>
<%= _("Some people who've made requests haven't let us know whether they were
-successful or not. We need your help –
-choose one of these requests, read it, and let everyone know whether or not the
-information has been provided. Everyone'll be exceedingly grateful.")%>
-<% for info_request in @requests %>
- <%= render :partial => 'request/request_listing_single', :locals => { :info_request => info_request } %>
-<% end %>
-
-<%= button_to _('I don\'t like these ones — give me some more!'), play_url %>
-<%= button_to _('I don\'t want to do any more tidying now!'), stop_url %>
-
-
<%= _('Thanks for helping - your work will make it easier for everyone to find successful
-responses, and maybe even let us make league tables...')%>
-
-
-
diff --git a/app/views/request_mailer/comment_on_alert.html.erb b/app/views/request_mailer/comment_on_alert.html.erb
new file mode 100644
index 000000000..691e6f9bb
--- /dev/null
+++ b/app/views/request_mailer/comment_on_alert.html.erb
@@ -0,0 +1,6 @@
+<%= _('{{user_name}} has annotated your {{law_used_short}}
+request. Follow this link to see what they wrote.',:user_name=>@comment.user.name,:law_used_short=>@info_request.law_used_short) %>
+
+<%=@url%>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/comment_on_alert.rhtml b/app/views/request_mailer/comment_on_alert.rhtml
deleted file mode 100644
index 691e6f9bb..000000000
--- a/app/views/request_mailer/comment_on_alert.rhtml
+++ /dev/null
@@ -1,6 +0,0 @@
-<%= _('{{user_name}} has annotated your {{law_used_short}}
-request. Follow this link to see what they wrote.',:user_name=>@comment.user.name,:law_used_short=>@info_request.law_used_short) %>
-
-<%=@url%>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/comment_on_alert_plural.html.erb b/app/views/request_mailer/comment_on_alert_plural.html.erb
new file mode 100644
index 000000000..a495b8e08
--- /dev/null
+++ b/app/views/request_mailer/comment_on_alert_plural.html.erb
@@ -0,0 +1,7 @@
+<%= _('There are {{count}} new annotations on your {{info_request}} request. Follow this link to see what they wrote.',:count=>@count,:info_request=>@info_request.law_used_short)%>
+
+<%=@url%>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
+
+
diff --git a/app/views/request_mailer/comment_on_alert_plural.rhtml b/app/views/request_mailer/comment_on_alert_plural.rhtml
deleted file mode 100644
index a495b8e08..000000000
--- a/app/views/request_mailer/comment_on_alert_plural.rhtml
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= _('There are {{count}} new annotations on your {{info_request}} request. Follow this link to see what they wrote.',:count=>@count,:info_request=>@info_request.law_used_short)%>
-
-<%=@url%>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
-
-
diff --git a/app/views/request_mailer/external_response.html.erb b/app/views/request_mailer/external_response.html.erb
new file mode 100644
index 000000000..fab256adf
--- /dev/null
+++ b/app/views/request_mailer/external_response.html.erb
@@ -0,0 +1 @@
+<%= @message_body %>
diff --git a/app/views/request_mailer/external_response.rhtml b/app/views/request_mailer/external_response.rhtml
deleted file mode 100644
index fab256adf..000000000
--- a/app/views/request_mailer/external_response.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= @message_body %>
diff --git a/app/views/request_mailer/fake_response.html.erb b/app/views/request_mailer/fake_response.html.erb
new file mode 100644
index 000000000..fab256adf
--- /dev/null
+++ b/app/views/request_mailer/fake_response.html.erb
@@ -0,0 +1 @@
+<%= @message_body %>
diff --git a/app/views/request_mailer/fake_response.rhtml b/app/views/request_mailer/fake_response.rhtml
deleted file mode 100644
index fab256adf..000000000
--- a/app/views/request_mailer/fake_response.rhtml
+++ /dev/null
@@ -1 +0,0 @@
-<%= @message_body %>
diff --git a/app/views/request_mailer/new_response.html.erb b/app/views/request_mailer/new_response.html.erb
new file mode 100644
index 000000000..083f873b4
--- /dev/null
+++ b/app/views/request_mailer/new_response.html.erb
@@ -0,0 +1,17 @@
+<%= _('You have a new response to the {{law_used_full}} request ',:law_used_full=>@info_request.law_used_full)%>
+'<%= @info_request.title %>' <%=_('that you made to')%>
+<%= @info_request.public_body.name %>.
+
+<%= _('To view the response, click on the link below.')%>
+
+<%=@url%>
+
+<%= _('When you get there, please update the status to say if the response
+contains any useful information.' )%>
+
+<%= _('Although all responses are automatically published, we depend on
+you, the original requester, to evaluate them.')%>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
+
+
diff --git a/app/views/request_mailer/new_response.rhtml b/app/views/request_mailer/new_response.rhtml
deleted file mode 100644
index 083f873b4..000000000
--- a/app/views/request_mailer/new_response.rhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-<%= _('You have a new response to the {{law_used_full}} request ',:law_used_full=>@info_request.law_used_full)%>
-'<%= @info_request.title %>' <%=_('that you made to')%>
-<%= @info_request.public_body.name %>.
-
-<%= _('To view the response, click on the link below.')%>
-
-<%=@url%>
-
-<%= _('When you get there, please update the status to say if the response
-contains any useful information.' )%>
-
-<%= _('Although all responses are automatically published, we depend on
-you, the original requester, to evaluate them.')%>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
-
-
diff --git a/app/views/request_mailer/new_response_reminder_alert.html.erb b/app/views/request_mailer/new_response_reminder_alert.html.erb
new file mode 100644
index 000000000..86fc71de7
--- /dev/null
+++ b/app/views/request_mailer/new_response_reminder_alert.html.erb
@@ -0,0 +1,10 @@
+<%=_('To let everyone know, follow this link and then select the appropriate box.')%>
+
+<%=@url%>
+
+<%= _('Your request was called {{info_request}}. Letting everyone know whether you got the information will help us keep tabs on',:info_request=>@info_request.title)%>
+<%= @info_request.public_body.name %>.
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
+
+
diff --git a/app/views/request_mailer/new_response_reminder_alert.rhtml b/app/views/request_mailer/new_response_reminder_alert.rhtml
deleted file mode 100644
index 86fc71de7..000000000
--- a/app/views/request_mailer/new_response_reminder_alert.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<%=_('To let everyone know, follow this link and then select the appropriate box.')%>
-
-<%=@url%>
-
-<%= _('Your request was called {{info_request}}. Letting everyone know whether you got the information will help us keep tabs on',:info_request=>@info_request.title)%>
-<%= @info_request.public_body.name %>.
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
-
-
diff --git a/app/views/request_mailer/not_clarified_alert.html.erb b/app/views/request_mailer/not_clarified_alert.html.erb
new file mode 100644
index 000000000..2408452b3
--- /dev/null
+++ b/app/views/request_mailer/not_clarified_alert.html.erb
@@ -0,0 +1,11 @@
+<%= _('{{public_body}} has asked you to explain part of your {{law_used}} request.',
+ :public_body => @info_request.public_body.name,
+ :law_used => @info_request.law_used_short ) %>
+<%= _('To do this, first click on the link below.') %>
+
+<%=@url%>
+
+<%= _('You will only get an answer to your request if you follow up
+with the clarification.')%>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/not_clarified_alert.rhtml b/app/views/request_mailer/not_clarified_alert.rhtml
deleted file mode 100644
index 2408452b3..000000000
--- a/app/views/request_mailer/not_clarified_alert.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= _('{{public_body}} has asked you to explain part of your {{law_used}} request.',
- :public_body => @info_request.public_body.name,
- :law_used => @info_request.law_used_short ) %>
-<%= _('To do this, first click on the link below.') %>
-
-<%=@url%>
-
-<%= _('You will only get an answer to your request if you follow up
-with the clarification.')%>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/old_unclassified_updated.html.erb b/app/views/request_mailer/old_unclassified_updated.html.erb
new file mode 100644
index 000000000..5b8534832
--- /dev/null
+++ b/app/views/request_mailer/old_unclassified_updated.html.erb
@@ -0,0 +1,9 @@
+<%= _('To help us keep the site tidy, someone else has updated the status of the
+{{law_used_full}} request {{title}} that you made to {{public_body}}, to "{{display_status}}" If you disagree with their categorisation, please update the status again yourself to what you believe to be more accurate.',:law_used_full=>@info_request.law_used_full,:title=>@info_request.title, :public_body=>@info_request.public_body.name,:display_status=>@info_request.display_status.downcase)%>
+
+<%=_('Follow this link to see the request:')%>
+
+<%= @url %>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
+
diff --git a/app/views/request_mailer/old_unclassified_updated.rhtml b/app/views/request_mailer/old_unclassified_updated.rhtml
deleted file mode 100644
index 5b8534832..000000000
--- a/app/views/request_mailer/old_unclassified_updated.rhtml
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= _('To help us keep the site tidy, someone else has updated the status of the
-{{law_used_full}} request {{title}} that you made to {{public_body}}, to "{{display_status}}" If you disagree with their categorisation, please update the status again yourself to what you believe to be more accurate.',:law_used_full=>@info_request.law_used_full,:title=>@info_request.title, :public_body=>@info_request.public_body.name,:display_status=>@info_request.display_status.downcase)%>
-
-<%=_('Follow this link to see the request:')%>
-
-<%= @url %>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
-
diff --git a/app/views/request_mailer/overdue_alert.html.erb b/app/views/request_mailer/overdue_alert.html.erb
new file mode 100644
index 000000000..b8a9ba525
--- /dev/null
+++ b/app/views/request_mailer/overdue_alert.html.erb
@@ -0,0 +1,11 @@
+<%= @info_request.public_body.name %> <%= _('have delayed.')%>
+
+<%= _('They have not replied to your {{law_used_short}} request {{title}} promptly, as normally required by law',:law_used_short=>@info_request.law_used_short,:title=>@info_request.title)%><% if @info_request.public_body.is_school? %> <%=_('during term time')%> <% end %>.
+
+<%= _('Click on the link below to send a message to {{public_body}} reminding them to reply to your request.',:public_body=>@info_request.public_body.name)%>
+
+<%=@url%>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
+
+
diff --git a/app/views/request_mailer/overdue_alert.rhtml b/app/views/request_mailer/overdue_alert.rhtml
deleted file mode 100644
index b8a9ba525..000000000
--- a/app/views/request_mailer/overdue_alert.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= @info_request.public_body.name %> <%= _('have delayed.')%>
-
-<%= _('They have not replied to your {{law_used_short}} request {{title}} promptly, as normally required by law',:law_used_short=>@info_request.law_used_short,:title=>@info_request.title)%><% if @info_request.public_body.is_school? %> <%=_('during term time')%> <% end %>.
-
-<%= _('Click on the link below to send a message to {{public_body}} reminding them to reply to your request.',:public_body=>@info_request.public_body.name)%>
-
-<%=@url%>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
-
-
diff --git a/app/views/request_mailer/requires_admin.html.erb b/app/views/request_mailer/requires_admin.html.erb
new file mode 100644
index 000000000..06a798792
--- /dev/null
+++ b/app/views/request_mailer/requires_admin.html.erb
@@ -0,0 +1,11 @@
+---------------------------------------------------------------------
+<%=@reported_by.name%> <%= _('has reported an')%> <%=@info_request.law_used_short%>
+<%= _('response as needing administrator attention. Take a look, and reply to this
+email to let them know what you are going to do about it.')%>
+
+Request '<%=@info_request.title%>':
+<%= @url %>
+
+<%= _('Administration URL:') %>
+<%= @admin_url %>
+---------------------------------------------------------------------
diff --git a/app/views/request_mailer/requires_admin.rhtml b/app/views/request_mailer/requires_admin.rhtml
deleted file mode 100644
index 06a798792..000000000
--- a/app/views/request_mailer/requires_admin.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
----------------------------------------------------------------------
-<%=@reported_by.name%> <%= _('has reported an')%> <%=@info_request.law_used_short%>
-<%= _('response as needing administrator attention. Take a look, and reply to this
-email to let them know what you are going to do about it.')%>
-
-Request '<%=@info_request.title%>':
-<%= @url %>
-
-<%= _('Administration URL:') %>
-<%= @admin_url %>
----------------------------------------------------------------------
diff --git a/app/views/request_mailer/stopped_responses.html.erb b/app/views/request_mailer/stopped_responses.html.erb
new file mode 100644
index 000000000..9cd156860
--- /dev/null
+++ b/app/views/request_mailer/stopped_responses.html.erb
@@ -0,0 +1,20 @@
+<%= _('The email that you, on behalf of {{public_body}}, sent to
+{{user}} to reply to an {{law_used_short}}
+request has not been delivered.',:public_body=>@info_request.public_body.name,:user=>@info_request.user.name,:law_used_short=>@info_request.law_used_short)%>
+
+<%= _('This is because {{title}} is an old request that has been
+marked to no longer receive responses.',:title=>@info_request.title)%>
+
+
+
+<%= _('If this is incorrect, or you would like to send a late response to the request
+or an email on another subject to {{user}}, then please
+email {{contact_email}} for help.',:user=>@info_request.user.name,:contact_email=>@contact_email)%>
+
+<%= _('Your original message is attached.')%>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
+
+
+
+
diff --git a/app/views/request_mailer/stopped_responses.rhtml b/app/views/request_mailer/stopped_responses.rhtml
deleted file mode 100644
index 9cd156860..000000000
--- a/app/views/request_mailer/stopped_responses.rhtml
+++ /dev/null
@@ -1,20 +0,0 @@
-<%= _('The email that you, on behalf of {{public_body}}, sent to
-{{user}} to reply to an {{law_used_short}}
-request has not been delivered.',:public_body=>@info_request.public_body.name,:user=>@info_request.user.name,:law_used_short=>@info_request.law_used_short)%>
-
-<%= _('This is because {{title}} is an old request that has been
-marked to no longer receive responses.',:title=>@info_request.title)%>
-
-
-
-<%= _('If this is incorrect, or you would like to send a late response to the request
-or an email on another subject to {{user}}, then please
-email {{contact_email}} for help.',:user=>@info_request.user.name,:contact_email=>@contact_email)%>
-
-<%= _('Your original message is attached.')%>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
-
-
-
-
diff --git a/app/views/request_mailer/very_overdue_alert.html.erb b/app/views/request_mailer/very_overdue_alert.html.erb
new file mode 100644
index 000000000..6abd198a0
--- /dev/null
+++ b/app/views/request_mailer/very_overdue_alert.html.erb
@@ -0,0 +1,11 @@
+<%= @info_request.public_body.name %> <%= _('are long overdue.')%>
+
+<%= _('They have not replied to your {{law_used_short}} request {{title}},
+as required by law',:law_used_short=>@info_request.law_used_short,:title=>@info_request.title)%><% if @info_request.public_body.is_school? %> <%= _('even during holidays')%><% end %>.
+
+<%= _('Click on the link below to send a message to {{public_body_name}} telling them to reply to your request. You might like to ask for an internal
+review, asking them to find out why response to the request has been so slow.',:public_body_name=>@info_request.public_body.name)%>
+
+<%=@url%>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/request_mailer/very_overdue_alert.rhtml b/app/views/request_mailer/very_overdue_alert.rhtml
deleted file mode 100644
index 6abd198a0..000000000
--- a/app/views/request_mailer/very_overdue_alert.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= @info_request.public_body.name %> <%= _('are long overdue.')%>
-
-<%= _('They have not replied to your {{law_used_short}} request {{title}},
-as required by law',:law_used_short=>@info_request.law_used_short,:title=>@info_request.title)%><% if @info_request.public_body.is_school? %> <%= _('even during holidays')%><% end %>.
-
-<%= _('Click on the link below to send a message to {{public_body_name}} telling them to reply to your request. You might like to ask for an internal
-review, asking them to find out why response to the request has been so slow.',:public_body_name=>@info_request.public_body.name)%>
-
-<%=@url%>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/track/_tracking_links.html.erb b/app/views/track/_tracking_links.html.erb
new file mode 100644
index 000000000..ee18ec475
--- /dev/null
+++ b/app/views/track/_tracking_links.html.erb
@@ -0,0 +1,30 @@
+<%
+ if @user
+ existing_track = TrackThing.find_by_existing_track(@user, track_thing)
+ end
+%>
+
+<% if own_request %>
+
<%= _('This is your own request, so you will be automatically emailed when new responses arrive.')%>
-<% end %>
-
-
-
diff --git a/app/views/track_mailer/event_digest.html.erb b/app/views/track_mailer/event_digest.html.erb
new file mode 100644
index 000000000..dc8132b99
--- /dev/null
+++ b/app/views/track_mailer/event_digest.html.erb
@@ -0,0 +1,66 @@
+<%
+ # Construct the main text of the mail
+ main_text = ''
+ for track_thing, alert_results, xapian_object in @email_about_things
+ main_text += track_thing.params[:title_in_email] + "\n"
+ main_text += ("=" * track_thing.params[:title_in_email].size) + "\n\n"
+ @highlight_words = xapian_object.words_to_highlight
+ for result in alert_results.reverse
+ if result[:model].class.to_s == "InfoRequestEvent"
+ event = result[:model]
+
+ # Request title - only add title if we're not tracking a request.
+ # e.g. -- Address and opening times of Post Office branches --
+ if track_thing.info_request.nil?
+ main_text += "-- " + highlight_words(event.info_request.title, @highlight_words, false) + " --\n"
+ end
+
+ # e.g. Julian Burgess sent a request to Royal Mail Group (15 May 2008)
+ if event.event_type == 'response'
+ url = main_url(incoming_message_url(event.incoming_message))
+ main_text += _("{{public_body}} sent a response to {{user_name}}", :public_body => event.info_request.public_body.name, :user_name => event.info_request.user_name)
+ elsif event.event_type == 'followup_sent'
+ url = main_url(outgoing_message_url(event.outgoing_message))
+ main_text += _("{{user_name}} sent a follow up message to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name)
+ elsif event.event_type == 'sent'
+ # this is unlikely to happen in real life, but happens in the test code
+ url = main_url(outgoing_message_url(event.outgoing_message))
+ main_text += _("{{user_name}} sent a request to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name)
+ elsif event.event_type == 'comment'
+ url = main_url(comment_url(event.comment))
+ main_text += _("{{user_name}} added an annotation", :user_name => event.comment.user.name)
+ else
+ raise "unknown type in event_digest " + event.event_type
+ end
+ main_text += " (" + simple_date(event.created_at) + ")\n"
+
+ # Main text, wrapped, words highlighted with * and indented.
+ if event.is_outgoing_message?
+ extract = highlight_and_excerpt(event.outgoing_message.get_text_for_indexing, @highlight_words, 150, false)
+ elsif event.is_incoming_message?
+ extract = highlight_and_excerpt(event.incoming_message.get_text_for_indexing_clipped, @highlight_words, 150, false)
+ elsif event.is_comment?
+ extract = highlight_and_excerpt(event.comment.body, @highlight_words, 150, false)
+ else
+ extract = highlight_and_excerpt(info_request.initial_request_text, @highlight_words, 150, false)
+ end
+ extract = extract.gsub(/\s+/, ' ')
+ main_text += MySociety::Format.wrap_email_body_by_lines('"' + extract + '"').gsub(/\n+$/, "") + "\n"
+
+ # Link to the request/response
+ main_text += url + "\n"
+ main_text += "\n"
+ else
+ raise "need to add other types to TrackMailer.event_digest"
+ end
+ end
+ main_text += "\n"
+ end
+
+%><%=raw main_text%><%= _("Alter your subscription")%>
+=======================
+
+<% _("Please click on the link below to cancel or alter these emails.") %>
+<%=@unsubscribe_url%>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/track_mailer/event_digest.rhtml b/app/views/track_mailer/event_digest.rhtml
deleted file mode 100644
index dc8132b99..000000000
--- a/app/views/track_mailer/event_digest.rhtml
+++ /dev/null
@@ -1,66 +0,0 @@
-<%
- # Construct the main text of the mail
- main_text = ''
- for track_thing, alert_results, xapian_object in @email_about_things
- main_text += track_thing.params[:title_in_email] + "\n"
- main_text += ("=" * track_thing.params[:title_in_email].size) + "\n\n"
- @highlight_words = xapian_object.words_to_highlight
- for result in alert_results.reverse
- if result[:model].class.to_s == "InfoRequestEvent"
- event = result[:model]
-
- # Request title - only add title if we're not tracking a request.
- # e.g. -- Address and opening times of Post Office branches --
- if track_thing.info_request.nil?
- main_text += "-- " + highlight_words(event.info_request.title, @highlight_words, false) + " --\n"
- end
-
- # e.g. Julian Burgess sent a request to Royal Mail Group (15 May 2008)
- if event.event_type == 'response'
- url = main_url(incoming_message_url(event.incoming_message))
- main_text += _("{{public_body}} sent a response to {{user_name}}", :public_body => event.info_request.public_body.name, :user_name => event.info_request.user_name)
- elsif event.event_type == 'followup_sent'
- url = main_url(outgoing_message_url(event.outgoing_message))
- main_text += _("{{user_name}} sent a follow up message to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name)
- elsif event.event_type == 'sent'
- # this is unlikely to happen in real life, but happens in the test code
- url = main_url(outgoing_message_url(event.outgoing_message))
- main_text += _("{{user_name}} sent a request to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name)
- elsif event.event_type == 'comment'
- url = main_url(comment_url(event.comment))
- main_text += _("{{user_name}} added an annotation", :user_name => event.comment.user.name)
- else
- raise "unknown type in event_digest " + event.event_type
- end
- main_text += " (" + simple_date(event.created_at) + ")\n"
-
- # Main text, wrapped, words highlighted with * and indented.
- if event.is_outgoing_message?
- extract = highlight_and_excerpt(event.outgoing_message.get_text_for_indexing, @highlight_words, 150, false)
- elsif event.is_incoming_message?
- extract = highlight_and_excerpt(event.incoming_message.get_text_for_indexing_clipped, @highlight_words, 150, false)
- elsif event.is_comment?
- extract = highlight_and_excerpt(event.comment.body, @highlight_words, 150, false)
- else
- extract = highlight_and_excerpt(info_request.initial_request_text, @highlight_words, 150, false)
- end
- extract = extract.gsub(/\s+/, ' ')
- main_text += MySociety::Format.wrap_email_body_by_lines('"' + extract + '"').gsub(/\n+$/, "") + "\n"
-
- # Link to the request/response
- main_text += url + "\n"
- main_text += "\n"
- else
- raise "need to add other types to TrackMailer.event_digest"
- end
- end
- main_text += "\n"
- end
-
-%><%=raw main_text%><%= _("Alter your subscription")%>
-=======================
-
-<% _("Please click on the link below to cancel or alter these emails.") %>
-<%=@unsubscribe_url%>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/user/_change_receive_email.html.erb b/app/views/user/_change_receive_email.html.erb
new file mode 100644
index 000000000..12824f711
--- /dev/null
+++ b/app/views/user/_change_receive_email.html.erb
@@ -0,0 +1,16 @@
+<%= form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %>
+
+ <% if @user.receive_email_alerts %>
+ <%= _('You are currently receiving notification of new activity on your wall by email.', :wall_url => show_user_wall_path) %>
+ <%= hidden_field_tag 'receive_email_alerts', 'false' %>
+ <%= hidden_field_tag 'came_from', request.url %>
+ <%= submit_tag _("Turn off email alerts") %>
+ <% else %>
+ <%= _('Items matching the following conditions are currently displayed on your wall.') %>
+ <%= hidden_field_tag 'receive_email_alerts', 'true' %>
+ <%= hidden_field_tag 'came_from', request.url %>
+ <%= submit_tag _("Also send me alerts by email") %>
+ <% end %>
+
+<% end %>
+
diff --git a/app/views/user/_change_receive_email.rhtml b/app/views/user/_change_receive_email.rhtml
deleted file mode 100644
index 12824f711..000000000
--- a/app/views/user/_change_receive_email.rhtml
+++ /dev/null
@@ -1,16 +0,0 @@
-<%= form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %>
-
- <% if @user.receive_email_alerts %>
- <%= _('You are currently receiving notification of new activity on your wall by email.', :wall_url => show_user_wall_path) %>
- <%= hidden_field_tag 'receive_email_alerts', 'false' %>
- <%= hidden_field_tag 'came_from', request.url %>
- <%= submit_tag _("Turn off email alerts") %>
- <% else %>
- <%= _('Items matching the following conditions are currently displayed on your wall.') %>
- <%= hidden_field_tag 'receive_email_alerts', 'true' %>
- <%= hidden_field_tag 'came_from', request.url %>
- <%= submit_tag _("Also send me alerts by email") %>
- <% end %>
-
-<% end %>
-
diff --git a/app/views/user/_show_user_info.html.erb b/app/views/user/_show_user_info.html.erb
new file mode 100644
index 000000000..3c229e9ce
--- /dev/null
+++ b/app/views/user/_show_user_info.html.erb
@@ -0,0 +1,20 @@
+
+ <% if !@display_user.get_about_me_for_html_display.empty? || @is_you %>
+
+
+ <%= @display_user.get_about_me_for_html_display %>
+ <% if @is_you %>
+ (<%= link_to _("edit text about you"), set_profile_about_me_url() %>)
+ <% end %>
+
+ <% end %>
+
+ <% if @is_you %>
+
+ <% if @display_user.profile_photo %>
+ <%= link_to _('Change profile photo'), set_profile_photo_url() %> |
+ <% end %>
+ <%= link_to _('Change your password'), signchangepassword_url() %> |
+ <%= link_to _('Change your email'), signchangeemail_url() %>
+
+ <%= raw(_('Your name will appear publicly
+ (why?)
+ on this website and in search engines. If you
+ are thinking of using a pseudonym, please
+ read this first.') % [help_privacy_path+"#public_request", help_privacy_path+"#real_name"]) %>
+
- <%= raw(_('Your name will appear publicly
- (why?)
- on this website and in search engines. If you
- are thinking of using a pseudonym, please
- read this first.') % [help_privacy_path+"#public_request", help_privacy_path+"#real_name"]) %>
-
diff --git a/app/views/user/bad_token.html.erb b/app/views/user/bad_token.html.erb
new file mode 100644
index 000000000..538bc5606
--- /dev/null
+++ b/app/views/user/bad_token.html.erb
@@ -0,0 +1,17 @@
+
+<%= _('Please check the URL (i.e. the long code of letters and numbers) is copied
+correctly from your email.')%>
+
+
+
+<%= _('If you can\'t click on it in the email, you\'ll have to select and copy
+it from the email. Then paste it into your browser, into the place
+you would type the address of any other webpage.')%>
+
+
+
+<%= _('If you got the email more than six months ago, then this login link won\'t work any
+more. Please try doing what you were doing from the beginning.')%>
+
-<%= _('Please check the URL (i.e. the long code of letters and numbers) is copied
-correctly from your email.')%>
-
-
-
-<%= _('If you can\'t click on it in the email, you\'ll have to select and copy
-it from the email. Then paste it into your browser, into the place
-you would type the address of any other webpage.')%>
-
-
-
-<%= _('If you got the email more than six months ago, then this login link won\'t work any
-more. Please try doing what you were doing from the beginning.')%>
-
-
-
diff --git a/app/views/user/banned.html.erb b/app/views/user/banned.html.erb
new file mode 100644
index 000000000..475c10977
--- /dev/null
+++ b/app/views/user/banned.html.erb
@@ -0,0 +1,19 @@
+<% @title = "Banned from this site" %>
+
+
<%=@title%>
+
+
+<%=@details%>
+
+
+
<%= _('You will be unable to make new requests, send follow ups, add annotations or
+send messages to other users. You may continue to view other requests, and set
+up
+email alerts.')%>
+
+
+<%= _('If you would like us to lift this ban, then you may politely
+contact us giving reasons.
+')%>
+
+
diff --git a/app/views/user/banned.rhtml b/app/views/user/banned.rhtml
deleted file mode 100644
index 475c10977..000000000
--- a/app/views/user/banned.rhtml
+++ /dev/null
@@ -1,19 +0,0 @@
-<% @title = "Banned from this site" %>
-
-
<%=@title%>
-
-
-<%=@details%>
-
-
-
<%= _('You will be unable to make new requests, send follow ups, add annotations or
-send messages to other users. You may continue to view other requests, and set
-up
-email alerts.')%>
-
-
-<%= _('If you would like us to lift this ban, then you may politely
-contact us giving reasons.
-')%>
-
-
diff --git a/app/views/user/confirm.html.erb b/app/views/user/confirm.html.erb
new file mode 100644
index 000000000..bc70a1f36
--- /dev/null
+++ b/app/views/user/confirm.html.erb
@@ -0,0 +1,14 @@
+<% @title = _("Now check your email!") %>
+
+
<%= _("Now check your email!") %>
+
+
+<%= _('We\'ve sent you an email, and you\'ll need to click the link in it before you can
+continue.') %>
+
+
+
+<%= _('If you use web-based email or have "junk mail" filters, also check your
+bulk/spam mail folders. Sometimes, our messages are marked that way.
+
-<%= _('We\'ve sent you an email, and you\'ll need to click the link in it before you can
-continue.') %>
-
-
-
-<%= _('If you use web-based email or have "junk mail" filters, also check your
-bulk/spam mail folders. Sometimes, our messages are marked that way.
-
') %>
-
diff --git a/app/views/user/contact.html.erb b/app/views/user/contact.html.erb
new file mode 100644
index 000000000..6d23dd1ed
--- /dev/null
+++ b/app/views/user/contact.html.erb
@@ -0,0 +1,45 @@
+<% @title = "Contact " + h(@recipient_user.name) %>
+
+<% if not @user %>
+ <% raise "You need to be logged in" %>
+<% end %>
+
+<%= foi_error_messages_for :contact %>
+
+<%= form_for :contact do |f| %>
+
+
+ <% if @user == @recipient_user %>
+ <%= _('Note: You\'re sending a message to yourself, presumably
+ to try out how it works.')%>
+ <% else %>
+ <%= _(' Privacy note: Your email address will be given to')%>
+ <%= user_link(@recipient_user) %><%= _(' when you send this message.')%>
+ <% end %>
+
- <% if @user == @recipient_user %>
- <%= _('Note: You\'re sending a message to yourself, presumably
- to try out how it works.')%>
- <% else %>
- <%= _(' Privacy note: Your email address will be given to')%>
- <%= user_link(@recipient_user) %><%= _(' when you send this message.')%>
- <% end %>
-
-
-<% end %>
diff --git a/app/views/user/no_cookies.html.erb b/app/views/user/no_cookies.html.erb
new file mode 100644
index 000000000..c291367f2
--- /dev/null
+++ b/app/views/user/no_cookies.html.erb
@@ -0,0 +1,22 @@
+<% @title = "Cookies not enabled" %>
+
+
<%= _('Please enable "cookies" to carry on')%>
+
+
<%= _('To carry on, you need to sign in or make an account. Unfortunately, there
+was a technical problem trying to do this.')%>
+
+
<%= _('It may be that your browser is not set to accept a thing called "cookies",
+or cannot do so. If you can, please enable cookies, or try using a different
+browser. Then press refresh to have another go.')%>
+
+
<%= _('If your browser is set to accept cookies and you are seeing this message,
+then there is probably a fault with our server.')%>
+
+<%= raw(_('Please get in touch with us so we can fix it.') % [help_contact_path]) %>
+
+ <%= _('Let us know what you were doing when this message
+appeared and your browser and operating system type and version.')%>
+
+
<%= raw(_('If you are still having trouble, please contact us.') % [help_contact_path]) %>
+
<%= _('To carry on, you need to sign in or make an account. Unfortunately, there
-was a technical problem trying to do this.')%>
-
-
<%= _('It may be that your browser is not set to accept a thing called "cookies",
-or cannot do so. If you can, please enable cookies, or try using a different
-browser. Then press refresh to have another go.')%>
-
-
<%= _('If your browser is set to accept cookies and you are seeing this message,
-then there is probably a fault with our server.')%>
-
-<%= raw(_('Please get in touch with us so we can fix it.') % [help_contact_path]) %>
-
- <%= _('Let us know what you were doing when this message
-appeared and your browser and operating system type and version.')%>
-
-
<%= raw(_('If you are still having trouble, please contact us.') % [help_contact_path]) %>
-
-
diff --git a/app/views/user/rate_limited.html.erb b/app/views/user/rate_limited.html.erb
new file mode 100644
index 000000000..d52deebab
--- /dev/null
+++ b/app/views/user/rate_limited.html.erb
@@ -0,0 +1,15 @@
+<% @title = _("Too many requests") %>
+
+
<%=@title%>
+
+
<%= _("You have hit the rate limit on new requests. Users are ordinarily limited to {{max_requests_per_user_per_day}} requests in any rolling 24-hour period. You will be able to make another request in {{can_make_another_request}}.", :max_requests_per_user_per_day => Configuration::max_requests_per_user_per_day, :can_make_another_request => distance_of_time_in_words(Time.now, @next_request_permitted_at))%>
+
+
<%= _("There is a limit on the number of requests you can make in a day, because we don’t want public authorities to be bombarded with large numbers of inappropriate requests. If you feel you have a good reason to ask for the limit to be lifted in your case, please get in touch.", :help_contact_path => help_contact_path) %>
+
+<% if @info_request %>
+
<%= _("Here is the message you wrote, in case you would like to copy the text and save it for later.") %>
+<% end %>
diff --git a/app/views/user/rate_limited.rhtml b/app/views/user/rate_limited.rhtml
deleted file mode 100644
index d52deebab..000000000
--- a/app/views/user/rate_limited.rhtml
+++ /dev/null
@@ -1,15 +0,0 @@
-<% @title = _("Too many requests") %>
-
-
<%=@title%>
-
-
<%= _("You have hit the rate limit on new requests. Users are ordinarily limited to {{max_requests_per_user_per_day}} requests in any rolling 24-hour period. You will be able to make another request in {{can_make_another_request}}.", :max_requests_per_user_per_day => Configuration::max_requests_per_user_per_day, :can_make_another_request => distance_of_time_in_words(Time.now, @next_request_permitted_at))%>
-
-
<%= _("There is a limit on the number of requests you can make in a day, because we don’t want public authorities to be bombarded with large numbers of inappropriate requests. If you feel you have a good reason to ask for the limit to be lifted in your case, please get in touch.", :help_contact_path => help_contact_path) %>
-
-<% if @info_request %>
-
<%= _("Here is the message you wrote, in case you would like to copy the text and save it for later.") %>
-
-
-<% end %>
-
-<% if @user.profile_photo %>
-
-
<%= _('OR remove the existing photo')%>
-
- <%= form_tag 'clear_photo', :id => 'clear_profile_photo_form', :multipart => true do %>
- <%= submit_tag _("Clear photo") %>
- <% end %>
-
-<% end %>
-
-
- <%= link_to _("Cancel, return to your profile page"), user_url(@user) %>
-
-
-
diff --git a/app/views/user/set_profile_about_me.html.erb b/app/views/user/set_profile_about_me.html.erb
new file mode 100644
index 000000000..c4b760307
--- /dev/null
+++ b/app/views/user/set_profile_about_me.html.erb
@@ -0,0 +1,37 @@
+<% @title = _('Change the text about you on your profile at {{site_name}}', :site_name=>site_name) %>
+
+<% raise _('internal error') if not @user %>
+
+<%= foi_error_messages_for :about_me %>
+
+<%= form_for :about_me do |f| %>
+
+
<%= _('Edit text about you')%>
+
+ <%= _(' What are you investigating using Freedom of Information? ')%>
+
+
+ <%= _(' This will appear on your {{site_name}} profile, to make it
+ easier for others to get involved with what you\'re doing.', :site_name=>site_name)%>
+
+<% end %>
diff --git a/app/views/user/set_profile_about_me.rhtml b/app/views/user/set_profile_about_me.rhtml
deleted file mode 100644
index c4b760307..000000000
--- a/app/views/user/set_profile_about_me.rhtml
+++ /dev/null
@@ -1,37 +0,0 @@
-<% @title = _('Change the text about you on your profile at {{site_name}}', :site_name=>site_name) %>
-
-<% raise _('internal error') if not @user %>
-
-<%= foi_error_messages_for :about_me %>
-
-<%= form_for :about_me do |f| %>
-
-
<%= _('Edit text about you')%>
-
- <%= _(' What are you investigating using Freedom of Information? ')%>
-
-
- <%= _(' This will appear on your {{site_name}} profile, to make it
- easier for others to get involved with what you\'re doing.', :site_name=>site_name)%>
-
-<% end %>
diff --git a/app/views/user/show.html.erb b/app/views/user/show.html.erb
new file mode 100644
index 000000000..e67d3b719
--- /dev/null
+++ b/app/views/user/show.html.erb
@@ -0,0 +1,227 @@
+<% if @show_requests %>
+ <% @title = _("{{user_name}} - Freedom of Information requests", :user_name => h(@display_user.name)) %>
+<% else %>
+ <% @title = _("{{user_name}} - user profile", :user_name => h(@display_user.name)) %>
+<% end %>
+
+<% if (@same_name_users.size >= 1) %>
+
<%= _('There is more than one person who uses this site and has this name.
+ One of them is shown below, you may mean a different one:')%> <% for @same_name_user in @same_name_users %>
+ <%= user_link(@same_name_user) %>
+ <% end %>
+<% end%>
+
+<% if @show_profile && @is_you && @undescribed_requests.size > 0 %>
+
+
<%= _('Please go to the following requests, and let us
+ know if there was information in the recent responses to them.')%>
+
+ <% for undescribed_request in @undescribed_requests %>
+
<%=request_link(undescribed_request)%>
+ <% end %>
+
+
+ <%= _('Thanks very much - this will help others find useful stuff. We\'ll
+ also, if you need it, give advice on what to do next about your
+ requests.')%>
+
+ <%= link_to _('Send message to ') + h(@display_user.name), contact_user_url(:id => @display_user.id) %>
+ <% if @is_you %>
+ (<%= _('just to see how it works')%>)
+ <% end %>
+
+
+ <% if @display_user.public_banned? %>
+
+
+
+ <%= _('This user has been banned from {{site_name}} ', :site_name=>site_name)%>
+
+
+
+ <%= _('They have been given the following explanation:')%>
+
+
+ <%= @display_user.can_fail_html %>
+
+
+ <% end %>
+
+ <%= render :partial => 'user/show_user_info' %>
+
+ <% if not @is_you %>
+
+ <%= raw(_('Sign in to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name)) % [signin_url(:r => request.fullpath)]) %>
+
+ <% end %>
+
+
+
+<% end %>
+
+<% if @show_requests %>
+
+ <%= form_tag(show_user_url, :method => "get", :id=>"search_form") do %>
+
+ <%= text_field_tag(:user_query, params[:user_query]) %>
+ <% if @is_you %>
+ <%= submit_tag(_("Search your contributions")) %>
+ <% else %>
+ <%= submit_tag(_("Search contributions by this person")) %>
+ <% end %>
+
+ <% end %>
+
+ <% if !@xapian_requests.nil? %>
+ <% if @xapian_requests.results.empty? %>
+ <% if @page == 1 %>
+
<%= @is_you ? _('Freedom of Information requests made by you') : _('Freedom of Information requests made by this person') %> <%= @match_phrase %>
+
+
<%= @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.') %>
+ <%= @page_desc %>
+ <% end %>
+ <% else %>
+
+ <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @xapian_requests.matches_estimated) % @xapian_requests.matches_estimated.to_s : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests', @xapian_requests.matches_estimated) % @xapian_requests.matches_estimated %>
+
+ <%= @match_phrase %>
+ <%= @page_desc %>
+
+
+
+ <% 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, @display_user.info_requests.size) %>
+ <% end %>
+ <% else %>
+ <% if @show_requests %>
+
<%= @is_you ? _('Freedom of Information requests made by you') : _('Freedom of Information requests made by this person') %>
+
<%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests this person has made.')%>
+ <% end %>
+ <% end %>
+
+ <% if !@xapian_comments.nil? %>
+ <% if @xapian_comments.results.empty? %>
+ <% if @page == 1 %>
+
+ <% end %>
+ <% end %>
+<% end %>
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
deleted file mode 100644
index e67d3b719..000000000
--- a/app/views/user/show.rhtml
+++ /dev/null
@@ -1,227 +0,0 @@
-<% if @show_requests %>
- <% @title = _("{{user_name}} - Freedom of Information requests", :user_name => h(@display_user.name)) %>
-<% else %>
- <% @title = _("{{user_name}} - user profile", :user_name => h(@display_user.name)) %>
-<% end %>
-
-<% if (@same_name_users.size >= 1) %>
-
<%= _('There is more than one person who uses this site and has this name.
- One of them is shown below, you may mean a different one:')%> <% for @same_name_user in @same_name_users %>
- <%= user_link(@same_name_user) %>
- <% end %>
-<% end%>
-
-<% if @show_profile && @is_you && @undescribed_requests.size > 0 %>
-
-
<%= _('Please go to the following requests, and let us
- know if there was information in the recent responses to them.')%>
-
- <% for undescribed_request in @undescribed_requests %>
-
<%=request_link(undescribed_request)%>
- <% end %>
-
-
- <%= _('Thanks very much - this will help others find useful stuff. We\'ll
- also, if you need it, give advice on what to do next about your
- requests.')%>
-
- <%= link_to _('Send message to ') + h(@display_user.name), contact_user_url(:id => @display_user.id) %>
- <% if @is_you %>
- (<%= _('just to see how it works')%>)
- <% end %>
-
-
- <% if @display_user.public_banned? %>
-
-
-
- <%= _('This user has been banned from {{site_name}} ', :site_name=>site_name)%>
-
-
-
- <%= _('They have been given the following explanation:')%>
-
-
- <%= @display_user.can_fail_html %>
-
-
- <% end %>
-
- <%= render :partial => 'user/show_user_info' %>
-
- <% if not @is_you %>
-
- <%= raw(_('Sign in to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name)) % [signin_url(:r => request.fullpath)]) %>
-
- <% end %>
-
-
-
-<% end %>
-
-<% if @show_requests %>
-
- <%= form_tag(show_user_url, :method => "get", :id=>"search_form") do %>
-
- <%= text_field_tag(:user_query, params[:user_query]) %>
- <% if @is_you %>
- <%= submit_tag(_("Search your contributions")) %>
- <% else %>
- <%= submit_tag(_("Search contributions by this person")) %>
- <% end %>
-
- <% end %>
-
- <% if !@xapian_requests.nil? %>
- <% if @xapian_requests.results.empty? %>
- <% if @page == 1 %>
-
<%= @is_you ? _('Freedom of Information requests made by you') : _('Freedom of Information requests made by this person') %> <%= @match_phrase %>
-
-
<%= @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.') %>
- <%= @page_desc %>
- <% end %>
- <% else %>
-
- <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @xapian_requests.matches_estimated) % @xapian_requests.matches_estimated.to_s : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests', @xapian_requests.matches_estimated) % @xapian_requests.matches_estimated %>
-
- <%= @match_phrase %>
- <%= @page_desc %>
-
-
-
- <% 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, @display_user.info_requests.size) %>
- <% end %>
- <% else %>
- <% if @show_requests %>
-
<%= @is_you ? _('Freedom of Information requests made by you') : _('Freedom of Information requests made by this person') %>
-
<%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests this person has made.')%>
- <% end %>
- <% end %>
-
- <% if !@xapian_comments.nil? %>
- <% if @xapian_comments.results.empty? %>
- <% if @page == 1 %>
-
+
+<% else %>
+ <% @title = _('Sign in or make a new account') %>
+
+
+ <% if !@post_redirect.nil? %>
+
+ <% if @post_redirect.reason_params[:web].empty? %>
+ <%= _('Please sign in or make a new account.') %>
+ <% else %>
+ <%= _('{{reason}}, please sign in or make a new account.', :reason => @post_redirect.reason_params[:web]) %>
+ <% end %>
+
-
-<% else %>
- <% @title = _('Sign in or make a new account') %>
-
-
- <% if !@post_redirect.nil? %>
-
- <% if @post_redirect.reason_params[:web].empty? %>
- <%= _('Please sign in or make a new account.') %>
- <% else %>
- <%= _('{{reason}}, please sign in or make a new account.', :reason => @post_redirect.reason_params[:web]) %>
- <% end %>
-
diff --git a/app/views/user/signchangeemail_confirm.html.erb b/app/views/user/signchangeemail_confirm.html.erb
new file mode 100644
index 000000000..bfedbac2d
--- /dev/null
+++ b/app/views/user/signchangeemail_confirm.html.erb
@@ -0,0 +1,14 @@
+<% @title = h("Now check your email!") %>
+
+
<%= _('Now check your email!')%>
+
+
+ <%= _('We\'ve sent an email to your new email address. You\'ll need to click the link in
+it before your email address will be changed.')%>
+
+
+
+ <%= _('If you use web-based email or have "junk mail" filters, also check your
+bulk/spam mail folders. Sometimes, our messages are marked that way.')%>
+
- <%= _('We\'ve sent an email to your new email address. You\'ll need to click the link in
-it before your email address will be changed.')%>
-
-
-
- <%= _('If you use web-based email or have "junk mail" filters, also check your
-bulk/spam mail folders. Sometimes, our messages are marked that way.')%>
-
-
diff --git a/app/views/user/signchangepassword.html.erb b/app/views/user/signchangepassword.html.erb
new file mode 100644
index 000000000..51bcb466d
--- /dev/null
+++ b/app/views/user/signchangepassword.html.erb
@@ -0,0 +1,31 @@
+<% @title = _('Change your password on {{site_name}}', :site_name => site_name) %>
+
+<% raise "internal error" if not @user %>
+
+
diff --git a/app/views/user/signchangepassword_confirm.html.erb b/app/views/user/signchangepassword_confirm.html.erb
new file mode 100644
index 000000000..63b6515cd
--- /dev/null
+++ b/app/views/user/signchangepassword_confirm.html.erb
@@ -0,0 +1,13 @@
+<% @title = h( _('Now check your email!')) %>
+
+
<%= _('Now check your email!')%>
+
+
+<%= _('We\'ve sent you an email, click the link in it, then you can change your password.')%>
+
+
+
+<%= _('If you use web-based email or have "junk mail" filters, also check your
+bulk/spam mail folders. Sometimes, our messages are marked that way.')%>
+
-<%= _('We\'ve sent you an email, click the link in it, then you can change your password.')%>
-
-
-
-<%= _('If you use web-based email or have "junk mail" filters, also check your
-bulk/spam mail folders. Sometimes, our messages are marked that way.')%>
-
-
diff --git a/app/views/user/signchangepassword_send_confirm.html.erb b/app/views/user/signchangepassword_send_confirm.html.erb
new file mode 100644
index 000000000..850237c34
--- /dev/null
+++ b/app/views/user/signchangepassword_send_confirm.html.erb
@@ -0,0 +1,30 @@
+<% @title = _('Change your password on {{site_name}}', :site_name => site_name) %>
+
+
<%= _('You can change the requests and users you are following on your profile page.', :profile_url => show_user_profile_path) %>
+ <%= render :partial => 'change_receive_email' %>
+
+<% end %>
+
+ <% if !@feed_results.nil? %>
+ <% for result in @feed_results %>
+ <%= render :partial => 'request/wall_listing', :locals => { :event => result, :info_request => result.info_request } %>
+ <% end %>
+ <% end %>
+
+
+
<%= _('You can change the requests and users you are following on your profile page.', :profile_url => show_user_profile_path) %>
- <%= render :partial => 'change_receive_email' %>
-
-<% end %>
-
- <% if !@feed_results.nil? %>
- <% for result in @feed_results %>
- <%= render :partial => 'request/wall_listing', :locals => { :event => result, :info_request => result.info_request } %>
- <% end %>
- <% end %>
-
-
-
diff --git a/app/views/user/wrong_user.html.erb b/app/views/user/wrong_user.html.erb
new file mode 100644
index 000000000..30256a639
--- /dev/null
+++ b/app/views/user/wrong_user.html.erb
@@ -0,0 +1,4 @@
+
+<%= _('Sorry, but only {{user_name}} is allowed to do that.', :user_name => h(@reason_params[:user_name])) %>
+
+<%= @reason_params[:web] %>. <%= raw(_('Unfortunately we don\'t know the FOI
+email address for that authority, so we can\'t validate this.
+Please contact us to sort it out.') % [help_contact_path]) %>
+
-<%= @reason_params[:web] %>. <%= raw(_('Unfortunately we don\'t know the FOI
-email address for that authority, so we can\'t validate this.
-Please contact us to sort it out.') % [help_contact_path]) %>
-
-
-
diff --git a/app/views/user_mailer/already_registered.html.erb b/app/views/user_mailer/already_registered.html.erb
new file mode 100644
index 000000000..59ffcbf94
--- /dev/null
+++ b/app/views/user_mailer/already_registered.html.erb
@@ -0,0 +1,11 @@
+<%= @name %>,
+
+<%= _('You just tried to sign up to {{site_name}}, when you
+already have an account. Your name and password have been
+left as they previously were.
+
+Please click on the link below.', :site_name=>site_name)%> <%=@reasons[:email]%>
+
+<%=@url%>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/user_mailer/already_registered.rhtml b/app/views/user_mailer/already_registered.rhtml
deleted file mode 100644
index 59ffcbf94..000000000
--- a/app/views/user_mailer/already_registered.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= @name %>,
-
-<%= _('You just tried to sign up to {{site_name}}, when you
-already have an account. Your name and password have been
-left as they previously were.
-
-Please click on the link below.', :site_name=>site_name)%> <%=@reasons[:email]%>
-
-<%=@url%>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/user_mailer/changeemail_already_used.html.erb b/app/views/user_mailer/changeemail_already_used.html.erb
new file mode 100644
index 000000000..1d74dda35
--- /dev/null
+++ b/app/views/user_mailer/changeemail_already_used.html.erb
@@ -0,0 +1,10 @@
+<%= _('Someone, perhaps you, just tried to change their email address on
+{{site_name}} from {{old_email}} to {{new_email}}.', :site_name=>site_name,
+:old_email=>@old_email, :new_email=>@new_email) %>
+
+<%= _('This was not possible because there is already an account using
+the email address {{email}}.', :email=>@new_email)%>.
+
+<%= _('The accounts have been left as they previously were.')%>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/user_mailer/changeemail_already_used.rhtml b/app/views/user_mailer/changeemail_already_used.rhtml
deleted file mode 100644
index 1d74dda35..000000000
--- a/app/views/user_mailer/changeemail_already_used.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<%= _('Someone, perhaps you, just tried to change their email address on
-{{site_name}} from {{old_email}} to {{new_email}}.', :site_name=>site_name,
-:old_email=>@old_email, :new_email=>@new_email) %>
-
-<%= _('This was not possible because there is already an account using
-the email address {{email}}.', :email=>@new_email)%>.
-
-<%= _('The accounts have been left as they previously were.')%>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/user_mailer/changeemail_confirm.html.erb b/app/views/user_mailer/changeemail_confirm.html.erb
new file mode 100644
index 000000000..ffb9737f7
--- /dev/null
+++ b/app/views/user_mailer/changeemail_confirm.html.erb
@@ -0,0 +1,13 @@
+<%= @name %>,
+
+<%= _('Please click on the link below to confirm that you want to
+change the email address that you use for {{site_name}}
+from {{old_email}} to {{new_email}}',
+:site_name=>site_name, :old_email=>@old_email, :new_email=>@new_email) %>
+
+<%=@url%>
+
+<%= _('We will not reveal your email addresses to anybody unless you
+or the law tell us to.')%>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/user_mailer/changeemail_confirm.rhtml b/app/views/user_mailer/changeemail_confirm.rhtml
deleted file mode 100644
index ffb9737f7..000000000
--- a/app/views/user_mailer/changeemail_confirm.rhtml
+++ /dev/null
@@ -1,13 +0,0 @@
-<%= @name %>,
-
-<%= _('Please click on the link below to confirm that you want to
-change the email address that you use for {{site_name}}
-from {{old_email}} to {{new_email}}',
-:site_name=>site_name, :old_email=>@old_email, :new_email=>@new_email) %>
-
-<%=@url%>
-
-<%= _('We will not reveal your email addresses to anybody unless you
-or the law tell us to.')%>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/user_mailer/confirm_login.html.erb b/app/views/user_mailer/confirm_login.html.erb
new file mode 100644
index 000000000..6f4feff00
--- /dev/null
+++ b/app/views/user_mailer/confirm_login.html.erb
@@ -0,0 +1,11 @@
+<%= @name %>,
+
+<%= _('Please click on the link below to confirm your email address.')%>
+<%=@reasons[:email]%>
+
+<%=@url%>
+
+<%= _('We will not reveal your email address to anybody unless you
+or the law tell us to.')%>
+
+-- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/app/views/user_mailer/confirm_login.rhtml b/app/views/user_mailer/confirm_login.rhtml
deleted file mode 100644
index 6f4feff00..000000000
--- a/app/views/user_mailer/confirm_login.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%= @name %>,
-
-<%= _('Please click on the link below to confirm your email address.')%>
-<%=@reasons[:email]%>
-
-<%=@url%>
-
-<%= _('We will not reveal your email address to anybody unless you
-or the law tell us to.')%>
-
--- <%= _('the {{site_name}} team', :site_name=>site_name) %>
diff --git a/doc/THEMES.md b/doc/THEMES.md
index c5e4a3eee..02070644a 100644
--- a/doc/THEMES.md
+++ b/doc/THEMES.md
@@ -66,8 +66,8 @@ add custom help pages, as described below.
The core templates that comprise the layout and user interface of an
Alaveteli site live in `app/views/`. They are use Rails' ERB syntax.
For example, the template for the home page lives at
-`app/views/general/frontpage.rhtml`, and the template for the "about
-us" page is at `app/views/help/about.rhtml`.
+`app/views/general/frontpage.html.erb`, and the template for the "about
+us" page is at `app/views/help/about.html.erb`.
Obviously, you *could* edit those core files directly, but this would
be a Bad Idea, because you would find it increasingly hard to do
@@ -90,7 +90,7 @@ the main Rails app -- see `alavetelitheme/install.rb` to see how this
happens.
The partial at
-`alavetelitheme/lib/views/general/_before_head_end.rhtml` includes the
+`alavetelitheme/lib/views/general/_before_head_end.html.erb` includes the
custom CSS in your theme's stylesheet folder (by convention, in
`alavetelitheme/public/stylesheets/`), with:
@@ -137,20 +137,20 @@ The latter must have one method:
When you've added your extra states, you also need to create the following files in your theme:
-* `lib/views/general/_custom_state_descriptions.rhtml`: Descriptions
+* `lib/views/general/_custom_state_descriptions.html.erb`: Descriptions
of your new states, suitable for displaying to end users
-* `lib/views/general/_custom_state_transitions_complete.rhtml`:
+* `lib/views/general/_custom_state_transitions_complete.html.erb`:
Descriptions for any new states that you might characterise as
'completion' states, for displaying on the categorisation form that
we ask requestors to fill out
-* `lib/views/general/_custom_state_transitions_pending.rhtml`: As
+* `lib/views/general/_custom_state_transitions_pending.html.erb`: As
above, but for new states you might characterise as 'pending'
states.
You can see examples of these customisations in
[this commit](https://github.com/sebbacon/informatazyrtare-theme/commit/2b240491237bd72415990399904361ce9bfa431d)
for the Kosovan version of Alaveteli, Informata Zyrtare (ignore the
-file `lib/views/general/_custom_state_transitions.rhtml`, which is
+file `lib/views/general/_custom_state_transitions.html.erb`, which is
unused).
# Adding new pages in the navigation
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 663588303..ffc15ebe8 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -692,7 +692,7 @@ describe RequestController, "when showing one request" do
get :show, :url_title => 'why_do_you_have_such_a_fancy_dog'
assert assigns[:info_request].info_request_events[3].incoming_message.get_attachments_for_display.count == 2
# the issue is that the info_request_events have got cached on them the old info_requests.
- # where i'm at: trying to replace those fields that got re-read from the raw email. however tests are failing in very strange ways. currently I don't appear to be getting any attachments parsed in at all when in the template (see "*****" in _correspondence.rhtml) but do when I'm in the code.
+ # where i'm at: trying to replace those fields that got re-read from the raw email. however tests are failing in very strange ways. currently I don't appear to be getting any attachments parsed in at all when in the template (see "*****" in _correspondence.html.erb) but do when I'm in the code.
# so at this point, assigns[:info_request].incoming_messages[1].get_attachments_for_display is returning stuff, but the equivalent thing in the template isn't.
# but something odd is that the above is return a whole load of attachments which aren't there in the controller
diff --git a/spec/views/public_body/show.html.erb_spec.rb b/spec/views/public_body/show.html.erb_spec.rb
new file mode 100644
index 000000000..1a972a661
--- /dev/null
+++ b/spec/views/public_body/show.html.erb_spec.rb
@@ -0,0 +1,119 @@
+require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
+
+describe "public_body/show" do
+ before do
+ @pb = mock_model(PublicBody,
+ :name => 'Test Quango',
+ :short_name => 'tq',
+ :url_name => 'testquango',
+ :notes => '',
+ :type_of_authority => 'A public body',
+ :eir_only? => nil,
+ :info_requests => [1, 2, 3, 4], # out of sync with Xapian
+ :publication_scheme => '',
+ :disclosure_log => '',
+ :calculated_home_page => '')
+ @pb.stub!(:override_request_email).and_return(nil)
+ @pb.stub!(:is_requestable?).and_return(true)
+ @pb.stub!(:has_notes?).and_return(false)
+ @pb.stub!(:has_tag?).and_return(false)
+ @xap = mock(ActsAsXapian::Search, :matches_estimated => 2)
+ @xap.stub!(:results).and_return([
+ { :model => mock_event },
+ { :model => mock_event }
+ ])
+
+ assign(:public_body, @pb)
+ assign(:track_thing, mock_model(TrackThing,
+ :track_type => 'public_body_updates', :public_body => @pb, :params => {}))
+ assign(:xapian_requests, @xap)
+ assign(:page, 1)
+ assign(:per_page, 10)
+ end
+
+ it "should be successful" do
+ render
+ controller.response.should be_success
+ end
+
+ it "should be valid HTML" do
+ render
+ validate_as_body response.body
+ end
+
+ it "should show the body's name" do
+ render
+ response.should have_selector('h1', :content => "Test Quango")
+ end
+
+ it "should tell total number of requests" do
+ render
+ response.should match "4 Freedom of Information requests"
+ end
+
+ it "should cope with no results" do
+ @pb.stub!(:info_requests).and_return([])
+ render
+ response.should have_selector('p', :content => "Nobody has made any Freedom of Information requests")
+ end
+
+ it "should cope with Xapian being down" do
+ assign(:xapian_requests, nil)
+ render
+ response.should match "The search index is currently offline"
+ end
+
+ it "should link to Charity Commission site if we have numbers to do so" do
+ @pb.stub!(:has_tag?).and_return(true)
+ @pb.stub!(:get_tag_values).and_return(['98765', '12345'])
+
+ render
+ response.should have_selector("div#header_right") do
+ have_selector "a", :href => /charity-commission.gov.uk.*RegisteredCharityNumber=98765$/
+ end
+ response.should have_selector("div#header_right") do
+ have_selector "a", :href => /www.charity-commission.gov.uk.*RegisteredCharityNumber=12345$/
+ end
+ end
+
+ it "should link to Scottish Charity Regulator site if we have an SC number" do
+ @pb.stub!(:has_tag?).and_return(true)
+ @pb.stub!(:get_tag_values).and_return(['SC1234'])
+
+ render
+ response.should have_selector("div#header_right") do
+ have_selector "a", :href => /www.oscr.org.uk.*id=SC1234$/
+ end
+ end
+
+
+ it "should not link to Charity Commission site if we don't have number" do
+ render
+ response.should have_selector("div#header_right") do
+ have_selector "a", :href => /charity-commission.gov.uk/
+ end
+ end
+
+
+end
+
+def mock_event
+ return mock_model(InfoRequestEvent,
+ :info_request => mock_model(InfoRequest,
+ :title => 'Title',
+ :url_title => 'title',
+ :display_status => 'waiting_response',
+ :calculate_status => 'waiting_response',
+ :public_body => @pb,
+ :is_external? => false,
+ :user => mock_model(User, :name => 'Test User', :url_name => 'testuser')
+ ),
+ :incoming_message => nil, :is_incoming_message? => false,
+ :outgoing_message => nil, :is_outgoing_message? => false,
+ :comment => nil, :is_comment? => false,
+ :event_type => 'sent',
+ :created_at => Time.now - 4.days,
+ :search_text_main => ''
+ )
+end
+
diff --git a/spec/views/public_body/show.rhtml_spec.rb b/spec/views/public_body/show.rhtml_spec.rb
deleted file mode 100644
index 1a972a661..000000000
--- a/spec/views/public_body/show.rhtml_spec.rb
+++ /dev/null
@@ -1,119 +0,0 @@
-require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
-
-describe "public_body/show" do
- before do
- @pb = mock_model(PublicBody,
- :name => 'Test Quango',
- :short_name => 'tq',
- :url_name => 'testquango',
- :notes => '',
- :type_of_authority => 'A public body',
- :eir_only? => nil,
- :info_requests => [1, 2, 3, 4], # out of sync with Xapian
- :publication_scheme => '',
- :disclosure_log => '',
- :calculated_home_page => '')
- @pb.stub!(:override_request_email).and_return(nil)
- @pb.stub!(:is_requestable?).and_return(true)
- @pb.stub!(:has_notes?).and_return(false)
- @pb.stub!(:has_tag?).and_return(false)
- @xap = mock(ActsAsXapian::Search, :matches_estimated => 2)
- @xap.stub!(:results).and_return([
- { :model => mock_event },
- { :model => mock_event }
- ])
-
- assign(:public_body, @pb)
- assign(:track_thing, mock_model(TrackThing,
- :track_type => 'public_body_updates', :public_body => @pb, :params => {}))
- assign(:xapian_requests, @xap)
- assign(:page, 1)
- assign(:per_page, 10)
- end
-
- it "should be successful" do
- render
- controller.response.should be_success
- end
-
- it "should be valid HTML" do
- render
- validate_as_body response.body
- end
-
- it "should show the body's name" do
- render
- response.should have_selector('h1', :content => "Test Quango")
- end
-
- it "should tell total number of requests" do
- render
- response.should match "4 Freedom of Information requests"
- end
-
- it "should cope with no results" do
- @pb.stub!(:info_requests).and_return([])
- render
- response.should have_selector('p', :content => "Nobody has made any Freedom of Information requests")
- end
-
- it "should cope with Xapian being down" do
- assign(:xapian_requests, nil)
- render
- response.should match "The search index is currently offline"
- end
-
- it "should link to Charity Commission site if we have numbers to do so" do
- @pb.stub!(:has_tag?).and_return(true)
- @pb.stub!(:get_tag_values).and_return(['98765', '12345'])
-
- render
- response.should have_selector("div#header_right") do
- have_selector "a", :href => /charity-commission.gov.uk.*RegisteredCharityNumber=98765$/
- end
- response.should have_selector("div#header_right") do
- have_selector "a", :href => /www.charity-commission.gov.uk.*RegisteredCharityNumber=12345$/
- end
- end
-
- it "should link to Scottish Charity Regulator site if we have an SC number" do
- @pb.stub!(:has_tag?).and_return(true)
- @pb.stub!(:get_tag_values).and_return(['SC1234'])
-
- render
- response.should have_selector("div#header_right") do
- have_selector "a", :href => /www.oscr.org.uk.*id=SC1234$/
- end
- end
-
-
- it "should not link to Charity Commission site if we don't have number" do
- render
- response.should have_selector("div#header_right") do
- have_selector "a", :href => /charity-commission.gov.uk/
- end
- end
-
-
-end
-
-def mock_event
- return mock_model(InfoRequestEvent,
- :info_request => mock_model(InfoRequest,
- :title => 'Title',
- :url_title => 'title',
- :display_status => 'waiting_response',
- :calculate_status => 'waiting_response',
- :public_body => @pb,
- :is_external? => false,
- :user => mock_model(User, :name => 'Test User', :url_name => 'testuser')
- ),
- :incoming_message => nil, :is_incoming_message? => false,
- :outgoing_message => nil, :is_outgoing_message? => false,
- :comment => nil, :is_comment? => false,
- :event_type => 'sent',
- :created_at => Time.now - 4.days,
- :search_text_main => ''
- )
-end
-
diff --git a/spec/views/request/_after_actions.html.erb_spec.rb b/spec/views/request/_after_actions.html.erb_spec.rb
new file mode 100644
index 000000000..ae398f4ce
--- /dev/null
+++ b/spec/views/request/_after_actions.html.erb_spec.rb
@@ -0,0 +1,93 @@
+require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
+
+describe 'when displaying actions that can be taken with regard to a request' do
+
+ before do
+ @mock_body = mock_model(PublicBody, :name => 'test public body',
+ :url_name => 'test_public_body')
+ @mock_user = mock_model(User, :name => 'test user',
+ :url_name => 'test_user')
+ @mock_request = mock_model(InfoRequest, :title => 'test request',
+ :user => @mock_user,
+ :user_name => @mock_user.name,
+ :is_external? => false,
+ :public_body => @mock_body,
+ :comments_allowed? => true,
+ :url_title => 'test_request',
+ :all_can_view? => true)
+ assign :info_request, @mock_request
+ end
+
+ describe 'if the request is old and unclassified' do
+
+ before do
+ assign :old_unclassified, true
+ end
+
+ it 'should not display a link for the request owner to update the status of the request' do
+ render :partial => 'request/after_actions'
+ response.should have_selector('div#owner_actions') do |div|
+ div.should_not have_selector('a', :content => 'Update the status of this request')
+ end
+ end
+
+ it 'should display a link for anyone to update the status of the request' do
+ render :partial => 'request/after_actions'
+ response.should have_selector('div#anyone_actions') do |div|
+ div.should have_selector('a', :content => 'Update the status of this request')
+ end
+ end
+
+ end
+
+ describe 'if the request is not old and unclassified' do
+
+ before do
+ assign :old_unclassified, false
+ end
+
+ it 'should display a link for the request owner to update the status of the request' do
+ render :partial => 'request/after_actions'
+ response.should have_selector('div#owner_actions') do |div|
+ div.should have_selector('a', :content => 'Update the status of this request')
+ end
+ end
+
+ it 'should not display a link for anyone to update the status of the request' do
+ render :partial => 'request/after_actions'
+ response.should have_selector('div#anyone_actions') do |div|
+ div.should_not have_selector('a', :content => 'Update the status of this request')
+ end
+ end
+
+ end
+
+ it 'should display a link for the request owner to request a review' do
+ render :partial => 'request/after_actions'
+ response.should have_selector('div#owner_actions') do |div|
+ div.should have_selector('a', :content => 'Request an internal review')
+ end
+ end
+
+ describe 'if the request is viewable by all' do
+
+ it 'should display the link to download the entire request' do
+ render :partial => 'request/after_actions'
+ response.should have_selector('div#anyone_actions') do |div|
+ div.should have_selector('a', :content => 'Download a zip file of all correspondence')
+ end
+ end
+ end
+
+ describe 'if the request is not viewable by all' do
+
+ it 'should not display the link to download the entire request' do
+ @mock_request.stub!(:all_can_view?).and_return(false)
+ render :partial => 'request/after_actions'
+ response.should have_selector('div#anyone_actions') do |div|
+ div.should_not have_selector('a', :content => 'Download a zip file of all correspondence')
+ end
+ end
+ end
+
+end
diff --git a/spec/views/request/_after_actions.rhtml_spec.rb b/spec/views/request/_after_actions.rhtml_spec.rb
deleted file mode 100644
index ae398f4ce..000000000
--- a/spec/views/request/_after_actions.rhtml_spec.rb
+++ /dev/null
@@ -1,93 +0,0 @@
-require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
-
-describe 'when displaying actions that can be taken with regard to a request' do
-
- before do
- @mock_body = mock_model(PublicBody, :name => 'test public body',
- :url_name => 'test_public_body')
- @mock_user = mock_model(User, :name => 'test user',
- :url_name => 'test_user')
- @mock_request = mock_model(InfoRequest, :title => 'test request',
- :user => @mock_user,
- :user_name => @mock_user.name,
- :is_external? => false,
- :public_body => @mock_body,
- :comments_allowed? => true,
- :url_title => 'test_request',
- :all_can_view? => true)
- assign :info_request, @mock_request
- end
-
- describe 'if the request is old and unclassified' do
-
- before do
- assign :old_unclassified, true
- end
-
- it 'should not display a link for the request owner to update the status of the request' do
- render :partial => 'request/after_actions'
- response.should have_selector('div#owner_actions') do |div|
- div.should_not have_selector('a', :content => 'Update the status of this request')
- end
- end
-
- it 'should display a link for anyone to update the status of the request' do
- render :partial => 'request/after_actions'
- response.should have_selector('div#anyone_actions') do |div|
- div.should have_selector('a', :content => 'Update the status of this request')
- end
- end
-
- end
-
- describe 'if the request is not old and unclassified' do
-
- before do
- assign :old_unclassified, false
- end
-
- it 'should display a link for the request owner to update the status of the request' do
- render :partial => 'request/after_actions'
- response.should have_selector('div#owner_actions') do |div|
- div.should have_selector('a', :content => 'Update the status of this request')
- end
- end
-
- it 'should not display a link for anyone to update the status of the request' do
- render :partial => 'request/after_actions'
- response.should have_selector('div#anyone_actions') do |div|
- div.should_not have_selector('a', :content => 'Update the status of this request')
- end
- end
-
- end
-
- it 'should display a link for the request owner to request a review' do
- render :partial => 'request/after_actions'
- response.should have_selector('div#owner_actions') do |div|
- div.should have_selector('a', :content => 'Request an internal review')
- end
- end
-
- describe 'if the request is viewable by all' do
-
- it 'should display the link to download the entire request' do
- render :partial => 'request/after_actions'
- response.should have_selector('div#anyone_actions') do |div|
- div.should have_selector('a', :content => 'Download a zip file of all correspondence')
- end
- end
- end
-
- describe 'if the request is not viewable by all' do
-
- it 'should not display the link to download the entire request' do
- @mock_request.stub!(:all_can_view?).and_return(false)
- render :partial => 'request/after_actions'
- response.should have_selector('div#anyone_actions') do |div|
- div.should_not have_selector('a', :content => 'Download a zip file of all correspondence')
- end
- end
- end
-
-end
diff --git a/spec/views/request/_describe_state.html.erb_spec.rb b/spec/views/request/_describe_state.html.erb_spec.rb
new file mode 100644
index 000000000..88dea53c5
--- /dev/null
+++ b/spec/views/request/_describe_state.html.erb_spec.rb
@@ -0,0 +1,173 @@
+require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
+
+describe 'when showing the form for describing the state of a request' do
+
+ def expect_radio_button(value)
+ do_render
+ response.should have_selector('input', :type => 'radio', :value => value)
+ end
+
+ def expect_no_radio_button(value)
+ do_render
+ response.should_not have_selector('input', :type => 'radio', :value => value)
+ end
+
+ def do_render
+ render :partial => 'request/describe_state', :locals => {:id_suffix => '1'}
+ end
+
+ before do
+ @mock_user = mock_model(User, :name => 'test user', :url_name => 'test_user')
+ @mock_request = mock_model(InfoRequest,
+ :described_state => '',
+ :user => @mock_user,
+ :user_name => @mock_user.name,
+ :is_external? => false
+ )
+ assign :info_request, @mock_request
+ end
+
+ describe 'if the user is a regular user (not the request owner)' do
+
+ before do
+ assign :is_owning_user, false
+ end
+
+ describe 'if the request is not old and unclassified' do
+
+ it 'should not show the form' do
+ do_render
+ response.should_not have_selector('h2', :content => 'What best describes the status of this request now?')
+ end
+
+ it 'should give a link to login' do
+ do_render
+ response.should have_selector('a', :content => 'sign in')
+ end
+
+ end
+
+ describe 'if the request is old and unclassified' do
+
+ before do
+ assign :old_unclassified, true
+ end
+
+ it 'should not show the form' do
+ do_render
+ response.should_not have_selector('h2', :content => 'What best describes the status of this request now?')
+ end
+
+ it 'should show the form for someone else to classify the request' do
+ do_render
+ response.should have_selector('h2', :content => 'We need your help')
+ end
+
+ it 'should not give a link to login' do
+ do_render
+ response.should_not have_selector('a', :content => 'sign in')
+ end
+ end
+
+ end
+
+ describe 'if showing the form to the user owning the request' do
+
+ before do
+ assign :is_owning_user, true
+ end
+
+ describe 'when the request is not in internal review' do
+
+ before do
+ @mock_request.stub!(:described_state).and_return('waiting response')
+ end
+
+ it 'should show a radio button to set the status to "waiting response"' do
+ expect_radio_button('waiting_response')
+ end
+
+ it 'should show a radio button to set the status to "waiting clarification"' do
+ expect_radio_button('waiting_clarification')
+ end
+
+ it 'should not show a radio button to set the status to "internal_review"' do
+ expect_no_radio_button('internal_review')
+ end
+
+ end
+
+ describe 'when the user has asked to update the status of the request' do
+
+ before do
+ assign :update_status, true
+ end
+
+ it 'should show a radio button to set the status to "internal_review"' do
+ expect_radio_button('internal_review')
+ end
+
+ it 'should show a radio button to set the status to "requires_admin"' do
+ expect_radio_button('requires_admin')
+ end
+
+ it 'should show a radio button to set the status to "user_withdrawn"' do
+ expect_radio_button('user_withdrawn')
+ end
+
+ end
+
+ describe 'when the request is in internal review' do
+
+ before do
+ @mock_request.stub!(:described_state).and_return('internal_review')
+ end
+
+ it 'should show a radio button to set the status to "internal review"' do
+ expect_radio_button('internal_review')
+ end
+
+ it 'should show the text "The review has finished and overall:"' do
+ do_render
+ response.should have_selector('p', :content => 'The review has finished and overall:')
+ end
+
+ end
+
+ describe 'when request is awaiting a description and the user has not asked to update the status' do
+ end
+
+ it 'should show a radio button to set the status to "gone postal"' do
+ expect_radio_button('gone_postal')
+ end
+
+ it 'should show a radio button to set the status to "not held"' do
+ expect_radio_button('not_held')
+ end
+
+ it 'should show a radio button to set the status to "partially successful"' do
+ expect_radio_button('partially_successful')
+ end
+
+ it 'should show a radio button to set the status to "successful"' do
+ expect_radio_button('successful')
+ end
+
+ it 'should show a radio button to set the status to "rejected"' do
+ expect_radio_button('rejected')
+ end
+
+ it 'should show a radio button to set the status to "error_message"' do
+ expect_radio_button('error_message')
+ end
+
+ it 'should not show a radio button to set the status to "requires_admin"' do
+ expect_no_radio_button('requires_admin')
+ end
+
+ it 'should not show a radio button to set the status to "user_withdrawn"' do
+ expect_no_radio_button('user_withdrawn')
+ end
+
+ end
+end
diff --git a/spec/views/request/_describe_state.rhtml_spec.rb b/spec/views/request/_describe_state.rhtml_spec.rb
deleted file mode 100644
index 88dea53c5..000000000
--- a/spec/views/request/_describe_state.rhtml_spec.rb
+++ /dev/null
@@ -1,173 +0,0 @@
-require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
-
-describe 'when showing the form for describing the state of a request' do
-
- def expect_radio_button(value)
- do_render
- response.should have_selector('input', :type => 'radio', :value => value)
- end
-
- def expect_no_radio_button(value)
- do_render
- response.should_not have_selector('input', :type => 'radio', :value => value)
- end
-
- def do_render
- render :partial => 'request/describe_state', :locals => {:id_suffix => '1'}
- end
-
- before do
- @mock_user = mock_model(User, :name => 'test user', :url_name => 'test_user')
- @mock_request = mock_model(InfoRequest,
- :described_state => '',
- :user => @mock_user,
- :user_name => @mock_user.name,
- :is_external? => false
- )
- assign :info_request, @mock_request
- end
-
- describe 'if the user is a regular user (not the request owner)' do
-
- before do
- assign :is_owning_user, false
- end
-
- describe 'if the request is not old and unclassified' do
-
- it 'should not show the form' do
- do_render
- response.should_not have_selector('h2', :content => 'What best describes the status of this request now?')
- end
-
- it 'should give a link to login' do
- do_render
- response.should have_selector('a', :content => 'sign in')
- end
-
- end
-
- describe 'if the request is old and unclassified' do
-
- before do
- assign :old_unclassified, true
- end
-
- it 'should not show the form' do
- do_render
- response.should_not have_selector('h2', :content => 'What best describes the status of this request now?')
- end
-
- it 'should show the form for someone else to classify the request' do
- do_render
- response.should have_selector('h2', :content => 'We need your help')
- end
-
- it 'should not give a link to login' do
- do_render
- response.should_not have_selector('a', :content => 'sign in')
- end
- end
-
- end
-
- describe 'if showing the form to the user owning the request' do
-
- before do
- assign :is_owning_user, true
- end
-
- describe 'when the request is not in internal review' do
-
- before do
- @mock_request.stub!(:described_state).and_return('waiting response')
- end
-
- it 'should show a radio button to set the status to "waiting response"' do
- expect_radio_button('waiting_response')
- end
-
- it 'should show a radio button to set the status to "waiting clarification"' do
- expect_radio_button('waiting_clarification')
- end
-
- it 'should not show a radio button to set the status to "internal_review"' do
- expect_no_radio_button('internal_review')
- end
-
- end
-
- describe 'when the user has asked to update the status of the request' do
-
- before do
- assign :update_status, true
- end
-
- it 'should show a radio button to set the status to "internal_review"' do
- expect_radio_button('internal_review')
- end
-
- it 'should show a radio button to set the status to "requires_admin"' do
- expect_radio_button('requires_admin')
- end
-
- it 'should show a radio button to set the status to "user_withdrawn"' do
- expect_radio_button('user_withdrawn')
- end
-
- end
-
- describe 'when the request is in internal review' do
-
- before do
- @mock_request.stub!(:described_state).and_return('internal_review')
- end
-
- it 'should show a radio button to set the status to "internal review"' do
- expect_radio_button('internal_review')
- end
-
- it 'should show the text "The review has finished and overall:"' do
- do_render
- response.should have_selector('p', :content => 'The review has finished and overall:')
- end
-
- end
-
- describe 'when request is awaiting a description and the user has not asked to update the status' do
- end
-
- it 'should show a radio button to set the status to "gone postal"' do
- expect_radio_button('gone_postal')
- end
-
- it 'should show a radio button to set the status to "not held"' do
- expect_radio_button('not_held')
- end
-
- it 'should show a radio button to set the status to "partially successful"' do
- expect_radio_button('partially_successful')
- end
-
- it 'should show a radio button to set the status to "successful"' do
- expect_radio_button('successful')
- end
-
- it 'should show a radio button to set the status to "rejected"' do
- expect_radio_button('rejected')
- end
-
- it 'should show a radio button to set the status to "error_message"' do
- expect_radio_button('error_message')
- end
-
- it 'should not show a radio button to set the status to "requires_admin"' do
- expect_no_radio_button('requires_admin')
- end
-
- it 'should not show a radio button to set the status to "user_withdrawn"' do
- expect_no_radio_button('user_withdrawn')
- end
-
- end
-end
diff --git a/spec/views/request/list.html.erb_spec.rb b/spec/views/request/list.html.erb_spec.rb
new file mode 100644
index 000000000..521d946bc
--- /dev/null
+++ b/spec/views/request/list.html.erb_spec.rb
@@ -0,0 +1,49 @@
+require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
+
+describe "request/list" do
+
+ before do
+ assign :page, 1
+ assign :per_page, 10
+ end
+
+ def make_mock_event
+ return mock_model(InfoRequestEvent,
+ :info_request => mock_model(InfoRequest,
+ :title => 'Title',
+ :url_title => 'title',
+ :display_status => 'awaiting_response',
+ :calculate_status => 'awaiting_response',
+ :public_body => mock_model(PublicBody, :name => 'Test Quango', :url_name => 'testquango'),
+ :user => mock_model(User, :name => 'Test User', :url_name => 'testuser'),
+ :is_external? => false
+ ),
+ :incoming_message => nil, :is_incoming_message? => false,
+ :outgoing_message => nil, :is_outgoing_message? => false,
+ :comment => nil, :is_comment? => false,
+ :event_type => 'sent',
+ :created_at => Time.now - 4.days,
+ :search_text_main => ''
+ )
+ end
+
+ it "should be successful" do
+ assign :list_results, [ make_mock_event, make_mock_event ]
+ assign :matches_estimated, 2
+ assign :show_no_more_than, 100
+ render
+ response.should have_selector("div.request_listing")
+ response.should_not have_selector("p", :content => "No requests of this sort yet")
+ end
+
+ it "should cope with no results" do
+ assign :list_results, [ ]
+ assign :matches_estimated, 0
+ assign :show_no_more_than, 0
+ render
+ response.should have_selector("p", :content => "No requests of this sort yet")
+ response.should_not have_selector("div.request_listing")
+ end
+
+end
+
diff --git a/spec/views/request/list.rhtml_spec.rb b/spec/views/request/list.rhtml_spec.rb
deleted file mode 100644
index 521d946bc..000000000
--- a/spec/views/request/list.rhtml_spec.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
-
-describe "request/list" do
-
- before do
- assign :page, 1
- assign :per_page, 10
- end
-
- def make_mock_event
- return mock_model(InfoRequestEvent,
- :info_request => mock_model(InfoRequest,
- :title => 'Title',
- :url_title => 'title',
- :display_status => 'awaiting_response',
- :calculate_status => 'awaiting_response',
- :public_body => mock_model(PublicBody, :name => 'Test Quango', :url_name => 'testquango'),
- :user => mock_model(User, :name => 'Test User', :url_name => 'testuser'),
- :is_external? => false
- ),
- :incoming_message => nil, :is_incoming_message? => false,
- :outgoing_message => nil, :is_outgoing_message? => false,
- :comment => nil, :is_comment? => false,
- :event_type => 'sent',
- :created_at => Time.now - 4.days,
- :search_text_main => ''
- )
- end
-
- it "should be successful" do
- assign :list_results, [ make_mock_event, make_mock_event ]
- assign :matches_estimated, 2
- assign :show_no_more_than, 100
- render
- response.should have_selector("div.request_listing")
- response.should_not have_selector("p", :content => "No requests of this sort yet")
- end
-
- it "should cope with no results" do
- assign :list_results, [ ]
- assign :matches_estimated, 0
- assign :show_no_more_than, 0
- render
- response.should have_selector("p", :content => "No requests of this sort yet")
- response.should_not have_selector("div.request_listing")
- end
-
-end
-
diff --git a/spec/views/request/show.html.erb_spec.rb b/spec/views/request/show.html.erb_spec.rb
new file mode 100644
index 000000000..cc5226847
--- /dev/null
+++ b/spec/views/request/show.html.erb_spec.rb
@@ -0,0 +1,109 @@
+require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
+
+describe 'when viewing an information request' do
+
+ before do
+ @mock_body = mock_model(PublicBody, :name => 'test body',
+ :url_name => 'test_body',
+ :is_school? => false)
+ @mock_user = mock_model(User, :name => 'test user',
+ :url_name => 'test_user',
+ :profile_photo => nil)
+ @mock_request = mock_model(InfoRequest, :title => 'test request',
+ :awaiting_description => false,
+ :law_used_with_a => 'A Freedom of Information request',
+ :law_used_full => 'Freedom of Information',
+ :public_body => @mock_body,
+ :user => @mock_user,
+ :user_name => @mock_user.name,
+ :is_external? => false,
+ :calculate_status => 'waiting_response',
+ :date_response_required_by => Date.today,
+ :prominence => 'normal')
+ end
+
+ def request_page
+ assign :info_request, @mock_request
+ assign :info_request_events, []
+ assign :status, @mock_request.calculate_status
+ # This is so icky!
+ view.stub!(:_render_partial)
+ render :template => 'request/show'
+ end
+
+ describe 'when a status update has been requested' do
+
+ before do
+ assign :update_status, true
+ end
+
+ it 'should show the first form for describing the state of the request' do
+ request_page
+ response.should have_selector("div.describe_state_form#describe_state_form_1")
+ end
+
+ end
+
+ describe 'when it is awaiting a description' do
+
+ before do
+ @mock_request.stub!(:awaiting_description).and_return(true)
+ end
+
+ it 'should show the first form for describing the state of the request' do
+ request_page
+ response.should have_selector("div.describe_state_form#describe_state_form_1")
+ end
+
+ it 'should show the second form for describing the state of the request' do
+ request_page
+ response.should have_selector("div.describe_state_form#describe_state_form_2")
+ end
+
+ end
+
+ describe 'when the user is the request owner' do
+
+ before do
+ assign :is_owning_user, true
+ end
+
+ describe 'when the request status is "waiting clarification"' do
+
+ before do
+ @mock_request.stub!(:calculate_status).and_return('waiting_clarification')
+ end
+
+ describe 'when there is a last response' do
+
+ before do
+ @mock_response = mock_model(IncomingMessage)
+ @mock_request.stub!(:get_last_response).and_return(@mock_response)
+ end
+
+
+ it 'should show a link to follow up the last response with clarification' do
+ request_page
+ expected_url = "http://test.host/en/request/#{@mock_request.id}/response/#{@mock_response.id}#followup"
+ response.should have_selector("a", :href => expected_url, :content => 'send a follow up message')
+ end
+
+ end
+
+ describe 'when there is no last response' do
+
+ before do
+ @mock_request.stub!(:get_last_response).and_return(nil)
+ end
+
+
+ it 'should show a link to follow up the request without reference to a specific response' do
+ request_page
+ expected_url = "http://test.host/en/request/#{@mock_request.id}/response#followup"
+ response.should have_selector("a", :href => expected_url, :content => 'send a follow up message')
+ end
+ end
+ end
+
+ end
+end
diff --git a/spec/views/request/show.rhtml_spec.rb b/spec/views/request/show.rhtml_spec.rb
deleted file mode 100644
index cc5226847..000000000
--- a/spec/views/request/show.rhtml_spec.rb
+++ /dev/null
@@ -1,109 +0,0 @@
-require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
-
-describe 'when viewing an information request' do
-
- before do
- @mock_body = mock_model(PublicBody, :name => 'test body',
- :url_name => 'test_body',
- :is_school? => false)
- @mock_user = mock_model(User, :name => 'test user',
- :url_name => 'test_user',
- :profile_photo => nil)
- @mock_request = mock_model(InfoRequest, :title => 'test request',
- :awaiting_description => false,
- :law_used_with_a => 'A Freedom of Information request',
- :law_used_full => 'Freedom of Information',
- :public_body => @mock_body,
- :user => @mock_user,
- :user_name => @mock_user.name,
- :is_external? => false,
- :calculate_status => 'waiting_response',
- :date_response_required_by => Date.today,
- :prominence => 'normal')
- end
-
- def request_page
- assign :info_request, @mock_request
- assign :info_request_events, []
- assign :status, @mock_request.calculate_status
- # This is so icky!
- view.stub!(:_render_partial)
- render :template => 'request/show'
- end
-
- describe 'when a status update has been requested' do
-
- before do
- assign :update_status, true
- end
-
- it 'should show the first form for describing the state of the request' do
- request_page
- response.should have_selector("div.describe_state_form#describe_state_form_1")
- end
-
- end
-
- describe 'when it is awaiting a description' do
-
- before do
- @mock_request.stub!(:awaiting_description).and_return(true)
- end
-
- it 'should show the first form for describing the state of the request' do
- request_page
- response.should have_selector("div.describe_state_form#describe_state_form_1")
- end
-
- it 'should show the second form for describing the state of the request' do
- request_page
- response.should have_selector("div.describe_state_form#describe_state_form_2")
- end
-
- end
-
- describe 'when the user is the request owner' do
-
- before do
- assign :is_owning_user, true
- end
-
- describe 'when the request status is "waiting clarification"' do
-
- before do
- @mock_request.stub!(:calculate_status).and_return('waiting_clarification')
- end
-
- describe 'when there is a last response' do
-
- before do
- @mock_response = mock_model(IncomingMessage)
- @mock_request.stub!(:get_last_response).and_return(@mock_response)
- end
-
-
- it 'should show a link to follow up the last response with clarification' do
- request_page
- expected_url = "http://test.host/en/request/#{@mock_request.id}/response/#{@mock_response.id}#followup"
- response.should have_selector("a", :href => expected_url, :content => 'send a follow up message')
- end
-
- end
-
- describe 'when there is no last response' do
-
- before do
- @mock_request.stub!(:get_last_response).and_return(nil)
- end
-
-
- it 'should show a link to follow up the request without reference to a specific response' do
- request_page
- expected_url = "http://test.host/en/request/#{@mock_request.id}/response#followup"
- response.should have_selector("a", :href => expected_url, :content => 'send a follow up message')
- end
- end
- end
-
- end
-end
diff --git a/spec/views/request_game/play.html.erb_spec.rb b/spec/views/request_game/play.html.erb_spec.rb
new file mode 100644
index 000000000..b5cf57c23
--- /dev/null
+++ b/spec/views/request_game/play.html.erb_spec.rb
@@ -0,0 +1,37 @@
+require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
+
+describe 'request_game/play' do
+
+ before do
+ @mock_body = mock_model(PublicBody, :name => 'test body',
+ :url_name => 'test_body',
+ :is_school? => false)
+ @mock_user = mock_model(User, :name => 'test user',
+ :url_name => 'test_user',
+ :profile_photo => nil)
+ @mock_request = mock_model(InfoRequest, :title => 'test request',
+ :awaiting_description => false,
+ :law_used_with_a => 'A Freedom of Information request',
+ :law_used_full => 'Freedom of Information',
+ :public_body => @mock_body,
+ :url_title => 'a_test_request',
+ :user => @mock_user,
+ :calculate_status => 'waiting_response',
+ :date_response_required_by => Date.today,
+ :prominence => 'normal',
+ :initial_request_text => 'hi there',
+ :display_status => 'Awaiting categorisation',
+ :created_at => Time.now)
+ assign :league_table_28_days, []
+ assign :league_table_all_time, []
+ assign :requests, [@mock_request]
+ assign :play_urls, true
+ end
+
+ it 'should show the correct url for a request' do
+ render
+ response.should include("/categorise/request/a_test_request")
+ end
+
+
+end
diff --git a/spec/views/request_game/play.rhtml_spec.rb b/spec/views/request_game/play.rhtml_spec.rb
deleted file mode 100644
index b5cf57c23..000000000
--- a/spec/views/request_game/play.rhtml_spec.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__)
-
-describe 'request_game/play' do
-
- before do
- @mock_body = mock_model(PublicBody, :name => 'test body',
- :url_name => 'test_body',
- :is_school? => false)
- @mock_user = mock_model(User, :name => 'test user',
- :url_name => 'test_user',
- :profile_photo => nil)
- @mock_request = mock_model(InfoRequest, :title => 'test request',
- :awaiting_description => false,
- :law_used_with_a => 'A Freedom of Information request',
- :law_used_full => 'Freedom of Information',
- :public_body => @mock_body,
- :url_title => 'a_test_request',
- :user => @mock_user,
- :calculate_status => 'waiting_response',
- :date_response_required_by => Date.today,
- :prominence => 'normal',
- :initial_request_text => 'hi there',
- :display_status => 'Awaiting categorisation',
- :created_at => Time.now)
- assign :league_table_28_days, []
- assign :league_table_all_time, []
- assign :requests, [@mock_request]
- assign :play_urls, true
- end
-
- it 'should show the correct url for a request' do
- render
- response.should include("/categorise/request/a_test_request")
- end
-
-
-end
--
cgit v1.2.3
+ <%# When not logged in, but mid-comment-leaving, there'll be no comment.user %> + <%= comment.user ? user_link(comment.user) : _("You") %> <%= _("left an annotation") %> (<%= simple_date(comment.created_at || Time.now) %>) +
++
+ <%= comment.get_body_for_html_display %>
+
++ <% if !comment.id.nil? %> + <%= link_to "Link to this", comment_url(comment), :class => "link_to_this" %> + <% if !@user.nil? && @user.admin_page_links? %> + | <%= link_to "Admin", admin_url("request/edit_comment/" + comment.id.to_s) %> + <% end %> + + <% end %> +
+