aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/request_controller.rb9
-rw-r--r--app/views/request/new.rhtml21
-rw-r--r--todo.txt6
3 files changed, 24 insertions, 12 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 9642d48ad..288a4ef7b 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.54 2008-02-21 16:37:11 francis Exp $
+# $Id: request_controller.rb,v 1.55 2008-02-21 19:05:00 francis Exp $
class RequestController < ApplicationController
@@ -58,7 +58,12 @@ class RequestController < ApplicationController
end
@info_request = InfoRequest.new(params[:info_request])
@outgoing_message = OutgoingMessage.new(params[:outgoing_message])
- render :action => 'new'
+
+ if @info_request.public_body.nil?
+ redirect_to frontpage_url
+ else
+ render :action => 'new'
+ end
return
end
diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml
index 883a3963f..8aa627194 100644
--- a/app/views/request/new.rhtml
+++ b/app/views/request/new.rhtml
@@ -1,4 +1,4 @@
-<% @title = "New FOI request" %>
+<% @title = "New FOI request to '" + h(@info_request.public_body.name) + "'" %>
<% if @existing_request %>
<div class="errorExplanation" id="errorExplanation"><ul>
@@ -21,8 +21,15 @@
<li>Use a <strong>search engine first</strong> to check that the information isn't already published.
</li>
<li>Write your request in <strong>simple, precise language</strong>.
- <li>Browse <%= link_to "other requests", request_list_url %> for examples of how to word your request.
- </li>
+ <% if @info_request.public_body.info_requests.size > 0 %>
+ <li>Browse <%= link_to "other requests", public_body_url(@info_request.public_body) %>
+ to '<%= h(@info_request.public_body.name) %>'
+ for examples of how to word your request.
+ </li>
+ <% else %>
+ <li>Browse <%= link_to "other requests", request_list_url %> for examples of how to word your request.
+ </li>
+ <% end %>
<li>Keep it <strong>focussed</strong>, if you ask for everything it might cost too much
and you might get nothing.
</li>
@@ -34,11 +41,8 @@
</div>
<p>
- <label class="form_label" for="info_request_public_body_id">Public body:</label>
- <%=
- @public_bodies = PublicBody.find(:all, :order => "name")
- f.collection_select(:public_body_id, @public_bodies, :id, :name)
- %>
+ <label class="form_label" for="info_request_public_body_id">To:</label>
+ <h2><%=h(@info_request.public_body.name)%></h2>
</p>
@@ -65,6 +69,7 @@
</p>
<div class="form_button">
+ <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %>
<%= hidden_field_tag(:submitted_new_request, { :value => 1 } ) %>
<%= submit_tag "Make public Freedom of Information request >>" %>
</div>
diff --git a/todo.txt b/todo.txt
index 8ff9c8be9..106d10704 100644
--- a/todo.txt
+++ b/todo.txt
@@ -39,8 +39,6 @@ Next
====
Show other requests to same public body on write page
-Remove the drop down on the write page
-Make the button on public body page into a link
Browse all public bodies
Lucene for search - use http://acts-as-solr.rubyforge.org/
@@ -139,9 +137,13 @@ Consider putting the requesting user's name in the request's magic email address
Ask what they learnt from request, and other things?
and reward by putting their request on front page
+Description for each body as to what info it holds
Link to:
Disclosure logs
Publication schemes (http://www.ico.gov.uk/what_we_cover/freedom_of_information/publication_schemes.aspx)
+ Website itself (for general search)
+ Google search within website?
+ TWFY department search
e.g.
http://www.ordnancesurvey.co.uk/oswebsite/aboutus/foi/index.html
http://www.ordnancesurvey.co.uk/oswebsite/aboutus/foi/coiindex.html