diff options
author | francis <francis> | 2008-02-28 14:04:45 +0000 |
---|---|---|
committer | francis <francis> | 2008-02-28 14:04:45 +0000 |
commit | b5304d82fd31b1b1afa136ba61348ae22284b71b (patch) | |
tree | 15706f7c9ec5db3cbffe5fe9f86bc8fb57ea8f4b /app/models/info_request.rb | |
parent | cfd28a3fb99ab2764c22ed2d34e74d62e516ab23 (diff) |
Show requests made by same person to same body
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 6a72af2f9..5eab7ba4d 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.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.rb,v 1.49 2008-02-27 14:01:30 francis Exp $ +# $Id: info_request.rb,v 1.50 2008-02-28 14:04:46 francis Exp $ require 'digest/sha1' @@ -345,6 +345,31 @@ public end end + # Display versino of status + def display_status + status = self.calculate_status + if self.awaiting_description + "Awaiting classification" + elsif status == 'waiting_response' + "Awaiting response." + elsif status == 'waiting_response_overdue' + "Response overdue." + elsif status == 'partially_successful' + "Partially successful." + elsif status == 'rejected' + "Rejected." + elsif status == 'successful' + "Successful." + elsif status == 'waiting_clarification' + "Waiting clarification." + elsif status == 'requires_admin' + "Unusual response." + else + raise "unknown status " + status + end + end + + protected # Called by incoming_email and envelope_email @@ -368,7 +393,6 @@ public end end - end |