diff options
author | Struan Donald <struan@exo.org.uk> | 2014-03-21 17:34:57 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2014-04-08 13:21:13 +0100 |
commit | ee474f3340c02bc1b9e75accf303e16257d86882 (patch) | |
tree | 9149703d53e18d0b0b2fc888ebea7ae241d10043 /perllib | |
parent | 5c871b7093ac2fd137b980979bb210cc1cad59a7 (diff) |
Changes to alert-update formatting for ZeroTB
Include date in alerts
Remove everything apart from the update text as we don't need it
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/ZeroTB.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/ZeroTB.pm b/perllib/FixMyStreet/Cobrand/ZeroTB.pm index c774610c4..32d14d0f6 100644 --- a/perllib/FixMyStreet/Cobrand/ZeroTB.pm +++ b/perllib/FixMyStreet/Cobrand/ZeroTB.pm @@ -29,6 +29,7 @@ sub allow_photo_upload{ return 0; } sub send_questionnaires { return 0; } sub on_map_default_max_pin_age { return 0; } sub never_confirm_updates { 1; } +sub include_time_in_update_alerts { 1; } sub get_clinic_list { my $self = shift; @@ -36,5 +37,17 @@ sub get_clinic_list { return $self->problems->search({ state => 'confirmed' }, { order_by => 'title' }); } +sub prettify_dt { + my ( $self, $dt, $type ) = @_; + $type ||= ''; + + if ( $type eq 'alert' ) { + return $dt->strftime('%H:%M %Y-%m-%d'); + } else { + return Utils::prettify_dt( $dt, $type ); + } + +} + 1; |