diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-11-20 19:13:52 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2019-12-09 12:50:07 +0000 |
commit | a729f2b9b27af55b6a1e355febd52ac48c425853 (patch) | |
tree | 001ffd319b25ea21dd1cfda258963db3e43349d7 /perllib/FixMyStreet/DB/Result/Problem.pm | |
parent | cae638745b1c0777094705032276479dcc1137f4 (diff) |
[fixmystreet.com] Limit TfL cobrand report display
On fixmystreet.com, you cannot view reports made on the TfL cobrand,
apart from on reporting seeing pins labelled with the report's category,
linking through to the TfL cobrand.
Output the pin's base URL if different from normal, so e.g. app can link
appropriately.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index 28703c416..a188d9c2b 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -340,6 +340,7 @@ around service => sub { sub title_safe { my $self = shift; return _('Awaiting moderation') if $self->cobrand eq 'zurich' && $self->state eq 'submitted'; + return sprintf("%s problem", $self->category) if $self->cobrand eq 'tfl' && $self->result_source->schema->cobrand->moniker ne 'tfl'; return $self->title; } @@ -1039,6 +1040,7 @@ sub pin_data { problem => $self, draggable => $opts{draggable}, type => $opts{type}, + base_url => $c->cobrand->relative_url_for_report($self), } }; |