aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin_general/_change_request_summary.html.erb60
-rw-r--r--app/views/admin_general/index.html.erb32
-rw-r--r--app/views/admin_public_body/_form.html.erb4
-rw-r--r--app/views/admin_public_body/new.html.erb4
-rw-r--r--app/views/admin_public_body/show.html.erb5
-rw-r--r--app/views/admin_public_body_change_requests/_response.html.erb15
-rw-r--r--app/views/admin_public_body_change_requests/add_accepted.txt.erb9
-rw-r--r--app/views/admin_public_body_change_requests/edit.html.erb8
-rw-r--r--app/views/admin_public_body_change_requests/update_accepted.txt.erb7
-rw-r--r--app/views/admin_request/_some_annotations.html.erb48
-rw-r--r--app/views/admin_request/show.html.erb49
-rw-r--r--app/views/admin_user/_form.html.erb9
-rw-r--r--app/views/admin_user/show.html.erb6
-rw-r--r--app/views/comment/_comment_form.html.erb2
-rw-r--r--app/views/contact_mailer/add_public_body.text.erb19
-rw-r--r--app/views/contact_mailer/update_public_body_email.text.erb16
-rw-r--r--app/views/general/_localised_datepicker.html.erb10
-rw-r--r--app/views/help/api.html.erb10
-rw-r--r--app/views/help/officers.html.erb6
-rw-r--r--app/views/help/privacy.html.erb7
-rw-r--r--app/views/help/requesting.html.erb4
-rw-r--r--app/views/info_request_batch/_info_request_batch.html.erb15
-rw-r--r--app/views/info_request_batch/show.html.erb25
-rw-r--r--app/views/info_request_batch_mailer/batch_sent.text.erb15
-rw-r--r--app/views/outgoing_mailer/initial_request.text.erb2
-rw-r--r--app/views/public_body/show.html.erb1
-rw-r--r--app/views/public_body_change_requests/new.html.erb61
-rw-r--r--app/views/reports/new.html.erb8
-rw-r--r--app/views/request/_list_results.html.erb12
-rw-r--r--app/views/request/batch_not_allowed.html.erb1
-rw-r--r--app/views/request/list.html.erb22
-rw-r--r--app/views/request/new.html.erb142
-rw-r--r--app/views/request/preview.html.erb24
-rw-r--r--app/views/request/select_authorities.html.erb77
-rw-r--r--app/views/request/select_authority.html.erb7
-rw-r--r--app/views/request/show.html.erb6
-rw-r--r--app/views/track/_tracking_links.html.erb2
-rw-r--r--app/views/user/show.html.erb11
-rw-r--r--app/views/user/sign.html.erb2
-rw-r--r--app/views/user/wall.html.erb25
40 files changed, 633 insertions, 155 deletions
diff --git a/app/views/admin_general/_change_request_summary.html.erb b/app/views/admin_general/_change_request_summary.html.erb
new file mode 100644
index 000000000..bec49c12c
--- /dev/null
+++ b/app/views/admin_general/_change_request_summary.html.erb
@@ -0,0 +1,60 @@
+<table class="table table-striped table-condensed">
+ <tbody>
+ <tr>
+ <td>
+ <b>Authority</b>
+ </td>
+ <td>
+ <%= @change_request.get_public_body_name %>
+ </td>
+ </tr>
+
+ <% if @change_request.public_body %>
+ <tr>
+ <td>
+ <b>Current address</b>
+ </td>
+ <td>
+ <%= @change_request.public_body.request_email %>
+ </td>
+ </tr>
+ <% end %>
+
+ <tr>
+ <td>
+ <b>Suggested address</b>
+ </td>
+ <td>
+ <%= @change_request.public_body_email %>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <b>Source</b>
+ </td>
+ <td>
+ <%= @change_request.source_url %>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <b>Requested by</b>
+ </td>
+ <td>
+ <%= @change_request.get_user_name %> (<%= @change_request.get_user_email %>)
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <b>Requested on</b>
+ </td>
+ <td>
+ <%= I18n.l(@change_request.created_at, :format => "%e %B %Y %H:%M:%S") %>
+ (<%= "#{time_ago_in_words(@change_request.created_at)} ago" %>)
+ </td>
+ </tr>
+ </tbody>
+</table>
diff --git a/app/views/admin_general/index.html.erb b/app/views/admin_general/index.html.erb
index 976860fa7..2202663be 100644
--- a/app/views/admin_general/index.html.erb
+++ b/app/views/admin_general/index.html.erb
@@ -174,9 +174,39 @@
</div>
</div>
<% end %>
+
+ <% if @new_body_requests.size > 0 %>
+ <div class="accordion-group">
+ <div class="accordion-heading">
+ <a class="accordion-toggle" href="#new-authorities" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%= @new_body_requests.size %></span><%= chevron_right %> Add new authorities</a>
+ </div>
+ <div id="new-authorities" class="accordion-body collapse">
+ <% for @change_request in @new_body_requests %>
+ <%= render :partial => 'change_request_summary'%>
+ <%= link_to("Close and respond", admin_change_request_edit_path(@change_request), :class => 'btn') %>
+ <%= link_to("Add authority", admin_body_new_path(:change_request_id => @change_request.id), :class => 'btn btn-primary') %>
+ <% end %>
+ </div>
+ </div>
+ <% end %>
+
+ <% if @body_update_requests.size > 0 %>
+ <div class="accordion-group">
+ <div class="accordion-heading">
+ <a class="accordion-toggle" href="#update-authorities" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%= @body_update_requests.size %></span><%= chevron_right %> Update authorities</a>
+ </div>
+ <div id="update-authorities" class="accordion-body collapse">
+ <% for @change_request in @body_update_requests %>
+ <%= render :partial => 'change_request_summary' %>
+ <%= link_to("Close and respond", admin_change_request_edit_path(@change_request), :class => 'btn') %>
+ <%= link_to("Make update", admin_body_edit_path(@change_request.public_body, :change_request_id => @change_request.id), :class => 'btn btn-primary') %>
+ <% end %>
+ </div>
+ </div>
+ <% end %>
</div>
-<% if @holding_pen_messages.size == 0 && @old_unclassified.size == 0 && @requires_admin_requests.size == 0 && @blank_contacts.size == 0 && @attention_requests.size == 0 %>
+<% if @holding_pen_messages.size == 0 && @old_unclassified.size == 0 && @requires_admin_requests.size == 0 && @blank_contacts.size == 0 && @attention_requests.size == 0 && @new_body_requests.size == 0 && @body_update_requests.size == 0 %>
<div class="row">
<div class="span12 alert alert-success">
No pending administration required.
diff --git a/app/views/admin_public_body/_form.html.erb b/app/views/admin_public_body/_form.html.erb
index 5a80386ec..2da13ab01 100644
--- a/app/views/admin_public_body/_form.html.erb
+++ b/app/views/admin_public_body/_form.html.erb
@@ -95,4 +95,8 @@
<p class="help-block">put URL or other source of new info</p>
</div>
</div>
+<% if @change_request %>
+ <%= render :partial => 'admin_public_body_change_requests/response' %>
+
+<% end %>
<!--[eoform:public_body]-->
diff --git a/app/views/admin_public_body/new.html.erb b/app/views/admin_public_body/new.html.erb
index 13e8238d6..24b27d7af 100644
--- a/app/views/admin_public_body/new.html.erb
+++ b/app/views/admin_public_body/new.html.erb
@@ -6,13 +6,15 @@
<div id="public_body_form">
<%= form_for @public_body, :as => :public_body, :url => admin_body_create_path, :html => {:class => "form form-horizontal"} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
+
+
<div class="form-actions">
<%= f.submit "Create", :class => "btn btn-primary" %>
</div>
<% end %>
<div class="row">
<div class="span8 well">
- <%= link_to _('List all'), 'list' %>
+ <%= link_to 'List all', admin_body_list_path, :class => "btn" %>
</div>
</div>
</div>
diff --git a/app/views/admin_public_body/show.html.erb b/app/views/admin_public_body/show.html.erb
index 8262287d5..f8161db26 100644
--- a/app/views/admin_public_body/show.html.erb
+++ b/app/views/admin_public_body/show.html.erb
@@ -67,7 +67,10 @@
</div>
<% if i == versions.length - 1 %>
<div class="span6">
- <%=_("This is the first version.")%>
+ <p>“<%= h(historic_public_body.last_edit_comment) %>”</p>
+ <ul>
+ <li><%=_("This is the first version.")%></li>
+ </ul>
</div>
<% else %>
<div class="span6">
diff --git a/app/views/admin_public_body_change_requests/_response.html.erb b/app/views/admin_public_body_change_requests/_response.html.erb
new file mode 100644
index 000000000..7fda8b7f8
--- /dev/null
+++ b/app/views/admin_public_body_change_requests/_response.html.erb
@@ -0,0 +1,15 @@
+<h3>Response to change request (will be emailed to user):</h3>
+<%= hidden_field_tag 'change_request_id', @change_request.id %>
+<div class="control-group" id="change_request_user_subject">
+ <label for="change_request_user_subject_field" class="control-label">Subject of email:</label>
+ <div class="controls">
+ <%= text_field_tag "subject", (params[:subject] || @change_request.default_response_subject), {:id => "change_request_user_subject_field", :class => "span6"} %>
+ </div>
+</div>
+
+<div class="control-group" id="change_request_user_response">
+ <label for="change_request_user_response_field" class="control-label">Response</label>
+ <div class="controls">
+ <%= text_area_tag "response", (params[:response] || h(@change_request_user_response)), {:id => "change_request_user_response_field", :rows => 10, :class => 'span6'} %>
+ </div>
+</div>
diff --git a/app/views/admin_public_body_change_requests/add_accepted.txt.erb b/app/views/admin_public_body_change_requests/add_accepted.txt.erb
new file mode 100644
index 000000000..fb22466b0
--- /dev/null
+++ b/app/views/admin_public_body_change_requests/add_accepted.txt.erb
@@ -0,0 +1,9 @@
+<%= _("Dear {{user_name}},", :user_name => @change_request.get_user_name) %>
+
+<%= _("Thanks for your suggestion to add {{public_body_name}}. It's been added to the site here:", :public_body_name => @change_request.public_body_name) %>
+
+<%= _("[Authority URL will be inserted here]")%>
+
+<%= _("Yours,") %>
+
+<%= _("The {{site_name}} team.", :site_name => site_name) %>
diff --git a/app/views/admin_public_body_change_requests/edit.html.erb b/app/views/admin_public_body_change_requests/edit.html.erb
new file mode 100644
index 000000000..cc9c5b5d9
--- /dev/null
+++ b/app/views/admin_public_body_change_requests/edit.html.erb
@@ -0,0 +1,8 @@
+<h1><%=@title%></h1>
+
+<%= form_tag admin_change_request_update_path(@change_request), :class => "form form-horizontal" do %>
+ <%= render :partial => 'admin_public_body_change_requests/response'%>
+ <div class="form-actions">
+ <%= submit_tag 'Close', :accesskey => 'c', :class => "btn btn-primary" %>
+ </div>
+<% end %>
diff --git a/app/views/admin_public_body_change_requests/update_accepted.txt.erb b/app/views/admin_public_body_change_requests/update_accepted.txt.erb
new file mode 100644
index 000000000..9c29c959b
--- /dev/null
+++ b/app/views/admin_public_body_change_requests/update_accepted.txt.erb
@@ -0,0 +1,7 @@
+<%= _("Dear {{user_name}},", :user_name => @change_request.get_user_name) %>
+
+<%= _("Thanks for your suggestion to update the email address for {{public_body_name}} to {{public_body_email}}. This has now been done and any new requests will be sent to the new address.", :public_body_name => @change_request.public_body.name, :public_body_email => @change_request.public_body_email) %>
+
+<%= _("Yours,") %>
+
+<%= _("The {{site_name}} team.", :site_name => site_name) %>
diff --git a/app/views/admin_request/_some_annotations.html.erb b/app/views/admin_request/_some_annotations.html.erb
new file mode 100644
index 000000000..dfd46f828
--- /dev/null
+++ b/app/views/admin_request/_some_annotations.html.erb
@@ -0,0 +1,48 @@
+<% if comments.size > 0 %>
+ <div class="accordion" id="comments">
+ <% for comment in comments %>
+ <div class="accordion-group">
+ <div class="accordion-heading">
+ <a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="#comments"><%= chevron_right %></a>
+ <%= link_to admin_request_edit_comment_path(comment) do %>
+ #<%=comment.id%>
+ --
+ <%=h(comment.user.name)%>
+ <%=admin_value(comment.created_at)%>
+ <% end %>
+ <blockquote class="incoming-message">
+ <%= truncate(comment.body, :length => 400) %>
+ </blockquote>
+ </div>
+ <div id="comment_<%=comment.id%>" class="accordion-body collapse">
+ <table class="table table-striped table-condensed">
+ <tbody>
+ <tr>
+ <td colspan="2">
+ By <%= user_both_links(comment.user) %>
+ </td>
+ </tr>
+ <% comment.for_admin_column do |name, value, type, column_name |%>
+ <tr>
+ <td>
+ <b><%=name%></b>
+ </td>
+ <td>
+ <% if column_name == 'body' && !comment.visible %>
+ <s><%=h comment.send(column_name) %></s>
+ <% else %>
+ <%=h comment.send(column_name) %>
+ <% end %>
+ </td>
+ </tr>
+ <% end %>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <% end %>
+ </div>
+<% else %>
+ <p>None yet.</p>
+<% end %>
+
diff --git a/app/views/admin_request/show.html.erb b/app/views/admin_request/show.html.erb
index 83d9c3764..2589e52b4 100644
--- a/app/views/admin_request/show.html.erb
+++ b/app/views/admin_request/show.html.erb
@@ -325,53 +325,8 @@
<hr>
<h2>Annotations</h2>
-<% if @info_request.comments.size > 0 %>
- <div class="accordion" id="comments">
- <% for comment in @info_request.comments %>
- <div class="accordion-group">
- <div class="accordion-heading">
- <a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="#comments"><%= chevron_right %></a>
- <%= link_to admin_request_edit_comment_path(comment) do %>
- #<%=comment.id%>
- --
- <%=h(comment.user.name)%>
- <%=admin_value(comment.created_at)%>
- <% end %>
- <blockquote class="incoming-message">
- <%= truncate(comment.body, :length => 400) %>
- </blockquote>
- </div>
- <div id="comment_<%=comment.id%>" class="accordion-body collapse">
- <table class="table table-striped table-condensed">
- <tbody>
- <tr>
- <td colspan="2">
- By <%= user_both_links(comment.user) %>
- </td>
- </tr>
- <% comment.for_admin_column do |name, value, type, column_name |%>
- <tr>
- <td>
- <b><%=name%></b>
- </td>
- <td>
- <% if column_name == 'body' && !comment.visible %>
- <s><%=h comment.send(column_name) %></s>
- <% else %>
- <%=h comment.send(column_name) %>
- <% end %>
- </td>
- </tr>
- <% end %>
- </tbody>
- </table>
- </div>
- </div>
- <% end %>
- </div>
-<% else %>
- <p>None yet.</p>
-<% end %>
+<%= render :partial => 'admin_request/some_annotations' , :locals => { :comments => @info_request.comments } %>
+
<hr>
<h2>Mail server delivery logs</h2>
diff --git a/app/views/admin_user/_form.html.erb b/app/views/admin_user/_form.html.erb
index e7175d09c..f1edc0927 100644
--- a/app/views/admin_user/_form.html.erb
+++ b/app/views/admin_user/_form.html.erb
@@ -64,3 +64,12 @@
</div>
</div>
</div>
+<div class="control-group">
+ <label for="admin_user_can_make_batch_requests" class="control-label">Can make batch requests</label>
+ <div class="controls">
+ <%= check_box 'admin_user', 'can_make_batch_requests' %>
+ <div class="help-block">
+ allows the user to send a request to multiple authorities at once
+ </div>
+ </div>
+</div>
diff --git a/app/views/admin_user/show.html.erb b/app/views/admin_user/show.html.erb
index c93c08e50..6d12aeff5 100644
--- a/app/views/admin_user/show.html.erb
+++ b/app/views/admin_user/show.html.erb
@@ -91,6 +91,12 @@
<hr>
+<h2>Annotations</h2>
+
+<%= render :partial => 'admin_request/some_annotations' , :locals => { :comments => @admin_user.comments } %>
+
+<hr>
+
<h2>Censor rules</h2>
<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @admin_user.censor_rules, :user => @admin_user } %>
diff --git a/app/views/comment/_comment_form.html.erb b/app/views/comment/_comment_form.html.erb
index b78532768..6ca3f4c9f 100644
--- a/app/views/comment/_comment_form.html.erb
+++ b/app/views/comment/_comment_form.html.erb
@@ -3,7 +3,7 @@
<%= f.text_area :body, :rows => 10, :cols => 55 %>
</p>
- <% if !TrackThing.find_by_existing_track(@user, track_thing) && (!@user || @info_request.user != @user) %>
+ <% if !TrackThing.find_existing(@user, track_thing) && (!@user || @info_request.user != @user) %>
<p>
<%= check_box_tag 'subscribe_to_request', "1", params[:subscribe_to_request] ? true : false %> <label for="subscribe_to_request"><%= _('Email me future updates to this request') %></label>
</p>
diff --git a/app/views/contact_mailer/add_public_body.text.erb b/app/views/contact_mailer/add_public_body.text.erb
new file mode 100644
index 000000000..5baa1fa1a
--- /dev/null
+++ b/app/views/contact_mailer/add_public_body.text.erb
@@ -0,0 +1,19 @@
+<%= _("{{user_name}} would like a new authority added to {{site_name}}", :user_name => @change_request.get_user_name, :site_name => site_name) %>
+
+<%= _("Authority:") %>
+<%= @change_request.get_public_body_name %>
+
+<%= _("Email:") %>
+<%= @change_request.public_body_email %>
+
+<%= _("Source:") %>
+<%= @change_request.source_url %>
+
+<%= _("Notes:") %>
+<%= @change_request.notes %>
+
+<%= _('Add the authority:') %>
+<%= admin_body_new_url(:change_request_id => @change_request.id, :only_path => false ) %>
+
+<%= _('Close the request and respond:') %>
+<%= admin_change_request_edit_url(:id => @change_request.id, :only_path => false ) %>
diff --git a/app/views/contact_mailer/update_public_body_email.text.erb b/app/views/contact_mailer/update_public_body_email.text.erb
new file mode 100644
index 000000000..7d5a3dae0
--- /dev/null
+++ b/app/views/contact_mailer/update_public_body_email.text.erb
@@ -0,0 +1,16 @@
+<%= _("{{user_name}} would like the email address for {{public_body_name}} to be updated", :user_name => @change_request.get_user_name, :public_body_name => @change_request.get_public_body_name) %>
+
+<%= _("Email:") %>
+<%= @change_request.public_body_email %>
+
+<%= _("Source:") %>
+<%= @change_request.source_url %>
+
+<%= _("Notes:") %>
+<%= @change_request.notes %>
+
+<%= _('Update the address:') %>
+<%= admin_body_edit_path(@change_request.public_body, :change_request_id => @change_request.id, :only_path => false) %>
+
+<%= _('Close the request and respond:') %>
+<%= admin_change_request_edit_url(:id => @change_request.id, :only_path => false ) %>
diff --git a/app/views/general/_localised_datepicker.html.erb b/app/views/general/_localised_datepicker.html.erb
index ec6593ea0..ee3206957 100644
--- a/app/views/general/_localised_datepicker.html.erb
+++ b/app/views/general/_localised_datepicker.html.erb
@@ -1,16 +1,16 @@
<script type="text/javascript">
$(function() {
$(".use-datepicker").datepicker(
- {closeText: '<%= _("Done") %>',
- prevText: '<%= _("Prev") %>',
- nextText: '<%= _("Next") %>',
- currentText: '<%= _("Today") %>',
+ {closeText: '<%= j _("Done") %>',
+ prevText: '<%= j _("Prev") %>',
+ nextText: '<%= j _("Next") %>',
+ currentText: '<%= j _("Today") %>',
monthNames: <%= raw I18n.translate('date.month_names')[1..-1].to_json %>,
monthNamesShort: <%= raw I18n.translate('date.abbr_month_names')[1..-1].to_json %>,
dayNames: <%= raw I18n.translate('date.day_names').to_json %>,
dayNamesShort: <%= raw I18n.translate('date.abbr_day_names').to_json %>,
dayNamesMin: <%= raw I18n.translate('date.abbr_day_names').collect{|x| x[0..0]}.to_json %>,
- weekHeader: '<%= _("Wk") %>',
+ weekHeader: '<%= j _("Wk") %>',
dateFormat: '<%= I18n.translate('date.formats.default').sub("%Y", "yy").sub("%m", "mm").sub("%d", "dd").gsub("-", "/") %>'}
);
});
diff --git a/app/views/help/api.html.erb b/app/views/help/api.html.erb
index df7bb30b6..c6488f93e 100644
--- a/app/views/help/api.html.erb
+++ b/app/views/help/api.html.erb
@@ -71,7 +71,15 @@
</p>
</dd>
- </dl>
+
+
+ <dt> 5. Write API </dt>
+ <dd>
+ <p>
+ The write API is designed to be used by authorities to create their own requests in the system. The API is currently used by mySociety's <a href="https://github.com/mysociety/foi-register">FOI Register software</a> to support using Alaveteli as a disclosure log for all FOI activity at a particular public body. More technical information about the write API is available on the <a href="https://github.com/mysociety/alaveteli/wiki/API#write-api">Alaveteli wiki</a>.
+ </p>
+ </dd>
+</dl>
<p>Please <a href="<%= help_contact_path %>">contact us</a> if you need an API feature that isn't there yet. It's
very much a work in progress, and we do add things when people ask us to.</p>
diff --git a/app/views/help/officers.html.erb b/app/views/help/officers.html.erb
index 6db706f78..a227b01c5 100644
--- a/app/views/help/officers.html.erb
+++ b/app/views/help/officers.html.erb
@@ -52,7 +52,7 @@
<dt id="email_only">An email isn't a sufficient address for an FOI request! <a href="#email_only">#</a> </dt>
<dd>Yes it is. This
- <a href="http://www.whatdotheyknow.com/request/1142/response/2894/attach/5/20080806100741260.pdf">letter from the ICO to Rother District Council</a> gives guidance on the matter, specifically
+ <a href="https://www.whatdotheyknow.com/request/1142/response/2894/attach/5/20080806100741260.pdf">letter from the ICO to Rother District Council</a> gives guidance on the matter, specifically
in the context of requests made via WhatDoTheyKnow.
</dd>
@@ -66,7 +66,7 @@
via WhatDoTheyKnow. Moreover, since all requests are public it is much easier
for you to see if one of our users is making vexatious requests. </p>
<p>If that isn't enough for you, the
- <a href="http://www.whatdotheyknow.com/request/1142/response/2894/attach/5/20080806100741260.pdf">letter from the ICO to Rother District Council</a> gives some guidance on the matter.</p>
+ <a href="https://www.whatdotheyknow.com/request/1142/response/2894/attach/5/20080806100741260.pdf">letter from the ICO to Rother District Council</a> gives some guidance on the matter.</p>
</dd>
<dt id="spam_problems">I can see a request on WhatDoTheyKnow, but we never got it by email!<a href="#spam_problems">#</a> </dt>
@@ -135,7 +135,7 @@
<li>If the day the request email was delivered was a non-working day, we count
the next working day as "day one". Delivery is delivery, even if it happened on
- the weekend. Some authorities <a href="http://www.whatdotheyknow.com/request/policy_regarding_body_scans#incoming-1100">disagree with this</a>, our lawyer disagrees with them. </li>
+ the weekend. Some authorities <a href="https://www.whatdotheyknow.com/request/policy_regarding_body_scans#incoming-1100">disagree with this</a>, our lawyer disagrees with them. </li>
<li>Requesters are encouraged to mark when they have <strong>clarified</strong>
their request so the clock resets, but sometimes they get this wrong. If you
diff --git a/app/views/help/privacy.html.erb b/app/views/help/privacy.html.erb
index 8e5293892..f0e82ab13 100644
--- a/app/views/help/privacy.html.erb
+++ b/app/views/help/privacy.html.erb
@@ -84,6 +84,11 @@ ask a friend to. We don't have the resources to do this for everyone.
</dd>
+<dt id="anonymous">Why are there anonymous requests on the site? <a href="#anonymous">#</a> </dt>
+<dd>
+Some public authorities are using mySociety's <a href="https://github.com/mysociety/foi-register">FOI Register</a> software in order to use WhatDoTheyKnow as a disclosure log for all their FOI activity. When people make requests to the authority their names will usually be withheld from publication just as they would in an authority disclosure log on an authority website.
+</dd>
+
<dt id="full_address">They've asked for my postal address! <a href="#full_address">#</a> </dt>
<dd>
@@ -111,7 +116,7 @@ address should be treated as the return address."
<dd>
<p>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 <a href="http://www.whatdotheyknow.com/request/car_parking_charges_policy_and_a#outgoing-532">offer to gift them a scanner</a>, which in that particular case
+to scan in the documents for you. You can even <a href="https://www.whatdotheyknow.com/request/car_parking_charges_policy_and_a#outgoing-532">offer to gift them a scanner</a>, which in that particular case
embarrassed the authority into finding one they had already.</p>
<p>If that doesn't work, and you want to provide your postal address privately
diff --git a/app/views/help/requesting.html.erb b/app/views/help/requesting.html.erb
index e7cfdd199..51358c6d9 100644
--- a/app/views/help/requesting.html.erb
+++ b/app/views/help/requesting.html.erb
@@ -30,7 +30,7 @@
<dt id="missing_body">You're missing the public authority that I want to request from! <a href="#missing_body">#</a> </dt>
<dd>
- <p>Please <a href="<%= help_contact_path %>">contact us</a> with the name of the public authority and,
+ <p>Please <a href="<%= new_change_request_path %>">contact us</a> with the name of the public authority and,
if you can find it, their contact email address for Freedom of Information requests.
</p>
<p>If you'd like to help add a whole category of public authority to the site, we'd love
@@ -235,7 +235,7 @@
<dt id="eir">Why can I only request information about the environment from some authorities? <a href="#eir">#</a> </dt>
<dd>
- <p>Some public authorities, such as <a href="http://www.whatdotheyknow.com/body/south_east_water">South East Water</a>,
+ <p>Some public authorities, such as <a href="https://www.whatdotheyknow.com/body/south_east_water">South East Water</a>,
don't come under the Freedom of Information Act, but do come under another law called
the Environmental Information Regulations (EIR).
</p>
diff --git a/app/views/info_request_batch/_info_request_batch.html.erb b/app/views/info_request_batch/_info_request_batch.html.erb
new file mode 100644
index 000000000..86ef90654
--- /dev/null
+++ b/app/views/info_request_batch/_info_request_batch.html.erb
@@ -0,0 +1,15 @@
+<div class="request_listing">
+ <div class="request_left">
+ <span class="head">
+ <%= link_to highlight_words(info_request_batch.title, @highlight_words), info_request_batch_path(info_request_batch) %>
+ </span>
+ <div class="requester">
+ <%= _('Batch created by {{info_request_user}} on {{date}}.', :info_request_user => user_link_absolute(info_request_batch.user),:date=>simple_date(info_request_batch.created_at)) %>
+ </div>
+ </div>
+ <div class="request_right">
+ <span class="desc">
+ <%= excerpt(info_request_batch.body, '', :radius => 150) %>
+ </span>
+ </div>
+</div>
diff --git a/app/views/info_request_batch/show.html.erb b/app/views/info_request_batch/show.html.erb
new file mode 100644
index 000000000..aaecdd45d
--- /dev/null
+++ b/app/views/info_request_batch/show.html.erb
@@ -0,0 +1,25 @@
+<% @title = _("{{title}} - a batch request", :title => @info_request_batch.title) %>
+<h1><%= @title %></h1>
+<% if @info_request_batch.sent_at %>
+ <%= n_('Sent to one authority by {{info_request_user}} on {{date}}.', 'Sent to {{authority_count}} authorities by {{info_request_user}} on {{date}}.', @info_request_batch.info_requests.size, :authority_count=> @info_request_batch.info_requests.size, :info_request_user => user_link(@info_request_batch.user), :date => simple_date(@info_request_batch.sent_at)) %>
+ <div class="results_section">
+ <div class="results_block">
+ <% @info_requests.each do |info_request| %>
+ <%= render :partial => 'request/request_listing_via_event', :locals => { :event => info_request.last_event_forming_initial_request, :info_request => info_request } %>
+ <% end %>
+ </div>
+ <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @info_request_batch.info_requests.visible.count) %>
+ </div>
+
+<% else %>
+ <%= _('Created by {{info_request_user}} on {{date}}.', :info_request_user => user_link(@info_request_batch.user), :date => simple_date(@info_request_batch.created_at)) %>
+ <%= _('Requests will be sent to the following bodies:') %>
+ <div class="results_section">
+ <div class="results_block">
+ <%= render :partial => 'public_body/body_listing', :locals => { :public_bodies => @public_bodies } %>
+ </div>
+ <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @info_request_batch.public_bodies.count) %>
+ </div>
+
+<% end %>
+
diff --git a/app/views/info_request_batch_mailer/batch_sent.text.erb b/app/views/info_request_batch_mailer/batch_sent.text.erb
new file mode 100644
index 000000000..25fb7d06a
--- /dev/null
+++ b/app/views/info_request_batch_mailer/batch_sent.text.erb
@@ -0,0 +1,15 @@
+<%= _('Your batch request "{{title}}" has been sent', :title => @info_request_batch.title) %>
+
+
+<%= _('Follow this link to see the requests:')%>
+
+<%= @url %>
+
+<% if !@unrequestable.empty? %>
+<%= _('Unfortunately, we do not have a working address for {{public_body_names}}.', :public_body_names => @unrequestable.map{|body| body.name}.join(",")) %>
+<%= _('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_url %>
+
+<% end %>
+-- <%= _('the {{site_name}} team', :site_name => site_name) %>
diff --git a/app/views/outgoing_mailer/initial_request.text.erb b/app/views/outgoing_mailer/initial_request.text.erb
index 5c418ecc7..b0f1dc9e8 100644
--- a/app/views/outgoing_mailer/initial_request.text.erb
+++ b/app/views/outgoing_mailer/initial_request.text.erb
@@ -6,7 +6,7 @@
<%= @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 %>
+<%= new_change_request_url(:body => @info_request.public_body.url_name) %>
<%= render :partial => 'followup_footer' %>
diff --git a/app/views/public_body/show.html.erb b/app/views/public_body/show.html.erb
index b35e29eea..c36396149 100644
--- a/app/views/public_body/show.html.erb
+++ b/app/views/public_body/show.html.erb
@@ -32,6 +32,7 @@
<% end %>
<% end %>
<%= link_to _('View FOI email address'), view_public_body_email_path(@public_body.url_name) %><br>
+ <%= link_to _("Ask us to update FOI email"), new_change_request_path(:body => @public_body.url_name) %><br>
</div>
<div id="header_left">
diff --git a/app/views/public_body_change_requests/new.html.erb b/app/views/public_body_change_requests/new.html.erb
new file mode 100644
index 000000000..7079cd868
--- /dev/null
+++ b/app/views/public_body_change_requests/new.html.erb
@@ -0,0 +1,61 @@
+<h1><%= @title %></h1>
+<%= foi_error_messages_for :change_request %>
+ <%= form_for(@change_request, :url => change_request_path) do |f| %>
+<% if not @user %>
+ <p>
+ <label class="form_label" for="user_name">
+ <%= _("Your name:") %>
+ </label>
+ <%= f.text_field :user_name %>
+ <%= _('(or <a href="{{url}}">sign in</a>)', :url => signin_path(:r => request.fullpath)) %>
+ </p>
+
+ <p>
+ <label class="form_label" for="user_email">
+ <%= ("Your email:") %>
+ </label>
+ <%= f.text_field :user_email %>
+ </p>
+<% end %>
+<% if @change_request.public_body %>
+ <%= f.hidden_field :public_body_id %>
+<% else %>
+ <p>
+ <label class="form_label" for="public_body_name">
+ <%= _("Authority:") %>
+ </label>
+ <%= f.text_field :public_body_name %>
+ </p>
+<% end %>
+ <p>
+ <label class="form_label" for="public_body_email">
+ <%= _("Authority email:") %>
+ </label>
+ <%= f.text_field :public_body_email %>
+ <div class="form_item_note">
+ <%= _("The contact email address for FOI requests to the authority.") %>
+ </div>
+ </p>
+
+ <p>
+ <label class="form_label" for="source_url">
+ <%= _("Source URL:") %>
+ </label>
+ <%= f.text_field :source_url %>
+ <div class="form_item_note">
+ <%= _("The URL where you found the email address. This field is optional, but it would help us a lot if you can provide a link to a specific page on the authority's website that gives this address, as it will make it much easier for us to check.") %>
+ </div>
+ </p>
+
+ <p>
+ <label class="form_label" for="notes">
+ <%= _("Notes:") %>
+ </label>
+ <%= f.text_area :notes, :rows => 10, :cols => 60 %>
+ </p>
+
+ <div class="form_button">
+ <%= submit_tag _("Submit request") %>
+ </div>
+
+<% end %>
diff --git a/app/views/reports/new.html.erb b/app/views/reports/new.html.erb
index 7d558ab4e..1197b2255 100644
--- a/app/views/reports/new.html.erb
+++ b/app/views/reports/new.html.erb
@@ -4,17 +4,17 @@
<p><%= _("This request has already been reported for administrator attention") %></p>
<% else %>
<p>
- Reporting a request notifies the site administrators. They will respond as soon as possible.
+ <%= _("Reporting a request notifies the site administrators. They will respond as soon as possible.") %>
</p>
- <p>Why specifically do you consider this request unsuitable?</p>
+ <p><%= _("Why specifically do you consider this request unsuitable?") %></p>
<%= form_tag request_report_path(:request_id => @info_request.url_title) do %>
<p>
<label class="form_label" for="reason">Reason:</label>
- <%= select_tag :reason, options_for_select(@info_request.report_reasons, @reason), :prompt => "Choose a reason" %>
+ <%= select_tag :reason, options_for_select(@info_request.report_reasons, @reason), :prompt => _("Choose a reason") %>
</p>
<p>
- <label class="form_label" for="message">Please tell us more:</label>
+ <label class="form_label" for="message"><%= _("Please tell us more:") %></label>
<%= text_area_tag :message, @message, :rows => 10, :cols => 60 %>
</p>
diff --git a/app/views/request/_list_results.html.erb b/app/views/request/_list_results.html.erb
new file mode 100644
index 000000000..4da042816
--- /dev/null
+++ b/app/views/request/_list_results.html.erb
@@ -0,0 +1,12 @@
+ <% @results = InfoRequest.request_list(@filters, @page, @per_page, @max_results) %>
+ <% if @results[:results].empty? %>
+ <p> <%= _('No requests of this sort yet.')%></p>
+ <% else %>
+ <h2 class="foi_results"><%= _('{{count}} FOI requests found', :count => @results[:matches_estimated]) %></h2>
+ <div class="results_block">
+ <% @results[:results].each do |result| %>
+ <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result, :info_request => result.info_request } %>
+ <% end %>
+ </div>
+ <% end %>
+ <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @results[:show_no_more_than]) %>
diff --git a/app/views/request/batch_not_allowed.html.erb b/app/views/request/batch_not_allowed.html.erb
new file mode 100644
index 000000000..156fa9ae1
--- /dev/null
+++ b/app/views/request/batch_not_allowed.html.erb
@@ -0,0 +1 @@
+<%= _('Users cannot usually make batch requests to multiple authorities at once because we don’t want public authorities to be bombarded with large numbers of inappropriate requests. Please <a href="{{url}}">contact us</a> if you think you have good reason to send the same request to multiple authorities at once.', :url => help_contact_path.html_safe) %>
diff --git a/app/views/request/list.html.erb b/app/views/request/list.html.erb
index 062b77c3e..a465f03ba 100644
--- a/app/views/request/list.html.erb
+++ b/app/views/request/list.html.erb
@@ -14,21 +14,11 @@
<div style="clear:both"></div>
<div class="results_section">
- <% # TODO: Cache for 5 minutes %>
- <% if @list_results.empty? %>
- <p> <%= _('No requests of this sort yet.')%></p>
- <% else %>
- <h2 class="foi_results"><%= _('{{count}} FOI requests found', :count => @matches_estimated) %></h2>
- <div class="results_block">
- <% for result in @list_results%>
- <% if result.class.to_s == 'InfoRequestEvent' %>
- <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result, :info_request => result.info_request } %>
- <% else %>
- <p><strong><%= _('Unexpected search result type') %> <%=result.class.to_s%></strong></p>
- <% end %>
- <% end %>
- </div>
+ <% if key = request_list_cache_key %>
+ <% cache_if_caching_fragments(key, :expires_in => 5.minutes) do %>
+ <%= render :partial => 'list_results' %>
<% end %>
-
- <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @show_no_more_than) %>
+ <% else %>
+ <%= render :partial => 'list_results' %>
+ <% end %>
</div>
diff --git a/app/views/request/new.html.erb b/app/views/request/new.html.erb
index 849a94216..7f1332464 100644
--- a/app/views/request/new.html.erb
+++ b/app/views/request/new.html.erb
@@ -1,23 +1,27 @@
-<script type="text/javascript">
- $(document).ready(function(){
- // Avoid triggering too often (on each keystroke) by using the debounce jQuery plugin:
- // http://benalman.com/projects/jquery-throttle-debounce-plugin/
- $("#typeahead_search").keypress($.debounce( 300, function() {
- $("#typeahead_response").load("<%=search_ahead_url%>?q="+encodeURI(this.value), function() {
- // When following links in typeahead results, open new tab/window
- $("#typeahead_response a").attr("target","_blank");
-
- // Update the public body site search link
- $("#body-site-search-link").attr("href", "http://www.google.com/#q="+encodeURI($("#typeahead_search").val())+
- "+site:<%= @info_request.public_body.calculated_home_page %>");
- });
- }));
-
- });
-</script>
-
-<% @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)) %>
-
+<% unless @batch %>
+ <script type="text/javascript">
+ $(document).ready(function(){
+ // Avoid triggering too often (on each keystroke) by using the debounce jQuery plugin:
+ // http://benalman.com/projects/jquery-throttle-debounce-plugin/
+ $("#typeahead_search").keypress($.debounce( 300, function() {
+ $("#typeahead_response").load("<%=search_ahead_url%>?q="+encodeURI(this.value), function() {
+ // When following links in typeahead results, open new tab/window
+ $("#typeahead_response a").attr("target","_blank");
+
+ // Update the public body site search link
+ $("#body-site-search-link").attr("href", "http://www.google.com/#q="+encodeURI($("#typeahead_search").val())+
+ "+site:<%= @info_request.public_body.calculated_home_page %>");
+ });
+ }));
+
+ });
+ </script>
+<% end %>
+<% if @batch %>
+ <% @title = _("Make an {{law_used_short}} request", :law_used_short=>h(@info_request.law_used_short)) %>
+<% else %>
+ <% @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)) %>
+<% end %>
<h1><%= _('2. Ask for Information') %></h1>
<% if @existing_request %>
@@ -29,53 +33,82 @@
</li>
</ul></div>
<% end %>
+ <% if @existing_batch %>
+ <div class="errorExplanation" id="errorExplanation"><ul>
+ <li>
+ <%= _('You already created the same batch of requests on {{date}}. You can either view the <a href="{{existing_batch}}">existing batch</a>, or edit the details below to make a new but similar batch of requests.', :date=>simple_date(@existing_batch.created_at), :existing_batch=>info_request_batch_path(@existing_batch)) %>
+ </li>
+ </ul></div>
+ <% end %>
<%= foi_error_messages_for :info_request, :outgoing_message %>
- <%= form_for(@info_request, :url => new_request_path, :html => { :id => 'write_form' } ) do |f| %>
+ <%= form_for(@info_request, :url => (@batch ? new_batch_path : new_request_path), :html => { :id => 'write_form' } ) do |f| %>
<div id="request_header">
<div id="request_header_body">
<label class="form_label"><%= _('To:') %></label>
- <span id="to_public_body"><%=h(@info_request.public_body.name)%></span>
- <div class="form_item_note">
- <% if @info_request.public_body.info_requests.size > 0 %>
- <%= _("Browse <a href='{{url}}'>other requests</a> to '{{public_body_name}}' for examples of how to word your request.", :public_body_name=>h(@info_request.public_body.name), :url=>public_body_path(@info_request.public_body)) %>
- <% else %>
- <%= _("Browse <a href='{{url}}'>other requests</a> for examples of how to word your request.", :url=>request_list_url) %>
- <% end %>
- </div>
- <% if @info_request.public_body.has_notes? %>
- <div id="request_header_text">
- <h3><%= _('Special note for this authority!') %></h3>
- <p><%= @info_request.public_body.notes_as_html.html_safe %></p>
- </div>
+ <% if @batch %>
+ <span id="to_public_body">
+ <%= _("Your selected authorities") %>
+ <span class="batch_public_body_toggle" data-hidetext="<%= _("(hide)") %>" data-showtext="<%= _("(show)") %>"><a class="toggle-message"></a></span>
+ </span>
+
+ <div class="batch_public_body_list">
+ <ul>
+ <% @public_bodies.each do |public_body| %>
+ <li><%= public_body.name %></li>
+ <% end %>
+ </ul>
+ </div>
+
+ <% else %>
+ <span id="to_public_body">
+ <%=h(@info_request.public_body.name)%>
+ </span>
<% end %>
- <% if @info_request.public_body.eir_only? %>
- <h3><%= _('Please ask for environmental information only') %></h3>
+ <% unless @batch %>
+ <div class="form_item_note">
+ <% if @info_request.public_body.info_requests.size > 0 %>
+ <%= _("Browse <a href='{{url}}'>other requests</a> to '{{public_body_name}}' for examples of how to word your request.", :public_body_name=>h(@info_request.public_body.name), :url=>public_body_path(@info_request.public_body)) %>
+ <% else %>
+ <%= _("Browse <a href='{{url}}'>other requests</a> for examples of how to word your request.", :url=>request_list_url) %>
+ <% end %>
+ </div>
+
+ <% if @info_request.public_body.has_notes? %>
+ <div id="request_header_text">
+ <h3><%= _('Special note for this authority!') %></h3>
+ <p><%= @info_request.public_body.notes_as_html.html_safe %></p>
+ </div>
+ <% end %>
+
+ <% if @info_request.public_body.eir_only? %>
+ <h3><%= _('Please ask for environmental information only') %></h3>
- <p><%= _('The Freedom of Information Act <strong>does not apply</strong> to') %> <%=h(@info_request.public_body.name)%>.
- <%= _('However, you have the right to request environmental
+ <p><%= _('The Freedom of Information Act <strong>does not apply</strong> to') %> <%=h(@info_request.public_body.name)%>.
+ <%= _('However, you have the right to request environmental
information under a different law') %> (<a href="/help/requesting#eir">explanation</a>).
- <%= _('This covers a very wide spectrum of information about the state of
+ <%= _('This covers a very wide spectrum of information about the state of
the <strong>natural and built environment</strong>, such as:') %>
- <ul>
- <li><%= _('Air, water, soil, land, flora and fauna (including how these effect
+ <ul>
+ <li><%= _('Air, water, soil, land, flora and fauna (including how these effect
human beings)') %></li>
- <li><%= _('Information on emissions and discharges (e.g. noise, energy,
+ <li><%= _('Information on emissions and discharges (e.g. noise, energy,
radiation, waste materials)') %></li>
- <li><%= _('Human health and safety') %></li>
- <li><%= _('Cultural sites and built structures (as they may be affected by the
+ <li><%= _('Human health and safety') %></li>
+ <li><%= _('Cultural sites and built structures (as they may be affected by the
environmental factors listed above)') %></li>
- <li><%= _('Plans and administrative measures that affect these matters') %></li>
- </ul>
+ <li><%= _('Plans and administrative measures that affect these matters') %></li>
+ </ul>
- <p><%= _('Please only request information that comes under those categories, <strong>do not waste your
+ <p><%= _('Please only request information that comes under those categories, <strong>do not waste your
time</strong> or the time of the public authority by requesting unrelated information.') %></p>
- <% end %>
+ <% end %>
+ <% end %>
</div>
<div id="request_header_subject">
@@ -132,7 +165,13 @@
</p>
<div class="form_button">
- <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
+ <% if @batch %>
+ <% params[:public_body_ids].each do |public_body_id| %>
+ <%= hidden_field_tag("public_body_ids[]", public_body_id)%>
+ <% end %>
+ <% else %>
+ <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
+ <% end %>
<%= hidden_field_tag(:submitted_new_request, 1 ) %>
<%= hidden_field_tag(:preview, 1 ) %>
<%= submit_tag _("Preview your public request") %>
@@ -150,5 +189,6 @@
</div>
<% end %>
-
-
+<% if @batch %>
+ <%= javascript_include_tag 'new-request.js' %>
+<% end %>
diff --git a/app/views/request/preview.html.erb b/app/views/request/preview.html.erb
index 243dc90a9..0265d0328 100644
--- a/app/views/request/preview.html.erb
+++ b/app/views/request/preview.html.erb
@@ -1,6 +1,9 @@
-<% @title = "Preview new " + h(@info_request.law_used_short) + " request to '" + h(@info_request.public_body.name) + "'" %>
-
-<%= form_for(@info_request, :url => new_request_path, :html => { :id => 'preview_form' } ) do |f| %>
+<% if @batch %>
+ <% @title = _("Preview new {{law_used_short}} request", :law_used_short => h(@info_request.law_used_short)) %>
+<% else %>
+ <% @title = _("Preview new {{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)) %>
+<% end %>
+<%= form_for(@info_request, :url => (@batch ? new_batch_path : new_request_path), :html => { :id => 'preview_form' } ) do |f| %>
<h1><%= _('3. Now check your request') %></h1>
<ul>
@@ -14,7 +17,12 @@
<div class="correspondence" id="outgoing-0">
<p class="preview_subject">
- <strong><%= _('To:') %></strong> <%=h @info_request.public_body.name %>
+ <strong><%= _('To:') %></strong>
+ <% if @batch %>
+ <%= _("Your selected authorities")%>
+ <% else %>
+ <%=h(@info_request.public_body.name)%>
+ <% end %>
<br><strong><%= _('Subject:') %></strong> <%=h @info_request.email_subject_request %>
</p>
@@ -33,7 +41,13 @@
<p>
<%= f.hidden_field(:title) %>
- <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
+ <% if @batch %>
+ <% params[:public_body_ids].each do |public_body_id| %>
+ <%= hidden_field_tag("public_body_ids[]", public_body_id)%>
+ <% end %>
+ <% else %>
+ <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
+ <% end %>
<%= f.hidden_field(:tag_string) %>
<%= hidden_field_tag(:submitted_new_request, 1) %>
<%= hidden_field_tag(:preview, 0 ) %>
diff --git a/app/views/request/select_authorities.html.erb b/app/views/request/select_authorities.html.erb
new file mode 100644
index 000000000..e16bcc191
--- /dev/null
+++ b/app/views/request/select_authorities.html.erb
@@ -0,0 +1,77 @@
+<% @title = _("Select the authorities to write to") %>
+<h1><%= _('1. Select authorities') %></h1>
+
+<p>
+ <%= _("Search for the authorities you'd like information from:") %>
+</p>
+
+<div>
+ <%= form_tag(select_authorities_path, {:method => 'get', :id => 'body_search_form', :remote => true, "data-type" => 'json'}) do %>
+ <%= text_field_tag 'public_body_query', params[:public_body_query], { :size => 30, :title => "type your search term here" } %>
+ <% if !@public_bodies.blank? %>
+ <%- @public_bodies.each do |public_body| %>
+ <%= hidden_field_tag "public_body_ids[]", public_body.id, {:id => nil} %>
+ <%- end %>
+ <% end %>
+ <% end %>
+</div>
+
+<div id="body_selection">
+ <div id="body_lists">
+ <div id="body_candidates" class="body_list">
+ <%= form_tag(select_authorities_path, {:id => "body_select_form"}) do %>
+ <%= submit_tag _(' >> '), :id => 'body_select_all_button', :class => 'select_all_button' %>
+ <%= submit_tag _(' > '), :id => 'body_select_button' %>
+ <%= hidden_field_tag "public_body_query", params[:public_body_query], { :id => 'public_body_select_query' } %>
+ <% if !@public_bodies.blank? %>
+ <% @public_bodies.each do |public_body| %>
+ <%= hidden_field_tag "public_body_ids[]", public_body.id, {:id => nil} %>
+ <% end %>
+ <% end %>
+ <select multiple name="public_body_ids[]" id="select_body_candidates" class="body_select" size="15">
+ <% if @search_bodies %>
+ <% @search_bodies.results.each do |result| %>
+ <% unless (@public_bodies && @public_bodies.include?(result[:model])) %>
+ <option value="<%= result[:model].id %>"><%= result[:model].name %></option>
+ <% end %>
+ <% end %>
+ <% end %>
+ </select>
+ <% end %>
+ </div>
+
+ <div id="body_selections" class="body_list">
+ <%= form_tag(select_authorities_path, {:id => "body_deselect_form"}) do %>
+
+ <%= submit_tag _(' < '), :id => 'body_deselect_button' %>
+ <%= submit_tag _(' << '), :id => 'body_deselect_all_button', :class => 'select_all_button' %>
+ <%= hidden_field_tag "public_body_query", params[:public_body_query], { :id => 'public_body_deselect_query' } %>
+ <% if @public_bodies %>
+ <% @public_bodies.each do |public_body| %>
+ <%= hidden_field_tag "public_body_ids[]", public_body.id, {:id => nil} %>
+ <% end %>
+ <% end %>
+ <select multiple name="remove_public_body_ids[]" id="select_body_selections" class="body_select" size="15">
+ <% if @public_bodies %>
+ <% @public_bodies.each do |public_body| %>
+ <option value="<%= public_body.id %>"><%= public_body.name %></option>
+ <% end %>
+ <% end %>
+ </select>
+ <% end %>
+
+ <div id="body_submission">
+ <%= form_tag(new_batch_path, {:id => "body_submit_form"}) do %>
+ <% if @public_bodies %>
+ <% @public_bodies.each do |public_body| %>
+ <%= hidden_field_tag "public_body_ids[]", public_body.id , {:id => nil} %>
+ <% end %>
+ <% end %>
+ <%= submit_tag _('Make a request to these authorities'), :id => 'body_submit_button' %>
+ <% end %>
+ </div>
+
+ </div>
+ </div>
+</div>
+<%= javascript_include_tag 'jquery_ujs.js', 'select-authorities.js' %>
diff --git a/app/views/request/select_authority.html.erb b/app/views/request/select_authority.html.erb
index 4f117ee75..83abdb184 100644
--- a/app/views/request/select_authority.html.erb
+++ b/app/views/request/select_authority.html.erb
@@ -40,6 +40,13 @@
<%= hidden_field_tag 'bodies', 1 %>
<%= submit_tag _('Search') %>
</div>
+ <% if AlaveteliConfiguration.allow_batch_requests && @user && @user.can_make_batch_requests? %>
+ <div id="batch_request_link">
+ <p>
+ <%= _('Or make a <a href="{{url}}">batch request</a> to <strong>multiple authorities</strong> at once.', :url => select_authorities_path) %>
+ </p>
+ </div>
+ <% end %>
<% end %>
<div id="typeahead_response">
diff --git a/app/views/request/show.html.erb b/app/views/request/show.html.erb
index c520ce40c..153b0b861 100644
--- a/app/views/request/show.html.erb
+++ b/app/views/request/show.html.erb
@@ -34,14 +34,16 @@
<p class="subtitle">
<% if !@user.nil? && @user.admin_page_links? %>
<%= _('{{user}} ({{user_admin_link}}) made this {{law_used_full}} request (<a href="{{request_admin_url}}">admin</a>) to {{public_body_link}} (<a href="{{public_body_admin_url}}">admin</a>)',
- :user => @info_request.is_external? ? (@info_request.user_name || _('An anonymous user')) : user_link(@info_request.user),
+ :user => request_user_link(@info_request, _('An anonymous user')),
:law_used_full => h(@info_request.law_used_full),
:user_admin_link => user_admin_link_for_request(@info_request, _('external'), _('admin')),
:request_admin_url => admin_request_show_url(@info_request),
:public_body_link => public_body_link(@info_request.public_body),
:public_body_admin_url => admin_body_show_url(@info_request.public_body)) %>
<% else %>
- <%= _('{{user}} made this {{law_used_full}} request',:user=>@info_request.is_external? ? (@info_request.user_name || _('An anonymous user')) : user_link(@info_request.user), :law_used_full=>h(@info_request.law_used_full)) %>
+ <%= _('{{user}} made this {{law_used_full}} request',
+ :user=>request_user_link(@info_request, _('An anonymous user')),
+ :law_used_full=>h(@info_request.law_used_full)) %>
<%= _('to {{public_body}}',:public_body=>public_body_link(@info_request.public_body)) %>
<% end %>
</p>
diff --git a/app/views/track/_tracking_links.html.erb b/app/views/track/_tracking_links.html.erb
index a3cd8fc60..5419ec605 100644
--- a/app/views/track/_tracking_links.html.erb
+++ b/app/views/track/_tracking_links.html.erb
@@ -1,6 +1,6 @@
<%
if @user
- existing_track = TrackThing.find_by_existing_track(@user, track_thing)
+ existing_track = TrackThing.find_existing(@user, track_thing)
end
%>
diff --git a/app/views/user/show.html.erb b/app/views/user/show.html.erb
index c9862effe..76ecdeda0 100644
--- a/app/views/user/show.html.erb
+++ b/app/views/user/show.html.erb
@@ -105,6 +105,17 @@
<div style="clear:both"></div>
<% end %>
+<% if @show_batches %>
+
+ <% if @is_you && !@display_user.info_request_batches.empty? %>
+ <h2 class="batch_results" id="batch_requests">
+ <%= n_('Your {{count}} batch requests', 'Your {{count}} batch requests', @display_user.info_request_batches.size, :count => @display_user.info_request_batches.size) %>
+ </h2>
+ <%= render :partial => 'info_request_batch/info_request_batch', :collection => @display_user.info_request_batches %>
+ <% end %>
+
+<% end %>
+
<% if @show_requests %>
<div id="user_profile_search">
<%= form_tag(show_user_url, :method => "get", :id=>"search_form") do %>
diff --git a/app/views/user/sign.html.erb b/app/views/user/sign.html.erb
index 8291cdace..e8c5d5a58 100644
--- a/app/views/user/sign.html.erb
+++ b/app/views/user/sign.html.erb
@@ -13,7 +13,7 @@
</p>
<% if @post_redirect.post_params["controller"] == "admin_general" %>
<% unless AlaveteliConfiguration::disable_emergency_user %>
- <p id="superuser_message">Don't have a superuser account yet? <%= link_to "Sign in as the emergency user", @post_redirect.uri + "?emergency=1" %></p>
+ <p id="superuser_message"><%= _("Don't have a superuser account yet?") %> <%= link_to _("Sign in as the emergency user"), @post_redirect.uri + "?emergency=1" %></p>
<% end %>
<% end %>
diff --git a/app/views/user/wall.html.erb b/app/views/user/wall.html.erb
index 190cc0a6d..6699c55fa 100644
--- a/app/views/user/wall.html.erb
+++ b/app/views/user/wall.html.erb
@@ -1,16 +1,19 @@
<% @title = h(@display_user.name) + _(" - wall") %>
-<% if @is_you %>
<div class="medium_column">
- <p><%= _('You can change the requests and users you are following on <a href="{{profile_url}}">your profile page</a>.', :profile_url => show_user_profile_path) %>
- <%= render :partial => 'change_receive_email' %>
+ <% if @is_you %>
+ <h2><%= _("My wall") %></h2>
+ <p><%= _('You can change the requests and users you are following on <a href="{{profile_url}}">your profile page</a>.', :profile_url => show_user_profile_path) %></p>
+ <%= render :partial => 'change_receive_email' %>
+ <% else %>
+ <h2><%= _("This is <a href=\"{{profile_url}}\">{{user_name}}'s</a> wall", :profile_url => show_user_profile_path, :user_name => h(@display_user.name)) %></h2>
+ <% end %>
</div>
-<% end %>
<div id="user_profile_search">
- <% if !@feed_results.nil? %>
- <% for result in @feed_results %>
- <%= render :partial => 'request/wall_listing', :locals => { :event => result, :info_request => result.info_request } %>
- <% end %>
- <% end %>
-
-
+ <% if !@feed_results.nil? and !@feed_results.empty? %>
+ <% for result in @feed_results %>
+ <%= render :partial => 'request/wall_listing', :locals => { :event => result, :info_request => result.info_request } %>
+ <% end %>
+ <% else %>
+ <p><%= _("There is nothing to display yet.") %></p>
+ <% end %>
</div>