aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-05-24 12:06:22 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-05-24 12:06:31 +0100
commitacde8a57e087d3058b8539e04c12e790866f8451 (patch)
treed972b799c89eb5be11cfee3c93cf5bd36956c741 /app/models/info_request.rb
parentbd1dede2591fd9c4ebc54e5ef41232193f0a0f5b (diff)
parent774c199fa52b98b6780928a602dfdee1b2fce711 (diff)
Merge branch 'feature/report-request-as-unsuitable' into develop. Fixes #445
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r--app/models/info_request.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 1e55f92ae..47398dabb 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -1,5 +1,5 @@
# == Schema Information
-# Schema version: 108
+# Schema version: 114
#
# Table name: info_requests
#
@@ -17,6 +17,7 @@
# allow_new_responses_from :string(255) default("anybody"), not null
# handle_rejected_responses :string(255) default("bounce"), not null
# idhash :string(255) not null
+# attention_requested :boolean default(FALSE)
#
@@ -88,7 +89,8 @@ class InfoRequest < ActiveRecord::Base
'internal_review',
'error_message',
'requires_admin',
- 'user_withdrawn'
+ 'user_withdrawn',
+ 'attention_requested'
]
if @@custom_states_loaded
states += InfoRequest.theme_extra_states
@@ -503,7 +505,7 @@ public
# states which require administrator action (hence email administrators
# when they are entered, and offer state change dialog to them)
def InfoRequest.requires_admin_states
- return ['requires_admin', 'error_message']
+ return ['requires_admin', 'error_message', 'attention_requested']
end
def requires_admin?
@@ -511,6 +513,9 @@ public
return false
end
+ def can_have_attention_requested?
+ end
+
# change status, including for last event for later historical purposes
def set_described_state(new_state)
ActiveRecord::Base.transaction do
@@ -803,6 +808,8 @@ public
_("Delivery error")
elsif status == 'requires_admin'
_("Unusual response.")
+ elsif status == 'attention_requested'
+ _("Reported for administrator attention.")
elsif status == 'user_withdrawn'
_("Withdrawn by the requester.")
else
@@ -1066,3 +1073,4 @@ public
end
end
end
+