aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/httpd.conf2
-rw-r--r--perllib/FixMyStreet/App/Controller/Fun.pm33
-rwxr-xr-xtemplates/web/default/fun.html35
-rwxr-xr-xweb/fun.cgi56
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&rsquo;ve seen on FixMyStreet.
+They&rsquo;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 &ldquo;!&rdquo;. &mdash;
+ <a href='http://www.fixmystreet.com/report/9468'>Problem report</a>
+
+<li><h2>Mad Seagull</h2>
+ <p>&ldquo;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.&rdquo; &mdash;
+ <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>&ldquo;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)&rdquo; &mdash;
+ <a href='http://www.fixmystreet.com/report/6553'>Problem report</a>
+
+<li><h2>Dangerous Nivea Billboard</h2>
+ <p>&ldquo;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&rdquo; &mdash;
+ <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&rsquo;ve seen on FixMyStreet.
-They&rsquo;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 &ldquo;!&rdquo;. &mdash;',
-$q->a({href=>'http://www.fixmystreet.com/report/9468'}, 'Problem report')),
- ),
- $q->li(
- $q->h2('Mad Seagull'),
- $q->p('&ldquo;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.&rdquo; &mdash;',
-$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('&ldquo;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)&rdquo; &mdash;',
-$q->a({href=>'http://www.fixmystreet.com/report/6553'}, 'Problem report')),
- ),
- $q->li(
- $q->h2('Dangerous Nivea Billboard'),
- $q->p('&ldquo;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&rdquo; &mdash;',
-$q->a({href=>'http://www.fixmystreet.com/report/7552'}, 'Problem report')),
- ),
- );
- return $out;
-}
-