aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/request_controller.rb4
-rw-r--r--app/views/request/frontpage.rhtml19
-rw-r--r--public/stylesheets/main.css1
-rw-r--r--todo.txt2
4 files changed, 20 insertions, 6 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index c669f0aaf..60d12e68d 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.57 2008-02-22 01:58:36 francis Exp $
+# $Id: request_controller.rb,v 1.58 2008-02-22 13:26:36 francis Exp $
class RequestController < ApplicationController
@@ -34,6 +34,7 @@ class RequestController < ApplicationController
def frontpage
# Public body search on the left
@public_bodies = []
+ @query_made = false
if params[:public_body] and params[:public_body][:query]
# Try and do exact match - redirect if it is made
@public_body = PublicBody.find_by_name(params[:public_body][:query])
@@ -42,6 +43,7 @@ class RequestController < ApplicationController
end
# Otherwise use search engine to find public body
@public_bodies = public_body_query(params[:public_body][:query])
+ @query_made = true
end
# Get all successful requests for display on the right
diff --git a/app/views/request/frontpage.rhtml b/app/views/request/frontpage.rhtml
index f4e9c0fca..e7fe32c61 100644
--- a/app/views/request/frontpage.rhtml
+++ b/app/views/request/frontpage.rhtml
@@ -3,6 +3,13 @@
<div id="make_requests">
<h1>Make requests for information from the UK Government</h1>
+ <% 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>.
+ </div>
+ <% end %>
+
<% form_tag({:action => :frontpage}, :method => 'get', :id => 'public_body_form', :class => 'plaque' ) do %>
<p>
<label for="public_body_query">Find the public body you would like information from:</label>
@@ -17,12 +24,15 @@
} %>
</div>
<div class="public_body_search_note">
- Type to search e.g. Health, Business, Scotland
+ Type to search e.g. Health, Business, Scotland
</div>
- <p>
- <%= submit_tag "Submit" %>
+ <p id="public_body_query_button">
+ <%= submit_tag "Search" %>
</p>
+ <script>
+ Element.toggle('public_body_query_button')
+ </script>
<% if @public_bodies.size > 0 %>
<div id="public_body_search">
@@ -37,6 +47,9 @@
</div>
<% end %>
+ <p>
+ Can't find the one you want? <a href="/help/contact">Ask us to add it</a>
+ </p>
<% end %>
</div>
diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css
index f7c94ef0e..7504e27ee 100644
--- a/public/stylesheets/main.css
+++ b/public/stylesheets/main.css
@@ -266,6 +266,7 @@ div.fieldWithErrors { display:inline; }
div.auto_complete {
width: 350px;
background: #fff;
+ cursor: default;
}
div.auto_complete ul {
border:1px solid #888;
diff --git a/todo.txt b/todo.txt
index c9241c462..72967f525 100644
--- a/todo.txt
+++ b/todo.txt
@@ -28,8 +28,6 @@ Next
====
Browse all public bodies from front page
-Make front page somehow a bit prettier
-Contact us to add a body you need
Sort the requests by when something last happened to them (this needs thought as to what
sort orders we need)