diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Alert.pm | 6 | ||||
-rwxr-xr-x | setenv.pl | 8 | ||||
-rw-r--r-- | t/app/controller/alert.t | 2 | ||||
-rw-r--r-- | templates/web/default/alert/list.html | 15 | ||||
-rw-r--r-- | templates/web/default/footer.html | 8 |
5 files changed, 22 insertions, 17 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm index b8b7cce40..bea5345e3 100644 --- a/perllib/FixMyStreet/App/Controller/Alert.pm +++ b/perllib/FixMyStreet/App/Controller/Alert.pm @@ -96,8 +96,7 @@ sub rss : Private { $c->res->redirect($url); } elsif ( $feed =~ /^local:([\d\.-]+):([\d\.-]+)$/ ) { - ( my $id = $1 ) =~ tr{:_}{/+}; - $url = $c->cobrand->base_url() . '/rss/l/' . $id; + $url = $c->cobrand->base_url() . '/rss/l/' . $1 . ',' . $2; $c->res->redirect($url); } else { @@ -332,9 +331,6 @@ sub prettify_pc : Private { my $pretty_pc_text = $pretty_pc; $pretty_pc_text =~ s/ //g; $c->stash->{pretty_pc_text} = $pretty_pc_text; - - # this may be better done in template - $pretty_pc =~ s/ / /; } $c->stash->{pretty_pc} = $pretty_pc; @@ -34,12 +34,12 @@ $ENV{PATH} = join ':', uniq "$root/bin", split( m/:/, $ENV{PATH} ); # now decide what to do - if no arguments print out shell arguments to set the # environment. If there are arguments then run those so that they run correctly -if (@ARGV) { - system @ARGV; -} +#if (@ARGV) { +# system @ARGV; +#} # we might want to require this file to configure something like a CGI script -elsif ( $0 eq __FILE__ ) { +if ( $0 eq __FILE__ ) { my @keys = sort 'PATH', grep { m{^PERL} } keys %ENV; diff --git a/t/app/controller/alert.t b/t/app/controller/alert.t index 45257b31b..3e2dedd53 100644 --- a/t/app/controller/alert.t +++ b/t/app/controller/alert.t @@ -22,7 +22,7 @@ $mech->content_contains('html lang="en-gb"'); $mech->get_ok('/alert/list?pc=EH99 1SP'); $mech->title_like(qr/^Local RSS feeds and email alerts/); -$mech->content_contains('Local RSS feeds and email alerts for ‘EH99 1SP’'); +$mech->content_contains('Here are the types of local problem alerts for ‘EH99 1SP’'); $mech->content_contains('html lang="en-gb"'); $mech->content_contains('Problems within 8.5km'); $mech->content_contains('rss/pc/EH991SP/2'); diff --git a/templates/web/default/alert/list.html b/templates/web/default/alert/list.html index 931636f06..a8f962c5d 100644 --- a/templates/web/default/alert/list.html +++ b/templates/web/default/alert/list.html @@ -1,9 +1,18 @@ -[% title = loc('Local RSS feeds and email alerts') %] +[% + IF pretty_pc; + title = tprintf( loc("Local RSS feeds and email alerts for ā%sā"), pretty_pc ); + ELSE; + title = loc('Local RSS feeds and email alerts'); + END; +%] [% INCLUDE 'header.html', title => title %] [% IF pretty_pc %] -[% title = tprintf( loc('Local RSS feeds and email alerts for ‘%s’'), pretty_pc ) %] + [% + pretty_pc = pretty_pc | html | replace(' ', ' '); + title = tprintf( loc("Local RSS feeds and email alerts for ā%sā"), pretty_pc ); + %] [% END %] @@ -24,7 +33,7 @@ <p> [% IF pretty_pc %] - [% tprintf( loc('Here are the types of local problem alerts for ‘%s’.'), pretty_pc ) | html %] + [% tprintf( loc('Here are the types of local problem alerts for ‘%s’.'), pretty_pc ) %] [% END %] [% loc('Select which type of alert you\'d like and click the button for an RSS feed, or enter your email address to subscribe to an email alert') %] </p> diff --git a/templates/web/default/footer.html b/templates/web/default/footer.html index 71aaba365..19af59198 100644 --- a/templates/web/default/footer.html +++ b/templates/web/default/footer.html @@ -3,11 +3,11 @@ <h2 class="v">[% loc('Navigation') %]</h2> <ul id="navigation"> -<li><a href="/report/new" >[% loc("Report a problem") %]</a></li> -<li><a href="/reports" >[% loc("All reports") %]</a></li> +<li><a href="/">[% loc("Report a problem") %]</a></li> +<li><a href="/reports">[% loc("All reports") %]</a></li> <li><a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]">[% loc("Local alerts") %]</a></li> -<li><a href="/faq" >[% loc("Help") %]</a></li> -<li><a href="/contact" >[% loc("Contact") %]</a></li> +<li><a href="/faq">[% loc("Help") %]</a></li> +<li><a href="/contact">[% loc("Contact") %]</a></li> </ul> [% loc('<a href="http://www.mysociety.org/"><img id="logo" width="133" height="26" src="/i/mysociety-dark.png" alt="View mySociety.org"><span id="logoie"></span></a>') %] |