diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/about_me_validator.rb | 2 | ||||
-rw-r--r-- | app/models/censor_rule.rb | 2 | ||||
-rw-r--r-- | app/models/change_email_validator.rb | 2 | ||||
-rw-r--r-- | app/models/comment.rb | 2 | ||||
-rw-r--r-- | app/models/contact_validator.rb | 2 | ||||
-rw-r--r-- | app/models/exim_log.rb | 2 | ||||
-rw-r--r-- | app/models/exim_log_done.rb | 2 | ||||
-rw-r--r-- | app/models/foi_attachment.rb | 2 | ||||
-rw-r--r-- | app/models/holiday.rb | 2 | ||||
-rw-r--r-- | app/models/incoming_message.rb | 5 | ||||
-rw-r--r-- | app/models/info_request.rb | 14 | ||||
-rw-r--r-- | app/models/info_request_event.rb | 2 | ||||
-rw-r--r-- | app/models/outgoing_message.rb | 2 | ||||
-rw-r--r-- | app/models/post_redirect.rb | 2 | ||||
-rw-r--r-- | app/models/profile_photo.rb | 2 | ||||
-rw-r--r-- | app/models/public_body.rb | 2 | ||||
-rw-r--r-- | app/models/purge_request.rb | 13 | ||||
-rw-r--r-- | app/models/raw_email.rb | 2 | ||||
-rw-r--r-- | app/models/request_mailer.rb | 2 | ||||
-rw-r--r-- | app/models/track_thing.rb | 2 | ||||
-rw-r--r-- | app/models/track_things_sent_email.rb | 2 | ||||
-rw-r--r-- | app/models/user.rb | 5 | ||||
-rw-r--r-- | app/models/user_info_request_sent_alert.rb | 2 |
23 files changed, 50 insertions, 25 deletions
diff --git a/app/models/about_me_validator.rb b/app/models/about_me_validator.rb index e24c5512c..67b81bc9c 100644 --- a/app/models/about_me_validator.rb +++ b/app/models/about_me_validator.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 95 +# Schema version: 114 # # Table name: about_me_validators # diff --git a/app/models/censor_rule.rb b/app/models/censor_rule.rb index 72b92d462..a477d2568 100644 --- a/app/models/censor_rule.rb +++ b/app/models/censor_rule.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: censor_rules # diff --git a/app/models/change_email_validator.rb b/app/models/change_email_validator.rb index 80db96c64..0395ab6d5 100644 --- a/app/models/change_email_validator.rb +++ b/app/models/change_email_validator.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: change_email_validators # diff --git a/app/models/comment.rb b/app/models/comment.rb index b3d5ba640..6edfaa24f 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: comments # diff --git a/app/models/contact_validator.rb b/app/models/contact_validator.rb index 0bc562835..a9748a739 100644 --- a/app/models/contact_validator.rb +++ b/app/models/contact_validator.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 95 +# Schema version: 114 # # Table name: contact_validators # diff --git a/app/models/exim_log.rb b/app/models/exim_log.rb index 2c6bea4f8..60faa7f0b 100644 --- a/app/models/exim_log.rb +++ b/app/models/exim_log.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: exim_logs # diff --git a/app/models/exim_log_done.rb b/app/models/exim_log_done.rb index b8a39033a..3cedc1379 100644 --- a/app/models/exim_log_done.rb +++ b/app/models/exim_log_done.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 95 +# Schema version: 114 # # Table name: exim_log_dones # diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb index 1906b56db..f3e3d7e00 100644 --- a/app/models/foi_attachment.rb +++ b/app/models/foi_attachment.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: foi_attachments # diff --git a/app/models/holiday.rb b/app/models/holiday.rb index 1fa599c13..debd88dec 100644 --- a/app/models/holiday.rb +++ b/app/models/holiday.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: holidays # diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 9dcd8c1bc..3f74423d0 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: incoming_messages # @@ -11,12 +11,12 @@ # cached_attachment_text_clipped :text # cached_main_body_text_folded :text # cached_main_body_text_unfolded :text -# sent_at :time # subject :text # mail_from_domain :text # valid_to_reply_to :boolean # last_parsed :datetime # mail_from :text +# sent_at :datetime # # encoding: UTF-8 @@ -1142,3 +1142,4 @@ class IncomingMessage < ActiveRecord::Base end + 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 + diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index dacd3223e..a410328b0 100644 --- a/app/models/info_request_event.rb +++ b/app/models/info_request_event.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: info_request_events # diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb index c29cbb785..0ce1ee11c 100644 --- a/app/models/outgoing_message.rb +++ b/app/models/outgoing_message.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: outgoing_messages # diff --git a/app/models/post_redirect.rb b/app/models/post_redirect.rb index 2b636453f..f613fc58d 100644 --- a/app/models/post_redirect.rb +++ b/app/models/post_redirect.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: post_redirects # diff --git a/app/models/profile_photo.rb b/app/models/profile_photo.rb index 6c66d868a..72bfe954f 100644 --- a/app/models/profile_photo.rb +++ b/app/models/profile_photo.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: profile_photos # diff --git a/app/models/public_body.rb b/app/models/public_body.rb index ae902dac6..267b5d60c 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 95 +# Schema version: 114 # # Table name: public_bodies # diff --git a/app/models/purge_request.rb b/app/models/purge_request.rb index 088d5b84b..48a16f9e6 100644 --- a/app/models/purge_request.rb +++ b/app/models/purge_request.rb @@ -1,3 +1,15 @@ +# == Schema Information +# Schema version: 114 +# +# Table name: purge_requests +# +# id :integer not null, primary key +# url :string(255) +# created_at :datetime not null +# model :string(255) not null +# model_id :integer not null +# + # models/purge_request.rb: # A queue of URLs to purge # @@ -37,3 +49,4 @@ end + diff --git a/app/models/raw_email.rb b/app/models/raw_email.rb index 29122e692..1466e5d9c 100644 --- a/app/models/raw_email.rb +++ b/app/models/raw_email.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: raw_emails # diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb index e336111ee..ee6220a47 100644 --- a/app/models/request_mailer.rb +++ b/app/models/request_mailer.rb @@ -48,7 +48,7 @@ class RequestMailer < ApplicationMailer def requires_admin(info_request) @from = info_request.user.name_and_email @recipients = contact_from_name_and_email - @subject = _("FOI response requires admin - ") + info_request.title + @subject = _("FOI response requires admin ({{reason}}) - {{title}}", :reason => info_request.described_state, :title => info_request.title) url = main_url(request_url(info_request)) admin_url = request_admin_url(info_request) @body = {:info_request => info_request, :url => url, :admin_url => admin_url } diff --git a/app/models/track_thing.rb b/app/models/track_thing.rb index 446060279..f6a58189f 100644 --- a/app/models/track_thing.rb +++ b/app/models/track_thing.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: track_things # diff --git a/app/models/track_things_sent_email.rb b/app/models/track_things_sent_email.rb index 777339d75..24297f57b 100644 --- a/app/models/track_things_sent_email.rb +++ b/app/models/track_things_sent_email.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: track_things_sent_emails # diff --git a/app/models/user.rb b/app/models/user.rb index 4a7153b3f..57fce429c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: users # @@ -20,6 +20,8 @@ # email_bounced_at :datetime # email_bounce_message :text default(""), not null # no_limit :boolean default(FALSE), not null +# receive_email_alerts :boolean default(TRUE), not null +# user_similarity_id :integer # # models/user.rb: @@ -441,3 +443,4 @@ class User < ActiveRecord::Base end end + diff --git a/app/models/user_info_request_sent_alert.rb b/app/models/user_info_request_sent_alert.rb index 15cac515f..a97fd5d44 100644 --- a/app/models/user_info_request_sent_alert.rb +++ b/app/models/user_info_request_sent_alert.rb @@ -1,5 +1,5 @@ # == Schema Information -# Schema version: 108 +# Schema version: 114 # # Table name: user_info_request_sent_alerts # |