aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/body_controller.rb8
-rw-r--r--app/views/body/_body_listing.rhtml14
-rw-r--r--app/views/body/list.rhtml11
-rw-r--r--app/views/help/about.rhtml8
-rw-r--r--app/views/request/frontpage.rhtml5
5 files changed, 42 insertions, 4 deletions
diff --git a/app/controllers/body_controller.rb b/app/controllers/body_controller.rb
index ba90f317f..7f2d1fe05 100644
--- a/app/controllers/body_controller.rb
+++ b/app/controllers/body_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: body_controller.rb,v 1.3 2007-10-31 12:39:58 francis Exp $
+# $Id: body_controller.rb,v 1.4 2008-02-22 13:49:37 francis Exp $
class BodyController < ApplicationController
# XXX tidy this up with better error messages, and a more standard infrastructure for the redirect to canonical URL
@@ -29,4 +29,8 @@ class BodyController < ApplicationController
@public_body = @public_bodies[0]
end
-end
+ def list
+ @public_bodies = PublicBody.paginate :order => "name", :page => params[:page], :per_page => 25
+ end
+
+ end
diff --git a/app/views/body/_body_listing.rhtml b/app/views/body/_body_listing.rhtml
new file mode 100644
index 000000000..35ec18fb0
--- /dev/null
+++ b/app/views/body/_body_listing.rhtml
@@ -0,0 +1,14 @@
+<% for public_body in public_bodies %>
+ <p class="body_listing">
+ <%= public_body_link(public_body) %>
+
+ <br>
+ Also called <%=h public_body.short_name %>.
+ <br>
+
+ <span class="request_listing_bottomline">
+ <%= pluralize(public_body.info_requests.size, "request") %> made.
+ Added on <%= simple_date(public_body.created_at) %>.
+ </span>
+ </p>
+<% end %>
diff --git a/app/views/body/list.rhtml b/app/views/body/list.rhtml
new file mode 100644
index 000000000..bef1d8611
--- /dev/null
+++ b/app/views/body/list.rhtml
@@ -0,0 +1,11 @@
+<% @title = "All UK public bodies" %>
+
+<h1><%=@title%></h1>
+
+<p>
+<a href="/help/about#missing_body">Are we missing a public body?</a>
+</p>
+
+<%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %>
+
+<%= will_paginate(@public_bodies) %>
diff --git a/app/views/help/about.rhtml b/app/views/help/about.rhtml
index 4730a2e39..0e598b0b1 100644
--- a/app/views/help/about.rhtml
+++ b/app/views/help/about.rhtml
@@ -48,6 +48,14 @@ If you like what we're doing, then you can
<h1>Making requests</h1>
<dl>
+<dt id="missing_body">You're missing the public body that I want to request from!</dt>
+
+<dd>If it is a local council, please find the relevant email address and
+<a href="http://tinyurl.com/2cep8a">add it to this shared spreadsheet</a> (Google account required).
+Otherwise, please <a href="/help/contact">contact us</a> with the name of the public body, and
+if you can find it the email address for FOI requests.
+</dd>
+
<dt id="quickly_response">How quickly will I get a response?</dt>
<dd>By law public bodies must respond within 20 days, excluding weekends and
diff --git a/app/views/request/frontpage.rhtml b/app/views/request/frontpage.rhtml
index e7fe32c61..456c4bbd5 100644
--- a/app/views/request/frontpage.rhtml
+++ b/app/views/request/frontpage.rhtml
@@ -6,7 +6,8 @@
<% if @public_bodies.size == 0 and @query_made %>
<div id="error">
Sorry! We couldn't find any public bodies with that in their names.
- Please <a href="/help/contact">ask us to add the one you want</a>.
+ Either <a href="/body">browse them all</a> or
+ <a href="/help/contact">ask us to add the one you want</a>.
</div>
<% end %>
@@ -48,7 +49,7 @@
<% end %>
<p>
- Can't find the one you want? <a href="/help/contact">Ask us to add it</a>
+ Can't find it? <a href="/body">Browse all</a> or <a href="/help/contact">ask us to add it</a>.
</p>
<% end %>
</div>