aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand/Default.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-07-13 13:30:45 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-07-13 13:30:45 +0100
commit20138c0fa9805e8eb8cb1b413310242f1ac1f8cd (patch)
tree82b68778998186d8bf20788831d1b66dd16199c1 /perllib/FixMyStreet/Cobrand/Default.pm
parentdf59d7dbefa36b66c427f1d33f6392f1a3c209f5 (diff)
Move banner generation logic out of cobrand code and into templates.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/Default.pm')
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm36
1 files changed, 0 insertions, 36 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index fc195432d..a73487ca4 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -855,42 +855,6 @@ sub council_rss_alert_options {
return ( \@options, @reported_to_options ? \@reported_to_options : undef );
}
-=head2 generate_problem_banner
-
- my $banner = $c->cobrand->generate_problem_banner;
-
- <p id="[% banner.id %]:>[% banner.text %]</p>
-
-Generate id and text for banner that appears at top of problem page.
-
-=cut
-
-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} = _('This problem is old and of unknown status.');
- }
- if ($problem->is_fixed) {
- $banner->{id} = 'fixed';
- $banner->{text} = _('This problem has been fixed') . '.';
- }
- if ($problem->is_closed) {
- $banner->{id} = 'closed';
- $banner->{text} = _('This problem has been closed') . '.';
- }
-
- if ( grep { $problem->state eq $_ } ( 'investigating', 'in progress', 'planned' ) ) {
- $banner->{id} = 'progress';
- $banner->{text} = _('This problem is in progress') . '.';
- }
-
- return $banner;
-}
-
sub reports_council_check {
my ( $self, $c, $code ) = @_;