aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/admin_public_body_controller.rb3
-rw-r--r--app/views/admin_public_body/list.rhtml54
-rw-r--r--todo.txt52
3 files changed, 53 insertions, 56 deletions
diff --git a/app/controllers/admin_public_body_controller.rb b/app/controllers/admin_public_body_controller.rb
index e8ee58f95..b0cdcac78 100644
--- a/app/controllers/admin_public_body_controller.rb
+++ b/app/controllers/admin_public_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: admin_public_body_controller.rb,v 1.14 2008-05-21 22:37:32 francis Exp $
+# $Id: admin_public_body_controller.rb,v 1.15 2008-05-26 12:25:36 francis Exp $
class AdminPublicBodyController < ApplicationController
layout "admin"
@@ -21,6 +21,7 @@ class AdminPublicBodyController < ApplicationController
:conditions => @query.nil? ? nil : ["name ilike '%'||?||'%' or
short_name ilike '%'||?||'%' or
request_email ilike '%'||?||'%'", @query, @query, @query]
+ @public_bodies_by_tag = PublicBody.find_by_tag(@query)
end
def show
diff --git a/app/views/admin_public_body/list.rhtml b/app/views/admin_public_body/list.rhtml
index a6b2dd65c..56dfa4889 100644
--- a/app/views/admin_public_body/list.rhtml
+++ b/app/views/admin_public_body/list.rhtml
@@ -10,25 +10,49 @@
<% form_tag("", :method => "get") do %>
<p>
<%= text_field_tag 'query', params[:query], { :size => 30 } %>
- <%= submit_tag "Search" %> (substring search, names and emails)
+ <%= submit_tag "Search" %> (substring search in names and emails; exact match of tags)
</p>
<% end %>
-<table>
- <tr>
- <% for column in PublicBody.content_columns.map { |c| c.human_name } - [ "Last edit comment" ] %>
- <th><%= column %></th>
- <% end %>
- </tr>
-
-<% for public_body in @public_bodies %>
- <tr class="<%= cycle('odd', 'even') %>">
- <td><%= link_to h(public_body.name), 'show/' + public_body.id.to_s %></td>
- <% for column in PublicBody.content_columns.map { |c| c.name } - [ "name", "last_edit_comment" ] %>
- <td><%=h public_body.send(column) %></td>
- <% end %>
- </tr>
+
+<% if @public_bodies_by_tag.size > 0 %>
+ <h2>Exact tag matches</h2>
+ <table>
+ <tr>
+ <% for column in PublicBody.content_columns.map { |c| c.human_name } - [ "Last edit comment" ] %>
+ <th><%= column %></th>
+ <% end %>
+ </tr>
+ <% for public_body in @public_bodies_by_tag %>
+ <tr class="<%= cycle('odd', 'even') %>">
+ <td><%= link_to h(public_body.name), 'show/' + public_body.id.to_s %></td>
+ <% for column in PublicBody.content_columns.map { |c| c.name } - [ "name", "last_edit_comment" ] %>
+ <td><%=h public_body.send(column) %></td>
+ <% end %>
+ </tr>
+ <% end %>
+ </table>
+<% end %>
+
+<% if @public_bodies.size > 0 %>
+ <h2>Substring search matches</h2>
+ <table>
+ <tr>
+ <% for column in PublicBody.content_columns.map { |c| c.human_name } - [ "Last edit comment" ] %>
+ <th><%= column %></th>
+ <% end %>
+ </tr>
+ <% for public_body in @public_bodies %>
+ <tr class="<%= cycle('odd', 'even') %>">
+ <td><%= link_to h(public_body.name), 'show/' + public_body.id.to_s %></td>
+ <% for column in PublicBody.content_columns.map { |c| c.name } - [ "name", "last_edit_comment" ] %>
+ <td><%=h public_body.send(column) %></td>
+ <% end %>
+ </tr>
+ <% end %>
+ </table>
<% end %>
+
</table>
<%= will_paginate(@public_bodies) %>
diff --git a/todo.txt b/todo.txt
index 35df0f2e7..23b9d5a00 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,36 +1,10 @@
-CVS
----
-Show people tracking same query, when you are on search page.
-Put name of admin user rather than import_csv.
-Send automated email to remind people to clarify their request.
-Send response overdue alerts multiple times for one request.
-Overdue response alert email click through should show how many days overdue
-it is near where you write your reply.
-
-
-
-Altering updated_at for test code
-
-Test: Count how many clarification emails need to go out and run them manually
-after deploying
-
-XXX - is 3 day thing in self.alert_new_response_reminders stopping it working completely
-Change 14 days to 7? for when manually choose responses
-Check the table to see which of those alerts have gone out recently
-
-Test: Fix bug as to why "Vacant Council Housing Stock" didn't appear in my email
-alert - i.e. created at date compared, not described at date.
-
-#links and ?post_redirect knackered - e.g. from overdue email
-
-git push
-
FOI requests to use to test it
==============================
Internal review:
http://www.whatdotheyknow.com/request/search_engine_advertising_bought
http://www.whatdotheyknow.com/request/communications_from_home_office_
+http://www.whatdotheyknow.com/request/crime_investigation_following_al
http://www.whatdotheyknow.com/request/details_of_grant_awarded_to_vi_g_
I received a reply on 4 April from Alison McCarthy to my request for
@@ -58,6 +32,9 @@ BAILII - relationship with law courts, robots.txt ?
Next
====
+Unescape titles in email alerts, e.g. for Disused & Live Stations
+and &quot; in body e.g. http://www.whatdotheyknow.com/request/breakdown_of_marketing_press_and#outgoing-784
+
Blog posts / Wikipedia articles about this request
e.g. http://socialreporter.wordpress.com/2008/04/14/costs-of-the-bbc-action-action-network/
http://reportr.net/2008/04/24/bbc-spent-6m-to-develop-the-iplayer/
@@ -66,11 +43,14 @@ Or just look at referrers as Julian says
Advertise WDTK search queries on TWFY
Advertise alerts on end pages with WDTK
-user/show.rhtml sidebar vs. generic sidebar?
+user/show.rhtml sidebar vs. generic sidebar? (ask Tommy)
+Needs tagline that v. quickly explains what site is on each page
Later
=====
+Renaming public authorities will break alerts on them.
+
Display current page (when not on first page), or perhaps range on both the
/list pages, and on the /..../similar pages (maybe I missed it elsewhere too).
Should make a general will_paginate like function to do this part, and call
@@ -84,14 +64,13 @@ Museum aliases
Edits to outgoing/incoming/title won't be reindexed in Xapian (maybe just reindex all once a week)
Never update cached attachment text unless cache is explicitly cleared
-Make highlighting of search terms in RSS actually light up (maybe ask Tommy)
-
Link more clearly to full request and next/previous correspondence (ask Matthew)
Perhaps always redirect to internal # links from the /response/ pages
e.g. http://www.flickr.com/groups/central/discuss/72157604494352123/72157604515433851/
Get Atom highlighting to include stylesheet for yellow somehow
When you click RSS feed when on own request, default to RSS in the choice on next page
+Offer option of a feed with the union of all your feeds (tartarus asked for this).
"Some of the information" option should give you choice of complaining if you like.
@@ -127,6 +106,7 @@ Only show "is email right" footer the first time a new request is sent to that
email?
Show public body email address on their public page, with a link to say "this isn't right!"
+Allow searching of authorities by tag
CSV export of lists of emails for admins
Show list of popular tracks somewhere (finds most popular requests in a way)
@@ -187,6 +167,7 @@ Environmental Information Regulations apply for some bodies (e.g. environment ag
http://community.foe.co.uk/tools/right_to_know/faq.html#why_specify
Add geographical location to council import
+Have a single button to sign up to alerts on all your council PCTs etc.
Holding pen with comments - new requests don't get sent straight away, but are
delayed while people help improve them.
@@ -230,20 +211,11 @@ Quoting fixing TODO:
http://www.whatdotheyknow.com/request/265/response/688 - word wrapping
http://www.whatdotheyknow.com/request/180/response/482 (charset)
http://www.whatdotheyknow.com/request/576/response/812
+ http://www.whatdotheyknow.com/request/35/response/191
Sources of public bodies
========================
-List of which get most requests:
-http://www.dca.gov.uk/foi/reference/foi-independent-review.pdf
-
Schools list: www.edubase.gov.uk
-Visual design notes
-===================
-
-Needs tagline that v. quickly explains what site is on each page
-Colour/shade requests and responses bubbles differently
-
-