diff options
-rw-r--r-- | conf/httpd.conf | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Fun.pm | 33 | ||||
-rwxr-xr-x | templates/web/default/fun.html | 35 | ||||
-rwxr-xr-x | web/fun.cgi | 56 |
4 files changed, 69 insertions, 57 deletions
diff --git a/conf/httpd.conf b/conf/httpd.conf index 4f96593af..deb0dabae 100644 --- a/conf/httpd.conf +++ b/conf/httpd.conf @@ -108,7 +108,7 @@ RewriteRule /(.+) /$1 [L] # RewriteRule ^/confirm(.*) /confirm.cgi$1 [L] # RewriteRule ^/contact(.*) /contact.cgi$1 [L] RewriteRule ^/flickr(.*) /flickr.cgi$1 [L] -RewriteRule ^/fun(.*) /fun.cgi$1 [L] +# RewriteRule ^/fun(.*) /fun.cgi$1 [L] # RewriteRule ^/json(.*) /json.cgi$1 [L] # RewriteRule ^/photo(.*) /photo.cgi$1 [L] # RewriteRule ^/questionnaire(.*) /questionnaire.cgi$1 [L] diff --git a/perllib/FixMyStreet/App/Controller/Fun.pm b/perllib/FixMyStreet/App/Controller/Fun.pm new file mode 100644 index 000000000..e5d8f9652 --- /dev/null +++ b/perllib/FixMyStreet/App/Controller/Fun.pm @@ -0,0 +1,33 @@ +package FixMyStreet::App::Controller::Fun; +use Moose; +use namespace::autoclean; + +BEGIN { extends 'Catalyst::Controller'; } + +=head1 NAME + +FixMyStreet::App::Controller::Fun - Catalyst Controller + +=head1 DESCRIPTION + +Catalyst Controller. + +=head1 METHODS + +=cut + +=head2 fun + +Show the 'fun' page. + +=cut + +sub index : Path : Args(0) { + my ( $self, $c ) = @_; + $c->stash->{template} = 'fun.html'; +} + +__PACKAGE__->meta->make_immutable; + +1; + diff --git a/templates/web/default/fun.html b/templates/web/default/fun.html new file mode 100755 index 000000000..abe9d4028 --- /dev/null +++ b/templates/web/default/fun.html @@ -0,0 +1,35 @@ +[% INCLUDE header.html + title = 'Weird and Wonderful reports' +%] + +<h1>Weird and Wonderful reports</h1> + +<p>Here are some of the best or strangest reports we’ve seen on FixMyStreet. +They’ve all been fixed, and in one case could have saved lives! +Do let us know if you find any more.</p> + +<ul style='list-style-type: none; margin:0; padding:0'> + +<li><img src='http://www.fixmystreet.com/photo?id=9468' align='right' hspace=8> + <h2>Dumped Piano (right)</h2> + <p>The reporter of this problem summed it up with their report, + which consisted solely of the one character “!”. — + <a href='http://www.fixmystreet.com/report/9468'>Problem report</a> + +<li><h2>Mad Seagull</h2> + <p>“A seagull is attacking various cars within this road. He starts at around 05:45 every morning and continues until around 19:30. This causes a lot of noisy banging and wakes up children.” — + <a href='http://www.fixmystreet.com/report/2722'>Problem report</a> + +<li><img src='http://www.fixmystreet.com/photo?id=6553' align='right' hspace=8> + <h2>Boxes full of cheese dumped (right)</h2> + <p>“About a dozen boxes full of mozzarella cheese have been dumped opposite 3 rufford street. if it warms up we could have nasty road topping problem (seriously there is a lot of cheese)” — + <a href='http://www.fixmystreet.com/report/6553'>Problem report</a> + +<li><h2>Dangerous Nivea Billboard</h2> + <p>“The Nivea 'Oxygen is a wonderful thing' billboard here has a device on it releasing bubbles and foam. This is blowing into the road which is both distracting and dangerous to drivers. A large ball of foam hit my windscreen unexpectedly and nearly caused me to have an accident” — + <a href='http://www.fixmystreet.com/report/7552'>Problem report</a> + +</ul> + +[% INCLUDE footer.html %] + diff --git a/web/fun.cgi b/web/fun.cgi deleted file mode 100755 index d93658dff..000000000 --- a/web/fun.cgi +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/perl -w -I../perllib - -# fun.cgi: -# Weird and Wonderful -# -# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. -# Email: matthew@mysociety.org. WWW: http://www.mysociety.org -# -# $Id: fun.cgi,v 1.3 2008-09-19 10:24:55 matthew Exp $ - -use strict; -use Standard -db; - -# Main code for index.cgi -sub main { - my $q = shift; - print Page::header($q, title=>_('Weird and Wonderful reports')); - print fun($q); - print Page::footer($q); -} -Page::do_fastcgi(\&main); - -sub fun { - my $q = shift; - my $out = $q->h1(_('Weird and Wonderful reports')); - $out .= $q->p('Here are some of the best or strangest reports we’ve seen on FixMyStreet. -They’ve all been fixed, and in one case could have saved lives! -Do let us know if you find any more.'); - $out .= $q->ul({style => 'list-style-type: none; margin:0; padding:0'}, - $q->li( - $q->img({src=>'http://www.fixmystreet.com/photo?id=9468', align=>'right', hspace=>8}), - $q->h2('Dumped Piano (right)'), - $q->p('The reporter of this problem summed it up with their report, -which consisted solely of the one character “!”. —', -$q->a({href=>'http://www.fixmystreet.com/report/9468'}, 'Problem report')), - ), - $q->li( - $q->h2('Mad Seagull'), - $q->p('“A seagull is attacking various cars within this road. He starts at around 05:45 every morning and continues until around 19:30. This causes a lot of noisy banging and wakes up children.” —', -$q->a({href=>'http://www.fixmystreet.com/report/2722'}, 'Problem report')), - ), - $q->li( - $q->img({src=>'http://www.fixmystreet.com/photo?id=6553', align=>'right', hspace=>8}), - $q->h2('Boxes full of cheese dumped (right)'), - $q->p('“About a dozen boxes full of mozzarella cheese have been dumped opposite 3 rufford street. if it warms up we could have nasty road topping problem (seriously there is a lot of cheese)” —', -$q->a({href=>'http://www.fixmystreet.com/report/6553'}, 'Problem report')), - ), - $q->li( - $q->h2('Dangerous Nivea Billboard'), - $q->p('“The Nivea \'Oxygen is a wonderful thing\' billboard here has a device on it releasing bubbles and foam. This is blowing into the road which is both distracting and dangerous to drivers. A large ball of foam hit my windscreen unexpectedly and nearly caused me to have an accident” —', -$q->a({href=>'http://www.fixmystreet.com/report/7552'}, 'Problem report')), - ), - ); - return $out; -} - |