aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/request_controller.rb18
-rw-r--r--app/views/request/new_please_describe.rhtml25
2 files changed, 41 insertions, 2 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index d00934e0b..7f0c500d2 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -4,7 +4,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: request_controller.rb,v 1.109 2008-09-22 02:36:03 francis Exp $
+# $Id: request_controller.rb,v 1.110 2008-09-22 03:02:03 francis Exp $
class RequestController < ApplicationController
@@ -85,8 +85,22 @@ class RequestController < ApplicationController
# Page new form posts to
def new
+ # If we've just got here (so no writing to lose), and we're already
+ # logged in, force the user to describe any undescribed requests. Allow
+ # margin of 1 undescribed so it isn't too annoying - the function
+ # get_undescribed_requests also allows one day since the response
+ # arrived.
+ if !@user.nil? && params[:submitted_new_request].nil?
+ @undescribed_requests = @user.get_undescribed_requests
+ @public_body = PublicBody.find(params[:public_body_id])
+ if @undescribed_requests.size > 1
+ render :action => 'new_please_describe'
+ return
+ end
+ end
+
# First time we get to the page, just display it
- if params[:submitted_new_request].nil? or params[:reedit]
+ if params[:submitted_new_request].nil? || params[:reedit]
# Read parameters in - public body must be passed in
if params[:public_body_id]
params[:info_request] = { :public_body_id => params[:public_body_id] }
diff --git a/app/views/request/new_please_describe.rhtml b/app/views/request/new_please_describe.rhtml
new file mode 100644
index 000000000..d88944910
--- /dev/null
+++ b/app/views/request/new_please_describe.rhtml
@@ -0,0 +1,25 @@
+<% @title = "First, did your other requests succeed?" %>
+
+<h1><%=@title%></h1>
+
+<p>Please select each of these requests in turn, and <strong>let everyone know</strong>
+if they are successful yet or not.
+</p>
+
+<ul>
+<% for undescribed_request in @undescribed_requests %>
+ <li><%=request_link(undescribed_request)%></li>
+<% end %>
+</ul>
+
+<p>
+ When you're done, <strong>come back here</strong>,
+ <%= link_to "reload this page", new_request_to_body_url(:public_body_id => @public_body.id.to_s) %>
+ and file your new request.
+</p>
+
+<p>
+ Thanks very much for helping keep everything <strong>neat and organised</strong>.
+ We'll also, if you need it, give you advice on what to do next about each of your
+ requests.
+</p>