diff options
-rw-r--r-- | app/controllers/application.rb | 4 | ||||
-rw-r--r-- | app/models/info_request_event.rb | 11 | ||||
-rw-r--r-- | todo.txt | 12 |
3 files changed, 15 insertions, 12 deletions
diff --git a/app/controllers/application.rb b/app/controllers/application.rb index 736656dec..2f27f2872 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: application.rb,v 1.38 2008-04-14 14:46:47 francis Exp $ +# $Id: application.rb,v 1.39 2008-04-17 23:19:55 francis Exp $ class ApplicationController < ActionController::Base @@ -134,7 +134,7 @@ class ApplicationController < ActionController::Base elsif sortby == 'newest' return 'created_at desc' elsif sortby == 'described' - return 'last_described_at desc' # use this for RSS + return 'rss_at desc' # use this for RSS else raise "Unknown sort order " + @sortby end diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index f7897ed9d..27aab94a8 100644 --- a/app/models/info_request_event.rb +++ b/app/models/info_request_event.rb @@ -18,7 +18,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.36 2008-04-15 23:53:10 francis Exp $ +# $Id: info_request_event.rb,v 1.37 2008-04-17 23:19:55 francis Exp $ class InfoRequestEvent < ActiveRecord::Base belongs_to :info_request @@ -59,7 +59,7 @@ class InfoRequestEvent < ActiveRecord::Base { :requested_from => :string }, { :request => :string }, { :created_at => :date }, - { :last_described_at => :date }, + { :rss_at => :date }, { :variety => :string } ], :if => "$do_solr_index" def status # for name in Solr queries @@ -74,6 +74,13 @@ class InfoRequestEvent < ActiveRecord::Base def request self.info_request.url_title end + def rss_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 + # when the responses was described as being of the type. For other + # types, just use the create at date. + self.last_described_at || self.created_at + end def solr_text_main text = '' if self.event_type == 'sent' @@ -1,7 +1,3 @@ -Isn't showing admin things that haven't been touched for 2 weeks or whatever - -jslib path loading broken in Mongrel :( - FOI requests to use to test it ============================== @@ -41,10 +37,6 @@ Let you change feeds from email to RSS "Some other requests..." should have "more" link now -If you edit needs anim to waiting_response it doesn't edit the value in the event history, so screws up search stuff? -https://secure.mysociety.org/admin/foi/request/show/37 -https://secure.mysociety.org/admin/foi/request/show/137 - Things to track: - new requests - new requests with keyword @@ -138,6 +130,7 @@ Show public body email address on their public page, with a link to say "this is Requests with related content (via Lucene compare document search somehow?) Blog posts / Wikipedia articles about this request + e.g. http://socialreporter.wordpress.com/2008/04/14/costs-of-the-bbc-action-action-network/ Remember me box This can't possible be the best way, it is too depressing: @@ -207,6 +200,9 @@ Quoting fixing TODO: http://www.whatdotheyknow.com/request/secured_convictions_aided_by_cct http://www.whatdotheyknow.com/request/m3_junction_2_eastbound_speed_re http://www.whatdotheyknow.com/request/taxi_ranking + http://www.whatdotheyknow.com/request/94/response/161 + http://www.whatdotheyknow.com/request/police_powers_to_inform_car_insu + http://www.whatdotheyknow.com/request/sale_of_public_land_in_worcester Char encoding and other bad formatting: http://www.whatdotheyknow.com/request/107/response/144 http://www.whatdotheyknow.com/request/35/response/177 |