diff options
author | Struan Donald <struan@exo.org.uk> | 2011-05-17 14:02:42 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-05-17 14:02:42 +0100 |
commit | 57bbee2f0fd4808de5174ff66d74d5694a06c686 (patch) | |
tree | 0243161c5d5b5a09472e50b2141905ebc12678a0 | |
parent | 5a53775e519168534e421c0d7c74d6f50f8c8e13 (diff) |
shuffle where we generate the problem banner
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report.pm | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm index 3ab55d147..92c89a864 100644 --- a/perllib/FixMyStreet/App/Controller/Report.pm +++ b/perllib/FixMyStreet/App/Controller/Report.pm @@ -73,15 +73,6 @@ sub display : Path('') : Args(1) { # ( $problem->{latitude}, $problem->{longitude} ); - $c->stash->{banner} = $c->cobrand->generate_problem_banner($c->stash->{problem}); - -# my $banner; -# if ($q->{site} ne 'emptyhomes' && $problem->{state} eq 'confirmed' && $problem->{duration} > 8*7*24*60*60) { -# $banner = $q->p({id => 'unknown'}, _('This problem is old and of unknown status.')); -# } -# if ($problem->{state} eq 'fixed') { -# $banner = $q->p({id => 'fixed'}, _('This problem has been fixed') . '.'); -# } # my $fixed = ($input{fixed}) ? ' checked' : ''; @@ -171,6 +162,8 @@ sub format_problem_for_display : Private { my $problem = $c->stash->{problem}; + $c->stash->{banner} = $c->cobrand->generate_problem_banner($problem); + ( my $detail = $problem->detail ) =~ s/\r//g; my @detail = split /\n{2,}/, $detail; $c->stash->{detail} = \@detail; |