diff options
author | Dave Arter <davea@mysociety.org> | 2014-05-30 17:09:01 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2016-07-08 15:28:22 +0100 |
commit | 18b68734f0d425875a4e3abbd4416a7952d1089f (patch) | |
tree | 5df410c002d8baffb9b1b37a297147205bded203 /perllib/FixMyStreet/DB/Result/Problem.pm | |
parent | d2ef2aaa0155809b31ea577c8c26afeff5bec98b (diff) |
Include link back to originating cobrand on fms.com reports
When viewing a report on FMS.com whose recipient council has a
FMS cobrand, turns the council name into a link to view the same report
on that council's cobranded site.
Includes methods cribbed from Hakim's Open311 refactor branch from
commit 47daa02420a4f5a4264c31efcf2a2e8611c2f23e.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index d6bcea55c..bc72cf9da 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -658,7 +658,12 @@ sub can_display_external_id { sub duration_string { my ( $problem, $c ) = @_; - my $body = $problem->body( $c ); + my $body; + if ( $c->cobrand->can('link_to_council_cobrand') ) { + $body = $c->cobrand->link_to_council_cobrand($problem); + } else { + $body = $problem->body( $c ); + } return sprintf(_('Sent to %s %s later'), $body, Utils::prettify_duration($problem->whensent->epoch - $problem->confirmed->epoch, 'minute') ); |