aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Location.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2014-06-11 14:23:09 +0100
committerStruan Donald <struan@exo.org.uk>2014-07-03 17:36:58 +0100
commit1877bf4e4ae679c70c2349d6b9ad15ea610e3dc9 (patch)
treeec4f2ed7fa73fba718ec3ecf76ca8bdee69132e7 /perllib/FixMyStreet/App/Controller/Location.pm
parent291c66c7700b8e6c90052b6d4eb436909fbe0865 (diff)
Display a banner to non UK FixMyStreet visitors
only on FMS and only if from outside the uk Fixes #571
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Location.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Location.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Location.pm b/perllib/FixMyStreet/App/Controller/Location.pm
index 4312b6911..8a68b2b3d 100644
--- a/perllib/FixMyStreet/App/Controller/Location.pm
+++ b/perllib/FixMyStreet/App/Controller/Location.pm
@@ -131,6 +131,22 @@ sub check_location : Private {
return 1;
}
+=head2 country_message
+
+Displays the country_message template, used for displaying a message to
+people using the site from outside the host country.
+
+=cut
+
+sub country_message : Path('/country_message') : Args(0) {
+ my ( $self, $c ) = @_;
+
+ # we do not want to cache this as we always want to check if displaying this
+ # is the right thing to do.
+ $c->res->header( 'Cache_Control' => 'max-age=0' );
+ $c->stash->{template} = 'front/international_banner.html';
+}
+
# Utility function for if someone (rarely) enters a grid reference
sub gridref_to_latlon {
my ( $a, $b, $num ) = @_;