aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/request_controller.rb17
-rw-r--r--app/views/info_request_batch/_batch_sent.html.erb18
-rw-r--r--app/views/info_request_batch/show.html.erb5
-rw-r--r--app/views/request/_request_sent.html.erb19
-rw-r--r--app/views/request/show.html.erb5
5 files changed, 50 insertions, 14 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 39e7616ed..9e156cfb9 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -123,7 +123,6 @@ class RequestController < ApplicationController
@track_thing = TrackThing.create_track_for_request(@info_request)
@feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss], :has_json => true } ]
-
respond_to do |format|
format.html { @has_json = true; render :template => 'request/show'}
format.json { render :json => @info_request.json_for_api(true) }
@@ -245,13 +244,8 @@ class RequestController < ApplicationController
:body => params[:outgoing_message][:body],
:public_bodies => @public_bodies,
:user => authenticated_user)
- flash[:notice] = _("<p>Your {{law_used_full}} requests will be <strong>sent</strong> shortly!</p>
- <p><strong>We will email you</strong> when they have been sent.
- We will also email you when there is a response to any of them, or after {{late_number_of_days}} working days if the authorities still haven't
- replied by then.</p>
- <p>If you write about these requests (for example in a forum or a blog) please link to this page.</p>",
- :law_used_full=>@info_request.law_used_full,
- :late_number_of_days => AlaveteliConfiguration::reply_late_after_days)
+
+ flash[:batch_sent] = true
redirect_to info_request_batch_path(@info_request_batch)
end
@@ -379,12 +373,7 @@ class RequestController < ApplicationController
)
end
- flash[:notice] = _("<p>Your {{law_used_full}} request has been <strong>sent on its way</strong>!</p>
- <p><strong>We will email you</strong> when there is a response, or after {{late_number_of_days}} working days if the authority still hasn't
- replied by then.</p>
- <p>If you write about this request (for example in a forum or a blog) please link to this page, and add an
- annotation below telling people about your writing.</p>",:law_used_full=>@info_request.law_used_full,
- :late_number_of_days => AlaveteliConfiguration::reply_late_after_days)
+ flash[:request_sent] = true
redirect_to show_new_request_path(:url_title => @info_request.url_title)
end
diff --git a/app/views/info_request_batch/_batch_sent.html.erb b/app/views/info_request_batch/_batch_sent.html.erb
new file mode 100644
index 000000000..1bf51962f
--- /dev/null
+++ b/app/views/info_request_batch/_batch_sent.html.erb
@@ -0,0 +1,18 @@
+<div id="notice">
+ <p>
+ <%= _("Your requests will be <strong>sent</strong> shortly!") %>
+ </p>
+
+ <p>
+ <%= _("<strong>We will email you</strong> when they have been sent. " \
+ "We will also email you when there is a response to any of them, or " \
+ "after {{late_number_of_days}} working days if the authorities still" \
+ "haven't replied by then.",
+ :late_number_of_days => AlaveteliConfiguration::reply_late_after_days) %>
+ </p>
+
+ <p>
+ <%= _("If you write about these requests (for example in a forum or a blog) " \
+ "please link to this page.") %>
+ </p>
+</div>
diff --git a/app/views/info_request_batch/show.html.erb b/app/views/info_request_batch/show.html.erb
index 8bb834b3c..b5db4ac52 100644
--- a/app/views/info_request_batch/show.html.erb
+++ b/app/views/info_request_batch/show.html.erb
@@ -1,4 +1,9 @@
<% @title = _("{{title}} - a batch request", :title => @info_request_batch.title) %>
+
+<% if flash[:batch_sent] %>
+ <%= render :partial => 'batch_sent' } %>
+<% end %>
+
<div class="info_request_batch_intro">
<h1><%= @title %></h1>
<% if @info_request_batch.sent_at %>
diff --git a/app/views/request/_request_sent.html.erb b/app/views/request/_request_sent.html.erb
new file mode 100644
index 000000000..5ce6f5317
--- /dev/null
+++ b/app/views/request/_request_sent.html.erb
@@ -0,0 +1,19 @@
+<div id="notice">
+ <p>
+ <%= _("Your {{law_used_full}} request has been <strong>sent on its way</strong>!",
+ :law_used_full => @info_request.law_used_full) %>
+ </p>
+
+ <p>
+ <%= _("<strong>We will email you</strong> when there is a response, or after " \
+ "{{late_number_of_days}} working days if the authority still hasn't " \
+ "replied by then.",
+ :late_number_of_days => AlaveteliConfiguration.reply_late_after_days) %>
+ </p>
+
+ <p>
+ <%= _("If you write about this request (for example in a forum or a blog) " \
+ "please link to this page, and add an annotation below telling people " \
+ "about your writing.") %>
+ </p>
+</div>
diff --git a/app/views/request/show.html.erb b/app/views/request/show.html.erb
index 89a4c53b8..78e022aa9 100644
--- a/app/views/request/show.html.erb
+++ b/app/views/request/show.html.erb
@@ -2,6 +2,11 @@
:title => h(@info_request.title),
:public_body => (@info_request.public_body.name)) %>
+<% if flash[:request_sent] %>
+ <%= render :partial => 'request_sent',
+ :locals => { :info_request => @info_request } %>
+<% end %>
+
<% if @info_request.prominence == 'hidden' %>
<p id="hidden_request">
<%= _('This request has prominence \'hidden\'. You can only see it because you are logged