aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-02-05 17:41:36 +0000
committerMatthew Somerville <matthew@mysociety.org>2020-02-06 14:41:05 +0000
commit8feaa44c55f11eced01ce916e51515d763fd194e (patch)
tree7dfb5fcf452fd58da2a8aecf4a18a8251dadb083
parentfba69ae6c1ed5952a1d45b532868917dee66e4fb (diff)
[UK Councils] Make sure TfL link works everywhere.
-rw-r--r--perllib/FixMyStreet/Cobrand/UKCouncils.pm4
-rw-r--r--templates/web/fixmystreet-uk-councils/report/_item_photo_title.html5
-rw-r--r--templates/web/tfl/report/_item_photo_title.html1
3 files changed, 9 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
index 7336e60ca..60cecd0bb 100644
--- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm
+++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
@@ -261,7 +261,9 @@ sub base_url_for_report {
sub relative_url_for_report {
my ( $self, $report ) = @_;
- return $self->owns_problem($report) ? "" : FixMyStreet->config('BASE_URL');
+ return "" if $self->owns_problem($report);
+ return FixMyStreet::Cobrand::TfL->base_url if $report->cobrand eq 'tfl';
+ return FixMyStreet->config('BASE_URL');
}
sub admin_allow_user {
diff --git a/templates/web/fixmystreet-uk-councils/report/_item_photo_title.html b/templates/web/fixmystreet-uk-councils/report/_item_photo_title.html
new file mode 100644
index 000000000..7f18b14c3
--- /dev/null
+++ b/templates/web/fixmystreet-uk-councils/report/_item_photo_title.html
@@ -0,0 +1,5 @@
+[% IF problem.cobrand == 'tfl' %]
+ <h3 class="item-list__heading admin-offsite-link">[% problem.category | html %] problem</h3>
+[% ELSE %]
+ [% THROW file 'Not found' %]
+[% END %]
diff --git a/templates/web/tfl/report/_item_photo_title.html b/templates/web/tfl/report/_item_photo_title.html
new file mode 100644
index 000000000..becd28ca3
--- /dev/null
+++ b/templates/web/tfl/report/_item_photo_title.html
@@ -0,0 +1 @@
+[% THROW file 'Not found' %]