diff options
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/FixMyStreet.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyStreet.pm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm index 26638d41c..03bc0c82b 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm @@ -9,6 +9,13 @@ use constant COUNCIL_ID_ISLEOFWIGHT => 2636; sub on_map_default_status { return 'open'; } +# Show TfL pins as grey +sub pin_colour { + my ( $self, $p, $context ) = @_; + return 'grey' if $p->to_body_named('TfL'); + return $self->next::method($p, $context); +} + # Special extra sub path_to_web_templates { my $self = shift; @@ -28,6 +35,18 @@ sub restriction { return {}; } +# FixMyStreet needs to not show TfL reports... +sub problems_restriction { + my ($self, $rs) = @_; + my $table = ref $rs eq 'FixMyStreet::DB::ResultSet::Nearby' ? 'problem' : 'me'; + return $rs->search({ "$table.cobrand" => { '!=' => 'tfl' } }); +} + +sub relative_url_for_report { + my ( $self, $report ) = @_; + return $report->cobrand eq 'tfl' ? FixMyStreet::Cobrand::TfL->base_url : ""; +} + sub munge_around_category_where { my ($self, $where) = @_; |