diff options
-rwxr-xr-x | bin/make_emptyhomes_po | 5 | ||||
-rw-r--r-- | perllib/Page.pm | 8 | ||||
-rw-r--r-- | templates/website/emptyhomes-header | 5 | ||||
-rw-r--r-- | templates/website/scambs-header | 3 | ||||
-rwxr-xr-x | web/contact.cgi | 4 | ||||
-rw-r--r-- | web/css/core.css | 2 | ||||
-rw-r--r-- | web/css/emptyhomes.css | 17 | ||||
-rwxr-xr-x | web/index.cgi | 60 |
8 files changed, 66 insertions, 38 deletions
diff --git a/bin/make_emptyhomes_po b/bin/make_emptyhomes_po index 69e8c625b..56f61cb84 100755 --- a/bin/make_emptyhomes_po +++ b/bin/make_emptyhomes_po @@ -63,8 +63,11 @@ while(<MAINPO>) { $buffer =~ s/\bproblems\b/empty properties/g; $buffer =~ s/\bProblems\b/Empty properties/g; $buffer =~ s/a empty/an empty/g; + $buffer =~ s/fixed/put back into use/g; - $buffer =~ s/^\(like graffiti.*/ /; + $buffer =~ s/Recently put back into use empty properties/Recent empty properties put back into use/; + + $buffer =~ s/\(like graffiti.*\)/ /; print NEWPO $buffer; $buffer = ""; diff --git a/perllib/Page.pm b/perllib/Page.pm index 10ce9fd91..ae5ac0164 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: Page.pm,v 1.98 2008-05-14 11:18:35 matthew Exp $ +# $Id: Page.pm,v 1.99 2008-05-14 14:24:11 matthew Exp $ # package Page; @@ -416,9 +416,9 @@ sub send_email { From => [ $sender, _('FixMyStreet')], To => $to, }, $email); - my $out; + my $action = ($thing eq 'alert') ? 'confirmed' : 'posted'; - $out = <<EOF; + my $out = <<EOF; <h1>Nearly Done! Now check your email...</h1> <p>The confirmation email <strong>may</strong> take a few minutes to arrive — <em>please</em> be patient.</p> <p>If you use web-based email or have 'junk mail' filters, you may wish to check your bulk/spam mail folders: sometimes, our messages are marked that way.</p> @@ -495,7 +495,7 @@ sub display_problem_text { $out .= $q->br() . $q->small('Sent to ' . $council . ' ' . prettify_duration($problem->{whensent}, 'minute') . ' later'); } - } else { + } elsif ($q->{site} ne 'emptyhomes') { $out .= $q->br() . $q->small('Not reported to council'); } $out .= '</em></p> <p>'; diff --git a/templates/website/emptyhomes-header b/templates/website/emptyhomes-header index d2bc3dd57..f50b75c8f 100644 --- a/templates/website/emptyhomes-header +++ b/templates/website/emptyhomes-header @@ -10,6 +10,9 @@ @import "/css/core.css"; @import "/css/emptyhomes.css"; </style> +<!--[if LT IE 7]> +<style type="text/css">@import url("/css/ie6.css");</style> +<![endif]--> <!-- RSS --> </head> <body> @@ -54,6 +57,7 @@ www.emptyhomes.com</small></p> <li><a href="http://www.emptyhomes.com/resources/papers_publications/publications.html">Papers & Publications </a></li> </ul> +<!-- <div id="toptitle">See Also</div> <div id="topbox"> <ul> @@ -66,6 +70,7 @@ www.emptyhomes.com</small></p> <li><a href="http://www.emptyhomes.com/resources/useful_contacts.html">Useful Contacts</a></li> </ul> </div> +--> </div> diff --git a/templates/website/scambs-header b/templates/website/scambs-header index 3a6845afe..4b4c0a6c2 100644 --- a/templates/website/scambs-header +++ b/templates/website/scambs-header @@ -10,6 +10,9 @@ @import "/css/main-scambs.css"; @import "/css/scambs.css"; </style> +<!--[if LT IE 7]> +<style type="text/css">@import url("/css/ie6.css");</style> +<![endif]--> <link rel="stylesheet" type="text/css" href="http://www.scambs.gov.uk/system/css/print.css" media="print"> <script type="text/javascript" src="http://www.scambs.gov.uk/system/js/external.js"></script> <!-- RSS --> diff --git a/web/contact.cgi b/web/contact.cgi index 5c217c7e7..60ef48474 100755 --- a/web/contact.cgi +++ b/web/contact.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: contact.cgi,v 1.28 2008-05-13 16:00:14 matthew Exp $ +# $Id: contact.cgi,v 1.29 2008-05-14 14:24:12 matthew Exp $ use strict; use Standard; @@ -131,7 +131,7 @@ please <a href="/">go to the front page</a> and follow the instructions.')); <div><label for="form_subject">$label_subject</label> <input type="text" name="subject" id="form_subject" value="$input_h{subject}" size="30"></div> <div><label for="form_message">$label_message</label> -<textarea name="message" id="form_message" rows="7" cols="60">$input_h{message}</textarea></div> +<textarea name="message" id="form_message" rows="7" cols="50">$input_h{message}</textarea></div> <div class="checkbox"><input type="submit" value="$label_submit"></div> </fieldset> </form> diff --git a/web/css/core.css b/web/css/core.css index 0990c235b..ad600023a 100644 --- a/web/css/core.css +++ b/web/css/core.css @@ -138,7 +138,7 @@ ul#error { /* Forms */ -#fieldset div { +fieldset div, #fieldset div { margin-top: 2px; clear: left; } diff --git a/web/css/emptyhomes.css b/web/css/emptyhomes.css index fe2304a71..b95f400e3 100644 --- a/web/css/emptyhomes.css +++ b/web/css/emptyhomes.css @@ -1,7 +1,3 @@ -label { - width: 3em; -} - #alert_links { float: none; } @@ -18,12 +14,12 @@ label { margin-top: 0.5em; } #middle { - width: 620px; + width: 600px; } #middle p { - width: 620px; + width: auto; } -#middle p#copyright { +#middle h1 { width: auto; } p#fixed, p#unknown { @@ -68,9 +64,16 @@ blockquote { background-color: #80AE7D; color: #000000; } +#postcodeForm { + _width: 500px; +} + #front_stats div { padding: 0.5em 0; width: 6em; } +#update_form, #problem_form { + clear: both; +} diff --git a/web/index.cgi b/web/index.cgi index 7596a9763..a0974ffbd 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: index.cgi,v 1.193 2008-05-13 16:00:14 matthew Exp $ +# $Id: index.cgi,v 1.194 2008-05-14 14:24:12 matthew Exp $ use strict; use Standard; @@ -74,8 +74,10 @@ Page::do_fastcgi(\&main); sub front_page { my ($q, $error) = @_; my $pc_h = ent($q->param('pc') || ''); - my $out = '<p id="expl"><strong>' . _('Report, view, or discuss local problems') . '</strong> -<br><small>' . _('(like graffiti, fly tipping, broken paving slabs, or street lighting)') . '</small></p>'; + my $out = '<p id="expl"><strong>' . _('Report, view, or discuss local problems') . '</strong>'; + my $subhead = _('(like graffiti, fly tipping, broken paving slabs, or street lighting)'); + $out .= '<br><small>' . $subhead . '</small>' if $subhead ne ' '; + $out .= '</p>'; $out .= '<p id="error">' . $error . '</p>' if ($error); my $fixed = dbh()->selectrow_array("select count(*) from problem where state='fixed' and lastupdate>ms_current_timestamp()-'1 month'::interval"); my $updates = dbh()->selectrow_array("select count(*) from comment where state='confirmed'"); @@ -116,20 +118,19 @@ EOF $out .= $q->h2(_('How to report a problem')); $out .= $q->ol( $q->li(_('Enter a nearby UK postcode, or street name and area')), - $q->li(_('Locate the problem on a map of the area')), - $q->li(_('Enter details of the problem')), - $q->li(_('We send it to the council on your behalf')) + $q->li(_('Locate the problem on a map of the area')), + $q->li(_('Enter details of the problem')), + $q->li(_('We send it to the council on your behalf')) ); $out .= $q->h2(_('FixMyStreet updates')); - $out .= <<EOF; - -<div id="front_stats"> -<div><big>$new</big> reports $new_text</div> -<div><big>$fixed</big> fixed in past month</div> -<div><big>$updates</big> updates on reports</div> -</div> + $out .= $q->div({-id => 'front_stats'}, + $q->div("<big>$new</big> reports $new_text"), + ($q->{site} ne 'emptyhomes' && $q->div("<big>$fixed</big> fixed in past month")), + $q->div("<big>$updates</big> updates on reports"), + ); + $out .= <<EOF; </div> <div id="front_recent"> @@ -350,7 +351,8 @@ sub submit_problem { $h{url} = mySociety::Config::get('BASE_URL') . '/P/' . mySociety::AuthToken::store('problem', $id); dbh()->commit(); - $out = Page::send_email($input{email}, $input{name}, 'problem', %h); + $out = Page::send_email($input{email}, $input{name}, _('problem'), %h); + } return $out; } @@ -403,10 +405,10 @@ sub display_form { $py = Page::os_to_px($northing, $input{y}, 1); } else { # Normal form submission - my ($x, $y, $tile_x, $tile_y); - ($x, $y, $tile_x, $tile_y, $px, $py) = Page::os_to_px_with_adjust($q, $input{easting}, $input{northing}, undef, undef); - $input{x} = $tile_x; - $input{y} = $tile_y; + my ($x, $y, $tile_x, $tile_y); + ($x, $y, $tile_x, $tile_y, $px, $py) = Page::os_to_px_with_adjust($q, $input{easting}, $input{northing}, undef, undef); + $input{x} = $tile_x; + $input{y} = $tile_y; $easting = $input_h{easting}; $northing = $input_h{northing}; } @@ -521,6 +523,13 @@ and describe the location as precisely as possible in the details box.')); to help unless you leave as much detail as you can, so please describe the exact location of the problem (e.g. on a wall), what it is, how long it has been there, a description (and a photo of the problem if you have one), etc.'; + } elsif ($q->{site} eq 'emptyhomes') { + $out .= <<EOF; +<p>Please fill in details of the empty property below, giving the state of the +property, what type of property is and any other information you feel is relevant. +Please be polite, concise and to the point; writing your message entirely in +block capitals makes it hard to read, as does a lack of punctuation.</p> +EOF } else { $out .= $q->p(_('Please fill in details of the problem below.')); } @@ -532,17 +541,19 @@ photo of the problem if you have one), etc.'; $out .= '<ul id="error"><li>' . join('</li><li>', @errors) . '</li></ul>'; } my $anon = ($input{anonymous}) ? ' checked' : ($input{title} ? '' : ' checked'); + $out .= '<div id="problem_form">'; + $out .= $q->h2('Empty property details form') if $q->{site} eq 'emptyhomes'; $out .= <<EOF; <div id="fieldset"> $category EOF - $out .= <<EOF unless $q->{site} eq 'emptyhomes'; # No Subject + $out .= <<EOF; <div><label for="form_title">Subject:</label> <input type="text" value="$input_h{title}" name="title" id="form_title" size="30"></div> EOF $out .= <<EOF; <div><label for="form_detail">Details:</label> -<textarea name="detail" id="form_detail" rows="7" cols="15">$input_h{detail}</textarea></div> +<textarea name="detail" id="form_detail" rows="7" cols="26">$input_h{detail}</textarea></div> EOF if (my $token = $input{flickr}) { my $id = mySociety::AuthToken::retrieve('flickr', $token); @@ -592,6 +603,7 @@ EOF $out .= <<EOF; <p align="right"><input type="submit" name="submit_problem" value="Submit"></p> </div> +</div> EOF $out .= Page::display_map_end(1); my %params = ( @@ -639,7 +651,7 @@ or are using a text only browser, for example – and you wish to report a problem, please <a href='%s'>skip this step</a> and we will ask you to describe the location of the problem instead.</small>"), $skipurl)); - $out .= '<div' . $q->h2(_('Recent problems reported near here')); + $out .= '<div>' . $q->h2(_('Recent problems reported near here')); my $list = ''; foreach (@$current_map) { $list .= '<li><a href="' . NewURL($q, id=>$_->{id}, x=>undef, y=>undef) . '">'; @@ -721,11 +733,11 @@ sub display_problem { my $pins = Page::display_pin($q, $px, $py, 'blue'); $out .= Page::display_map($q, x => $x_tile, y => $y_tile, type => 0, pins => $pins, px => $px, py => $py ); - if ($problem->{state} eq 'confirmed' && $problem->{duration} > 8*7*24*60*60) { + if ($q->{site} ne 'emptyhomes' && $problem->{state} eq 'confirmed' && $problem->{duration} > 8*7*24*60*60) { $out .= $q->p({id => 'unknown'}, _('This problem is old and of unknown status.')) } if ($problem->{state} eq 'fixed') { - $out .= $q->p({id => 'fixed'}, _('This problem has been fixed.')) + $out .= $q->p({id => 'fixed'}, _('This problem has been fixed') . '.') } $out .= Page::display_problem_text($q, $problem); @@ -755,6 +767,7 @@ EOF $out .= '</div>'; $out .= Page::display_problem_updates($input{id}); + $out .= '<div id="update_form">'; $out .= $q->h2(_('Provide an update')); $out .= $q->p($q->small(_('Please note that updates are not sent to the council.'))) unless $q->{site} eq 'emptyhomes'; # No council blurb @@ -790,6 +803,7 @@ $fixedline </div> <div class="checkbox"><input type="submit" id="update_post" value="Post"></div> </form> +</div> EOF $out .= Page::display_map_end(0); my $js = <<EOF; |