diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-02-10 13:30:13 +0000 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-02-10 13:30:13 +0000 |
commit | 17d19caae89fecaaee6fc194ad0bdc966d654a2a (patch) | |
tree | bb9acbe3697f1caf8c6ad55d520b29211169c522 | |
parent | c694c1a6d394792d75b1db497026a5c42b26e9dd (diff) | |
parent | b478998608aebeb502a2753c82d2d00ade5a392f (diff) |
Merge branch 'master' into migrate_from_osgb36_to_wgs84
-rw-r--r-- | perllib/FixMyStreet/Alert.pm | 7 | ||||
-rw-r--r-- | templates/emails/alert-update | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Alert.pm b/perllib/FixMyStreet/Alert.pm index 59683be0c..90a5b1aaa 100644 --- a/perllib/FixMyStreet/Alert.pm +++ b/perllib/FixMyStreet/Alert.pm @@ -135,6 +135,13 @@ sub email_alerts ($) { # more than once if there are multiple vhosts running off the same database. The email_host # call checks if this is the host that sends mail for this cobrand. next unless (Cobrand::email_host($row->{alert_cobrand})); + + # create problem status message for the templates + $data{state_message} = + $row->{state} eq 'fixed' + ? _("This report is currently marked as fixed.") + : _("This report is currently marked as open."); + dbh()->do('insert into alert_sent (alert_id, parameter) values (?,?)', {}, $row->{alert_id}, $row->{item_id}); if ($last_alert_id && $last_alert_id != $row->{alert_id}) { _send_aggregated_alert_email(%data); diff --git a/templates/emails/alert-update b/templates/emails/alert-update index f68ee55a4..ac0ddd50a 100644 --- a/templates/emails/alert-update +++ b/templates/emails/alert-update @@ -4,6 +4,8 @@ The following updates have been left on this problem: <?=$values['data']?> +<?=$values['state_message']?> + To view or reply to these updates, please visit the following URL: <?=$values['problem_url']?> |