diff options
-rw-r--r-- | app/controllers/general_controller.rb | 4 | ||||
-rw-r--r-- | app/models/info_request_event.rb | 12 | ||||
-rw-r--r-- | todo.txt | 14 |
3 files changed, 17 insertions, 13 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index 11a1a61d7..8dd5e2384 100644 --- a/app/controllers/general_controller.rb +++ b/app/controllers/general_controller.rb @@ -5,7 +5,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: general_controller.rb,v 1.42 2008-09-08 02:05:13 francis Exp $ +# $Id: general_controller.rb,v 1.43 2008-09-08 11:33:10 francis Exp $ class GeneralController < ApplicationController @@ -23,7 +23,7 @@ class GeneralController < ApplicationController # Get some successful requests query = 'variety:response (status:successful OR status:partially_successful)' sortby = "described" - @xapian_object = perform_search([InfoRequestEvent], query, sortby, 'request_collapse', 8) + @xapian_object = perform_search([InfoRequestEvent], query, sortby, 'request_title_collapse', 8) @successful_requests = @xapian_object.results.map { |r| r[:model].info_request } end diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index ae6efcf84..4faeb0bdd 100644 --- a/app/models/info_request_event.rb +++ b/app/models/info_request_event.rb @@ -21,7 +21,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: info_request_event.rb,v 1.55 2008-08-31 13:08:24 francis Exp $ +# $Id: info_request_event.rb,v 1.56 2008-09-08 11:33:11 francis Exp $ class InfoRequestEvent < ActiveRecord::Base belongs_to :info_request @@ -64,7 +64,8 @@ class InfoRequestEvent < ActiveRecord::Base acts_as_xapian :texts => [ :search_text_main, :title ], :values => [ [ :created_at, 0, "created_at", :date ], [ :described_at_numeric, 1, "described_at", :number ], # XXX using :number for lack of :datetime support in Xapian values - [ :request, 2, "request_collapse", :string ] + [ :request, 2, "request_collapse", :string ], + [ :request_title_collapse, 3, "request_title_collapse", :string ] ], :terms => [ [ :calculated_state, 'S', "status" ], [ :requested_by, 'B', "requested_by" ], @@ -93,6 +94,13 @@ class InfoRequestEvent < ActiveRecord::Base def request self.info_request.url_title end + def request_title_collapse + url_title = self.info_request.url_title + # remove numeric section from the end, use this to group lots + # of similar requests by + url_title.gsub!(/[_0-9]+$/, "") + return url_title + end def described_at # For responses, people might have RSS feeds on searches for type of # response (e.g. successful) in which case we want to date sort by @@ -67,15 +67,17 @@ CSS things - CSS error on "all councils" page on some browsers - Spacing on error boxes round form elements - icons for "Things to do with this request" ? + - forms are tiny on firefox e.g. http://www.whatdotheyknow.com/new/50 + +Wrapping of lines like this - are we taking few enough chars per line when wrapping annotations? + http://www.whatdotheyknow.com/request/contract_with_thales_for_nationa#comment-95 + http://www.whatdotheyknow.com/request/marketing_budget_for_id_card_sch_2#outgoing-4110 Merge workflow into one stream - find information, if you can't find it then request it. so just search is on front page, with popular stuff below a la Google Directory Google search within website of authority. Show similar requests after you have filed yours - maybe on preview too. -Turning off frontpage - - Remove javascript from default :) - Flag bad comments, delete comments from admin interface - perhaps via contact form, and form sending refering URL? @@ -93,12 +95,6 @@ Don't let somebody file a new request if they haven't classified all existing on Test code for FOI officer upload -Check that initial requests have the Return-Path set to same address as From still -after rails upgarde - -Completely prevent spaces at start of titles: -http://www.whatdotheyknow.com/body/hblb - Later ===== |