aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-02 10:27:15 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-02 10:27:15 +0100
commit60da5d1d852f3cf06b04110a17ba8c0e62d62c2b (patch)
tree596eec69401942a162e6d09eb0c1e1ee48e04402
parent41b86381605f1cf4451e51b80b42a8a2e6046687 (diff)
Bring static pages together in Static.pm, and add posters static page.
-rw-r--r--perllib/FixMyStreet/App/Controller/About.pm33
-rw-r--r--perllib/FixMyStreet/App/Controller/Fun.pm33
-rwxr-xr-x[-rw-r--r--]perllib/FixMyStreet/App/Controller/Static.pm (renamed from perllib/FixMyStreet/App/Controller/FAQ.pm)27
-rw-r--r--templates/web/default/static/about.html (renamed from templates/web/default/about/about.html)0
-rw-r--r--[-rwxr-xr-x]templates/web/default/static/fun.html (renamed from templates/web/default/fun.html)0
-rw-r--r--templates/web/default/static/posters.html43
-rw-r--r--templates/web/emptyhomes/static/about.html (renamed from templates/web/emptyhomes/about/about.html)0
-rwxr-xr-xweb/posters/index.cgi64
8 files changed, 65 insertions, 135 deletions
diff --git a/perllib/FixMyStreet/App/Controller/About.pm b/perllib/FixMyStreet/App/Controller/About.pm
deleted file mode 100644
index b444e02bb..000000000
--- a/perllib/FixMyStreet/App/Controller/About.pm
+++ /dev/null
@@ -1,33 +0,0 @@
-package FixMyStreet::App::Controller::About;
-use Moose;
-use namespace::autoclean;
-
-BEGIN { extends 'Catalyst::Controller'; }
-
-=head1 NAME
-
-FixMyStreet::App::Controller::About - Catalyst Controller
-
-=head1 DESCRIPTION
-
-Catalyst Controller.
-
-=head1 METHODS
-
-=cut
-
-=head2 about
-
-Show the 'about us' page.
-
-=cut
-
-sub about : Path : Args(0) {
- my ( $self, $c ) = @_;
-
- # don't need to do anything here - should just pass through.
-}
-
-__PACKAGE__->meta->make_immutable;
-
-1;
diff --git a/perllib/FixMyStreet/App/Controller/Fun.pm b/perllib/FixMyStreet/App/Controller/Fun.pm
deleted file mode 100644
index e5d8f9652..000000000
--- a/perllib/FixMyStreet/App/Controller/Fun.pm
+++ /dev/null
@@ -1,33 +0,0 @@
-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/perllib/FixMyStreet/App/Controller/FAQ.pm b/perllib/FixMyStreet/App/Controller/Static.pm
index 6b8fb1191..b58b55852 100644..100755
--- a/perllib/FixMyStreet/App/Controller/FAQ.pm
+++ b/perllib/FixMyStreet/App/Controller/Static.pm
@@ -1,4 +1,4 @@
-package FixMyStreet::App::Controller::FAQ;
+package FixMyStreet::App::Controller::Static;
use Moose;
use namespace::autoclean;
@@ -6,16 +6,23 @@ BEGIN { extends 'Catalyst::Controller'; }
=head1 NAME
-FixMyStreet::App::Controller::FAQ - Catalyst Controller
+FixMyStreet::App::Controller::Static - Catalyst Controller
=head1 DESCRIPTION
-Show the FAQ page - does some smarts to choose the correct template depending on
-language.
+Static pages Catalyst Controller. FAQ does some smarts to choose the correct
+template depending on language, will need extending at some point.
+
+=head1 METHODS
=cut
-sub faq : Path : Args(0) {
+sub about : Global : Args(0) {
+ my ( $self, $c ) = @_;
+ # don't need to do anything here - should just pass through.
+}
+
+sub faq : Global : Args(0) {
my ( $self, $c ) = @_;
# There should be a faq template for each language in a cobrand or default.
@@ -30,6 +37,16 @@ sub faq : Path : Args(0) {
$c->stash->{template} = $template;
}
+sub fun : Global : Args(0) {
+ my ( $self, $c ) = @_;
+ # don't need to do anything here - should just pass through.
+}
+
+sub posters : Global : Args(0) {
+ my ( $self, $c ) = @_;
+}
+
__PACKAGE__->meta->make_immutable;
1;
+
diff --git a/templates/web/default/about/about.html b/templates/web/default/static/about.html
index 7219f6320..7219f6320 100644
--- a/templates/web/default/about/about.html
+++ b/templates/web/default/static/about.html
diff --git a/templates/web/default/fun.html b/templates/web/default/static/fun.html
index abe9d4028..abe9d4028 100755..100644
--- a/templates/web/default/fun.html
+++ b/templates/web/default/static/fun.html
diff --git a/templates/web/default/static/posters.html b/templates/web/default/static/posters.html
new file mode 100644
index 000000000..77abbb5fc
--- /dev/null
+++ b/templates/web/default/static/posters.html
@@ -0,0 +1,43 @@
+[% INCLUDE header.html
+ title = 'Publicity material'
+%]
+
+[%
+ badge = '<a href="http://www.fixmystreet.com/"> <img align="left" hspace="5" src="http://www.fixmystreet.com/i/fms-badge.jpeg" alt="FixMyStreet - report, view or discuss local problems" border="0"></a>'
+%]
+
+<h1>Publicity Material</h1>
+
+<div style='float:left; width:50%'>
+ <p>Copy and paste the text below to add this badge to your site:</p>
+ [% badge %]
+ <textarea onclick="this.select()" cols=37 rows=5>[% badge | html %]</textarea>
+ <p><small>(thanks to Lincolnshire Council for the image)</small></p>
+</div>
+
+<div style='float:right; width:47%'>
+ <p>Here are some posters and flyers you can use to publicise FixMyStreet:</p>
+ <img hspace="5" src="/posters/poster.png" alt='Example poster'>
+ <h2>Posters</h2>
+ <ul>
+ <li><a href='/posters/fixmystreet-poster-a4.pdf'>A4, colour</a>
+ <li><a href='/posters/fixmystreet-poster-a4-bw.pdf'>A4, black and white</a>
+ <li><a href='/posters/fixmystreet-poster-a4-bw-low-ink.pdf'>A4, black and white, low ink</a>
+ <li><a href='/posters/fixmystreet-poster-a4-bw-outlined.pdf'>A4, black and white, outlined</a>
+ </ul>
+ <h2>Posters with tags</h2>
+ <ul>
+ <li><a href='/posters/fixmystreet-poster-tags.pdf'>A4, colour</a>
+ <li><a href='/posters/fixmystreet-poster-tags-bw.pdf'>A4, black and white</a>
+ <li><a href='/posters/fixmystreet-poster-tags-bw-low-ink.pdf'>A4, black and white, low ink</a>
+ <li><a href='/posters/fixmystreet-poster-tags-only.pdf'>A4, tags only</a>
+ </ul>
+ <h2>Flyers</h2>
+ <ul>
+ <li><a href='/posters/fixmystreet-flyers-colour.pdf'>4 x A6, colour</a>
+ <li><a href='/posters/fixmystreet-flyers-bw-outlined.pdf'>4 x A6, black and white, outlined</a>
+ <li><a href='/posters/fixmystreet-flyers-bw-low-ink.pdf'>4 x A6, black and white, low ink</a>
+ </ul>
+</div>
+
+[% INCLUDE footer.html %]
diff --git a/templates/web/emptyhomes/about/about.html b/templates/web/emptyhomes/static/about.html
index 880f69b98..880f69b98 100644
--- a/templates/web/emptyhomes/about/about.html
+++ b/templates/web/emptyhomes/static/about.html
diff --git a/web/posters/index.cgi b/web/posters/index.cgi
deleted file mode 100755
index f26252131..000000000
--- a/web/posters/index.cgi
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/perl -w -I../../perllib -I../../commonlib/perllib
-
-# posters/index.cgi:
-# List of publicity stuff on FixMyStreet
-#
-# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
-# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
-#
-# $Id: index.cgi,v 1.10 2008-10-17 20:19:05 matthew Exp $
-
-use strict;
-use Standard -db;
-use mySociety::Config;
-use mySociety::Web qw(ent);
-
-# XXX: Ugh, as we're in a subdirectory
-BEGIN {
- mySociety::Config::set_file("$FindBin::Bin/../../conf/general");
-}
-
-sub main {
- my $q = shift;
- print Page::header($q, title=>_('Publicity material'));
- print body($q);
- print Page::footer($q);
-}
-Page::do_fastcgi(\&main);
-
-sub body {
- my $q = shift;
- my $badge = '<a href="http://www.fixmystreet.com/"> <img align="left" hspace="5" src="http://www.fixmystreet.com/i/fms-badge.jpeg" alt="FixMyStreet - report, view or discuss local problems" border="0"></a>';
- return $q->h1(_('Publicity Material')) .
- $q->div({style=>'float:left; width:50%'},
- '<p>Copy and paste the text below to add this badge to your site:</p>', $badge,
- '<textarea onclick="this.select()" cols=37 rows=5>' . ent($badge) . '</textarea>',
- '<p><small>(thanks to Lincolnshire Council for the image)</small></p>'
- ) .
- $q->div({style=>'float:right; width:47%'},
- $q->p(_('Here are some posters and flyers you can use to publicise FixMyStreet:')) .
- '<img hspace="5" src="poster.png" alt="Example poster">' .
- $q->h2(_('Posters')) .
- $q->ul(
- $q->li($q->a({href=>'fixmystreet-poster-a4.pdf'}, _('A4, colour'))),
- $q->li($q->a({href=>'fixmystreet-poster-a4-bw.pdf'}, _('A4, black and white'))),
- $q->li($q->a({href=>'fixmystreet-poster-a4-bw-low-ink.pdf'}, _('A4, black and white, low ink'))),
- $q->li($q->a({href=>'fixmystreet-poster-a4-bw-outlined.pdf'}, _('A4, black and white, outlined'))),
- ) .
- $q->h2(_('Posters with tags')) .
- $q->ul(
- $q->li($q->a({href=>'fixmystreet-poster-tags.pdf'}, _('A4, colour'))) .
- $q->li($q->a({href=>'fixmystreet-poster-tags-bw.pdf'}, _('A4, black and white'))) .
- $q->li($q->a({href=>'fixmystreet-poster-tags-bw-low-ink.pdf'}, _('A4, black and white, low ink'))) .
- $q->li($q->a({href=>'fixmystreet-poster-tags-only.pdf'}, _('A4, tags only')))
- ) .
- $q->h2(_('Flyers')) .
- $q->ul(
- $q->li($q->a({href=>'fixmystreet-flyers-colour.pdf'}, _('4 x A6, colour'))),
- $q->li($q->a({href=>'fixmystreet-flyers-bw-outlined.pdf'}, _('4 x A6, black and white, outlined'))),
- $q->li($q->a({href=>'fixmystreet-flyers-bw-low-ink.pdf'}, _('4 x A6, black and white, low ink')))
- )
- )
- ;
-}
-