diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-07-13 13:30:45 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-07-13 13:30:45 +0100 |
commit | 20138c0fa9805e8eb8cb1b413310242f1ac1f8cd (patch) | |
tree | 82b68778998186d8bf20788831d1b66dd16199c1 /perllib/FixMyStreet/Cobrand/FixMyStreet.pm | |
parent | df59d7dbefa36b66c427f1d33f6392f1a3c209f5 (diff) |
Move banner generation logic out of cobrand code and into templates.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/FixMyStreet.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyStreet.pm | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm index d44c58f37..33e071b66 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm @@ -12,32 +12,6 @@ sub admin_base_url { sub all_reports_style { return 'detailed'; } -sub generate_problem_banner { - my ( $self, $problem ) = @_; - - my $banner = {}; - if ( $problem->is_open && time() - $problem->lastupdate_local->epoch > 8 * 7 * 24 * 60 * 60 ) - { - $banner->{id} = 'unknown'; - $banner->{text} = _('Unknown'); - } - if ($problem->is_fixed) { - $banner->{id} = 'fixed'; - $banner->{text} = _('Fixed'); - } - if ($problem->is_closed) { - $banner->{id} = 'closed'; - $banner->{text} = _('Closed'); - } - - if ( grep { $problem->state eq $_ } ( 'investigating', 'in progress', 'planned' ) ) { - $banner->{id} = 'progress'; - $banner->{text} = _('In progress'); - } - - return $banner; -} - sub allow_crosssell_adverts { return 1; } 1; |