diff options
-rw-r--r-- | app/models/incoming_message.rb | 4 | ||||
-rw-r--r-- | app/models/info_request.rb | 7 | ||||
-rw-r--r-- | app/models/info_request_event.rb | 7 | ||||
-rw-r--r-- | app/views/admin_request/edit.rhtml | 1 | ||||
-rw-r--r-- | app/views/general/search.rhtml | 1 | ||||
-rw-r--r-- | app/views/request/show.rhtml | 3 |
6 files changed, 17 insertions, 6 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 28edaee20..932329bd2 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -19,7 +19,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: incoming_message.rb,v 1.180 2009-01-13 23:56:26 francis Exp $ +# $Id: incoming_message.rb,v 1.181 2009-01-14 16:46:02 francis Exp $ # TODO # Move some of the (e.g. quoting) functions here into rblib, as they feel @@ -432,7 +432,7 @@ class IncomingMessage < ActiveRecord::Base text.gsub!(/http:\/\/www.whatdotheyknow.com\/c\/[^\s]+/, "[WDTK login link]") # Remove Home Office survey links - # e.g. h[ttp://www.whatdotheyknow.com/request/serious_crime_act_2007_section_7#incoming-12650 + # e.g. http://www.whatdotheyknow.com/request/serious_crime_act_2007_section_7#incoming-12650 if self.info_request.public_body.url_name == 'home_office' text.gsub!(/Your password:-\s+[^\s]+/, '[password]') text.gsub!(/Password=[^\s]+/, '[password]') diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 06d5531a0..6dac1ab1f 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -23,7 +23,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: info_request.rb,v 1.159 2009-01-02 00:20:52 francis Exp $ +# $Id: info_request.rb,v 1.160 2009-01-14 16:46:02 francis Exp $ require 'digest/sha1' require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian') @@ -58,7 +58,8 @@ class InfoRequest < ActiveRecord::Base 'successful', 'partially_successful', 'internal_review', - 'requires_admin' + 'requires_admin', + 'user_withdrawn' ] validates_inclusion_of :prominence, :in => [ @@ -656,6 +657,8 @@ public "Awaiting internal review." elsif status == 'requires_admin' "Unusual response." + elsif status == 'user_withdrawn' + "Withdrawn by the requester." else raise "unknown status " + status end diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index 7fab7eb14..bbf5bc48a 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.69 2008-11-10 11:25:43 francis Exp $ +# $Id: info_request_event.rb,v 1.70 2009-01-14 16:46:02 francis Exp $ class InfoRequestEvent < ActiveRecord::Base belongs_to :info_request @@ -61,7 +61,8 @@ class InfoRequestEvent < ActiveRecord::Base 'successful', 'partially_successful', 'internal_review', - 'requires_admin' + 'requires_admin', + 'user_withdrawn' ] # Full text search indexing @@ -213,6 +214,8 @@ class InfoRequestEvent < ActiveRecord::Base return "All information sent" elsif status == 'internal_review' return "Internal review acknowledgement" + elsif status == 'user_withdrawn' + return "Withdrawn by requester" elsif status == 'requires_admin' return "Unusual response" end diff --git a/app/views/admin_request/edit.rhtml b/app/views/admin_request/edit.rhtml index 646d643fe..d00ec2c4c 100644 --- a/app/views/admin_request/edit.rhtml +++ b/app/views/admin_request/edit.rhtml @@ -26,6 +26,7 @@ 'partially_successful', 'internal_review', 'requires_admin', + 'user_withdrawn' ]) %> </p> diff --git a/app/views/general/search.rhtml b/app/views/general/search.rhtml index 94668e59d..7a4726f2a 100644 --- a/app/views/general/search.rhtml +++ b/app/views/general/search.rhtml @@ -132,6 +132,7 @@ <tr><td><strong><%=search_link('status:gone_postal')%></strong></td><td> The public authority would like to / has responded by post </td></tr> <tr><td><strong><%=search_link('status:internal_review')%></strong></td><td> Waiting for the public authority to complete an internal review of their handling of the request</td></tr> <tr><td><strong><%=search_link('status:requires_admin')%></strong></td><td> A strange reponse, required attention by the WhatDoTheyKnow team </td></tr> + <tr><td><strong><%=search_link('status:user_withdrawn')%></strong></td><td> The requester has abandoned this request for some reason </td></tr> </table> <h2 id="varieties">Table of varieties</h2> diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml index f173dfe64..1993b77ce 100644 --- a/app/views/request/show.rhtml +++ b/app/views/request/show.rhtml @@ -111,6 +111,9 @@ Waiting for an <strong>internal review</strong> by <%= public_body_link(@info_request.public_body) %> of their handling of this request. <% elsif @status == 'requires_admin' %> This request has had an unusual response, and <strong>requires attention</strong> from the WhatDoTheyKnow team. + <% elsif @status == 'user_withdrawn' %> + This request has been <strong>withdrawn</strong> by the person who made it. + There may be an explanation in an annotation below. <% else %> <% raise "unknown status " + @status %> <% end %> |