diff options
245 files changed, 319 insertions, 8843 deletions
diff --git a/.travis.yml b/.travis.yml index 6a2085785..37460292c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,8 +27,6 @@ before_install: install: - .travis/install before_script: - - ./bin/make_po FixMyStreet-EmptyHomes - - ./bin/emptyhomes/make_welsh_po - commonlib/bin/gettext-makemo FixMyStreet script: "bin/run-tests t" after_success: diff --git a/bin/emptyhomes/canonicalise-eha b/bin/emptyhomes/canonicalise-eha deleted file mode 100755 index 1030982fa..000000000 --- a/bin/emptyhomes/canonicalise-eha +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/perl -w - -# canonicalise-eha: -# Convert provided TSV file into one with standard names for MaPit -# -# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. -# Email: matthew@mysociety.org. WWW: http://www.mysociety.org -# -# $Id: canonicalise-eha,v 1.1 2009-05-27 11:11:18 matthew Exp $ - -use strict; -require 5.8.0; - -# Horrible boilerplate to set up appropriate library paths. -use FindBin; -use lib "$FindBin::Bin/../perllib"; -use lib "$FindBin::Bin/../commonlib/perllib"; - -use mySociety::Config; -use mySociety::MaPit; -use mySociety::VotingArea; - -BEGIN { - mySociety::Config::set_file("$FindBin::Bin/../conf/general"); - mySociety::MaPit::configure(); -} - -my %councils; -open(FP, "$FindBin::Bin/../data/eha_listN"); -while (<FP>) { - s/\r?\n//g; - my ($name, $email) = split /\s*\t+\s*/; - $email ||= ''; - #$name = 'Blackburn' if $name eq 'Blackburn with Darwen'; - $name =~ s/^St /St. /; - $name =~ s/-(upon|on|le)-/ $1 /; - $name =~ s/^LB //; - $name =~ s/ BC| DC| MDC| MBC| (Metropolitan|Borough|District|County|City) Council| Council//; - print "Already have $name\n" if $councils{$name}; - $councils{$name} = $email; -} -close(FP); - -my @types = grep { $_ !~ /CTY|LGD/ } @$mySociety::VotingArea::council_parent_types; -my (%out); -foreach my $type (@types) { - my $areas = mySociety::MaPit::get_areas_by_type($type); - my $areas_info = mySociety::MaPit::get_voting_areas_info($areas); - foreach my $id (keys %$areas_info) { - my $area_info = $areas_info->{$id}; - next if $area_info->{country} eq 'S'; - my $name = $area_info->{name}; - if ($name eq 'Durham City Council') { - $out{$id} = $councils{'Durham City'}; - delete $councils{'Durham City'}; - next; - #} elsif ($name eq 'Durham County Council') { - # $out{$id} = $councils{'Durham County'}; - # next; - } - $name =~ s/( (Borough|City|District|County))* Council//; - if ($councils{$name} && $councils{$name} =~ /@/) { - $out{$id} = $councils{$name}; - delete $councils{$name}; - } else { - print "Problem: $name $area_info->{country}\n"; - } - } -} - -foreach (sort keys %councils) { - print "Not matched: $_ $councils{$_}\n"; -} - -# Output emails to canonical CSV -open(FP, ">$FindBin::Bin/../data/eha.csv"); -foreach (sort keys %out) { - print FP "$_," . $out{$_} . "\n"; -} -close FP; diff --git a/bin/emptyhomes/make_welsh_po b/bin/emptyhomes/make_welsh_po deleted file mode 100755 index 568ccdcde..000000000 --- a/bin/emptyhomes/make_welsh_po +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; - -# Given a translation of the Empty Homes version of the FixMyStreet .po file, -# fix it all up to go direct from FixMyStreet -> EH translation. - -use POSIX; -use FindBin; -use lib "$FindBin::Bin/../../perllib"; -use PoChange; - -chdir("$FindBin::Bin/../../locale"); - -# First read in translation and match up. -open(INPO, 'cy_GB.UTF-8/LC_MESSAGES/EmptyHomes.po') or die $!; - -my $state = 'start'; -my $msgid = ''; -my $fuzzy = 0; -my $msgstr; -my %lookup; -while (<INPO>) { - if (m/^#, fuzzy/) { - $fuzzy = 1; - } elsif (m/^#/) { - # comment or blank line - } elsif (m/^\s+$/) { - # blank line separates translations - $msgid =~ s/"\n"//g; - $lookup{$msgid} = [ $msgstr, $fuzzy ]; - $state = 'msgid'; - $msgid = ""; - $fuzzy = 0; - } elsif ($state eq 'msgid' && (m/^msgstr "/ || m/^msgstr\[0\] "/)) { - $msgstr = $_; - $state = 'msgstr'; - } elsif ($state eq 'msgstr') { - $msgstr .= $_; - } elsif ($state eq 'msgid') { - $msgid .= $_; - } -} -$lookup{$msgid} = [ $msgstr, $fuzzy ]; -close INPO; - -mkdir("en_GB.UTF-8"); -mkdir("en_GB.UTF-8/LC_MESSAGES"); -mkdir("cy_GB.UTF-8"); -mkdir("cy_GB.UTF-8/LC_MESSAGES"); - -open(MAINPO, 'FixMyStreet.po') or die; -open(OUTPO, ">cy_GB.UTF-8/LC_MESSAGES/FixMyStreet-EmptyHomes.po") or die; - -print OUTPO "# AUTOMATICALLY GENERATED by make_welsh_po, do not edit\n\n"; - -my $buffer = ""; -my $start = 0; -while(<MAINPO>) { - if (!$start) { - s/#, fuzzy/#/; - } - if (m/"Last-Translator: FULL NAME/) { - $_ = '"Last-Translator: mysociety/bin/emptyhomes/make_welsh_po\\n"'."\n"; - } - if (m/"PO-Revision-Date: YEAR-MO-DA/) { - my $time = POSIX::strftime("%Y-%m-%d %H:%M%z", localtime(time())); - $_ = '"PO-Revision-Date: '.$time.'\\n"'."\n"; - } - if (m/"Language-Team: LANGUAGE/) { - $_ = '"Language-Team: mySociety\\n"'."\n"; - } - if (m/"Plural-Forms: nplurals=/) { - $_ = '"Plural-Forms: nplurals=2; plural=n != 1;\\n"'."\n"; - } - - if (m/^#/) { - # comment or blank line - print OUTPO $_; - } elsif (m/^\s+$/) { - # blank line - $start = 1; - $buffer = ""; - print OUTPO $_; - } elsif ($start && (m/^msgstr "/ || m/^msgstr\[0\] "/)) { - # start of translated text - translate English into Empty Homes language - my $new_buffer = PoChange::fixmystreet_to_reportemptyhomes($buffer); - $new_buffer =~ s/"\n"//g; - - if ($lookup{$new_buffer} && $lookup{$new_buffer}[1]) { - print OUTPO "#, fuzzy\n"; - } - - print OUTPO $buffer; - if ($lookup{$new_buffer}) { - print OUTPO $lookup{$new_buffer}[0]; - } else { - if (m/^msgstr\[0\] ""/) { - $new_buffer =~ s/^msgid "/msgstr[0] "/m; - $new_buffer =~ s/^msgid_plural "/msgstr[1] "/m; - $_ = <MAINPO>; # skip untranslated plural - } else { - $new_buffer =~ s/^msgid "/msgstr "/; - } - print OUTPO $new_buffer; - } - - $buffer = ""; - } elsif (!$start) { - print OUTPO $_; - } else { - $buffer .= $_; - } -} - diff --git a/bin/gettext-extract b/bin/gettext-extract index ca37e9d6d..1c0771f9e 100755 --- a/bin/gettext-extract +++ b/bin/gettext-extract @@ -20,7 +20,7 @@ rm -f $PO # we don't want to extract strings from all the cobrand templates so list # the ones we care about -find templates/web/base templates/web/fixmystreet templates/web/zurich -name '*.html' > template_list +find templates/web/base templates/web/zurich -name '*.html' > template_list # Extract from Perl xgettext.pl --gnu-gettext --verbose --output $PO --plugin perl=* --plugin tt2 --directory perllib -f template_list --directory db --directory bin @@ -34,6 +34,3 @@ bin/update_po_header.bash $PO echo "$( bin/gettext-nget-patch )" >> $PO -#bin/make_po FixMyStreet-EmptyHomes -#bin/make_po FixMyBarangay - diff --git a/bin/gettext-merge b/bin/gettext-merge index b84708ece..373b39b31 100755 --- a/bin/gettext-merge +++ b/bin/gettext-merge @@ -14,11 +14,6 @@ do then cd $X/LC_MESSAGES echo $X - if [ -e EmptyHomes.po ] - then - msgmerge --no-wrap -o New.po EmptyHomes.po ../../FixMyStreet-EmptyHomes.po - mv New.po EmptyHomes.po - fi if [ -e FixMyStreet.po ] then msgmerge --no-wrap -o New.po FixMyStreet.po ../../FixMyStreet.po diff --git a/bin/install-as-user b/bin/install-as-user index 0e1c151fb..297efc1f3 100755 --- a/bin/install-as-user +++ b/bin/install-as-user @@ -133,8 +133,6 @@ echo $DONE_MSG # Generate po and mo files (these invocations taken from Kagee's script): echo "Creating locale .mo files" -bin/make_po FixMyStreet-EmptyHomes -bin/emptyhomes/make_welsh_po commonlib/bin/gettext-makemo FixMyStreet echo $DONE_MSG diff --git a/bin/problem-creation-graph b/bin/problem-creation-graph index a8554058a..d1fe08fd4 100755 --- a/bin/problem-creation-graph +++ b/bin/problem-creation-graph @@ -34,7 +34,6 @@ my %config = ( my $base_url = FixMyStreet->config('BASE_URL'); $config{date} = '2007-02-01'; $config{date} = '2011-03-03' if $base_url =~ /fiksgatami/; -$config{date} = '2008-10-01' if $base_url =~ /emptyhomes/; my %sources; sub grab_data { diff --git a/bin/update-all-reports b/bin/update-all-reports index d951756e4..6691ff4f0 100755 --- a/bin/update-all-reports +++ b/bin/update-all-reports @@ -81,14 +81,6 @@ while ( my @problem = $problems->next ) { } } -if ( FixMyStreet->config('BASE_URL') =~ /emptyhomes/ ) { - my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker('emptyhomes')->new(); - my $stats = $cobrand->old_site_stats; - foreach (keys %$stats) { - $open{$_}{unknown} += $stats->{$_}; - } -} - my $body = encode_json( { fixed => \%fixed, open => \%open, diff --git a/perllib/CronFns.pm b/perllib/CronFns.pm index 545526c8e..888817e05 100755 --- a/perllib/CronFns.pm +++ b/perllib/CronFns.pm @@ -26,20 +26,14 @@ sub options { sub site { my $base_url = shift; my $site = 'fixmystreet'; - $site = 'emptyhomes' if $base_url =~ 'emptyhomes'; $site = 'zurich' if $base_url =~ /zurich|zueri/; return $site; } sub language { my $site = shift; - if ($site eq 'emptyhomes') { - mySociety::Locale::negotiate_language('en-gb,English,en_GB|cy,Cymraeg,cy_GB'); - mySociety::Locale::gettext_domain('FixMyStreet-EmptyHomes', 1); - } else { - mySociety::Locale::negotiate_language('en-gb,English,en_GB|nb,Norwegian,nb_NO'); # XXX Testing - mySociety::Locale::gettext_domain('FixMyStreet', 1); - } + mySociety::Locale::negotiate_language('en-gb,English,en_GB|nb,Norwegian,nb_NO'); # XXX Testing + mySociety::Locale::gettext_domain('FixMyStreet', 1); } 1; diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 2bf215c56..f54a862ab 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -345,8 +345,6 @@ sub update_contacts : Private { $errors{email} = _('Please enter a valid email') unless is_valid_email($email) || $email eq 'REFUSED'; $errors{note} = _('Please enter a message') unless $c->get_param('note'); - $category = 'Empty property' if $c->cobrand->moniker eq 'emptyhomes'; - my $contact = $c->model('DB::Contact')->find_or_new( { body_id => $c->stash->{body_id}, @@ -743,16 +741,6 @@ sub report_edit : Path('report_edit') : Args(1) { my $new_state = $c->get_param('state'); my $old_state = $problem->state; - if ( $new_state eq 'confirmed' - && $problem->state eq 'unconfirmed' - && $c->cobrand->moniker eq 'emptyhomes' ) - { - $c->stash->{status_message} = - '<p><em>' - . _('I am afraid you cannot confirm unconfirmed reports.') - . '</em></p>'; - $done = 1; - } my $flagged = $c->get_param('flagged') ? 1 : 0; my $non_public = $c->get_param('non_public') ? 1 : 0; diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm index 1e6d9ec9e..b0340204a 100644 --- a/perllib/FixMyStreet/App/Controller/Around.pm +++ b/perllib/FixMyStreet/App/Controller/Around.pm @@ -47,7 +47,7 @@ sub index : Path : Args(0) { } # Check to see if the spot is covered by a area - if not show an error. - return unless $c->cobrand->moniker eq 'fixmybarangay' || $c->forward('check_location_is_acceptable'); + return unless $c->forward('check_location_is_acceptable'); # If we have a partial - redirect to /report/new so that it can be # completed. @@ -182,7 +182,7 @@ sub display_location : Private { # create a list of all the pins my @pins; - unless ($c->get_param('no_pins') || $c->cobrand->moniker eq 'emptyhomes') { + unless ($c->get_param('no_pins')) { @pins = map { # Here we might have a DB::Problem or a DB::Nearby, we always want the problem. my $p = (ref $_ eq 'FixMyStreet::App::Model::DB::Nearby') ? $_->problem : $_; diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm index 8fe2514c0..017a552db 100755 --- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm +++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm @@ -47,14 +47,6 @@ sub check_questionnaire : Private { $c->stash->{problem} = $problem; $c->stash->{answered_ever_reported} = $problem->user->answered_ever_reported; - - # EHA needs to know how many to alter display, and whether to send another or not - if ($c->cobrand->moniker eq 'emptyhomes') { - $c->stash->{num_questionnaire} = $c->model('DB::Questionnaire')->count( - { problem_id => $problem->id } - ); - } - } =head2 submit @@ -236,11 +228,6 @@ sub process_questionnaire : Private { $c->stash->{update} = Utils::cleanup_text($c->stash->{update}, { allow_multiline => 1 }); - # EHA questionnaires done for you - if ($c->cobrand->moniker eq 'emptyhomes') { - $c->stash->{another} = $c->stash->{num_questionnaire}==1 ? 'Yes' : 'No'; - } - my @errors; push @errors, _('Please state whether or not the problem has been fixed') unless $c->stash->{been_fixed}; diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm index 5cc44bb8f..475a29fb5 100644 --- a/perllib/FixMyStreet/App/Controller/Report.pm +++ b/perllib/FixMyStreet/App/Controller/Report.pm @@ -230,7 +230,7 @@ to moderation, however we'd need to inform all the other users too about this change, at which point we can delete: - this method - - the call to it in templates/web/fixmystreet/report/display.html + - the call to it in templates/web/base/report/display_tools.html - the users_can_hide cobrand method, in favour of user->has_permission_to =cut diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 940e7153b..5df182506 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -628,57 +628,35 @@ sub setup_categories_and_bodies : Private { } } - # FIXME - implement in cobrand - if ( $c->cobrand->moniker eq 'emptyhomes' ) { + # keysort does not appear to obey locale so use strcoll (see i18n.t) + @contacts = sort { strcoll( $a->category, $b->category ) } @contacts; - # add all bodies found to the list - foreach (@contacts) { - $bodies_to_list{ $_->body_id } = 1; - } - - # set our own categories - @category_options = ( - _('-- Pick a property type --'), - _('Empty house or bungalow'), - _('Empty flat or maisonette'), - _('Whole block of empty flats'), - _('Empty office or other commercial'), - _('Empty pub or bar'), - _('Empty public building - school, hospital, etc.') - ); - - } else { - - # keysort does not appear to obey locale so use strcoll (see i18n.t) - @contacts = sort { strcoll( $a->category, $b->category ) } @contacts; + my %seen; + foreach my $contact (@contacts) { - my %seen; - foreach my $contact (@contacts) { + $bodies_to_list{ $contact->body_id } = 1; - $bodies_to_list{ $contact->body_id } = 1; + unless ( $seen{$contact->category} ) { + push @category_options, $contact->category; - unless ( $seen{$contact->category} ) { - push @category_options, $contact->category; + my $metas = $contact->get_extra_fields; + $category_extras{ $contact->category } = $metas + if scalar @$metas; - my $metas = $contact->get_extra_fields; - $category_extras{ $contact->category } = $metas - if scalar @$metas; + my $body_send_method = $bodies{$contact->body_id}->send_method || ''; + $c->stash->{unresponsive}{$contact->category} = $contact->body_id + if !$c->stash->{unresponsive}{ALL} && + ($contact->email =~ /^REFUSED$/i || $body_send_method eq 'Refused'); - my $body_send_method = $bodies{$contact->body_id}->send_method || ''; - $c->stash->{unresponsive}{$contact->category} = $contact->body_id - if !$c->stash->{unresponsive}{ALL} && - ($contact->email =~ /^REFUSED$/i || $body_send_method eq 'Refused'); - - $non_public_categories{ $contact->category } = 1 if $contact->non_public; - } - $seen{$contact->category} = 1; + $non_public_categories{ $contact->category } = 1 if $contact->non_public; } + $seen{$contact->category} = 1; + } - if (@category_options) { - # If there's an Other category present, put it at the bottom - @category_options = ( _('-- Pick a category --'), grep { $_ ne _('Other') } @category_options ); - push @category_options, _('Other') if $seen{_('Other')}; - } + if (@category_options) { + # If there's an Other category present, put it at the bottom + @category_options = ( _('-- Pick a category --'), grep { $_ ne _('Other') } @category_options ); + push @category_options, _('Other') if $seen{_('Other')}; } $c->cobrand->munge_category_list(\@category_options, \@contacts, \%category_extras) @@ -860,12 +838,7 @@ sub process_report : Private { my $first_area = ( values %$areas )[0]; my $first_body = ( values %$bodies )[0]; - if ( $c->cobrand->moniker eq 'emptyhomes' ) { - - $bodies = join( ',', @{ $c->stash->{bodies_to_list} } ) || -1; - $report->bodies_str( $bodies ); - - } elsif ( $report->category ) { + if ( $report->category ) { # FIXME All contacts were fetched in setup_categories_and_bodies, # so can this DB call also be avoided? @@ -1074,7 +1047,7 @@ sub save_user_and_report : Private { $report->bodies_str( undef ) if $report->bodies_str eq '-1'; # if there is a Message Manager message ID, pass it back to the client view - if ($c->cobrand->moniker eq 'fixmybarangay' && $c->get_param('external_source_id') =~ /^\d+$/) { + if (($c->get_param('external_source_id') || "") =~ /^\d+$/) { $c->stash->{external_source_id} = $c->get_param('external_source_id'); $report->external_source_id( $c->get_param('external_source_id') ); $report->external_source( $c->config->{MESSAGE_MANAGER_URL} ) ; diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index 02dc4dc11..5bcbb3dc4 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -141,15 +141,9 @@ sub ward : Path : Args(2) { area => $c->stash->{ward} ? $c->stash->{ward}->{id} : [ keys %{$c->stash->{body}->areas} ], any_zoom => 1, ); - if ( $c->cobrand->moniker eq 'emptyhomes' ) { - FixMyStreet::Map::display_map( - $c, %map_params, latitude => 0, longitude => 0, - ); - } else { - FixMyStreet::Map::display_map( - $c, %map_params, pins => $pins, - ); - } + FixMyStreet::Map::display_map( + $c, %map_params, pins => $pins, + ); $c->cobrand->tweak_all_reports_map( $c ); diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm index d708aa71c..8d4f8313c 100755 --- a/perllib/FixMyStreet/App/Controller/Rss.pm +++ b/perllib/FixMyStreet/App/Controller/Rss.pm @@ -162,7 +162,6 @@ sub local_problems_ll : Private { sub output : Private { my ( $self, $c ) = @_; - $c->detach( '/page_error_404_not_found', [ 'Feed not found' ] ) if $c->cobrand->moniker eq 'emptyhomes'; $c->forward( 'lookup_type' ); $c->forward( 'query_main' ); $c->forward( 'generate' ); diff --git a/perllib/FixMyStreet/Cobrand/Barnet.pm b/perllib/FixMyStreet/Cobrand/Barnet.pm deleted file mode 100644 index df8757009..000000000 --- a/perllib/FixMyStreet/Cobrand/Barnet.pm +++ /dev/null @@ -1,28 +0,0 @@ -package FixMyStreet::Cobrand::Barnet; -use parent 'FixMyStreet::Cobrand::UKCouncils'; - -use strict; -use warnings; - -sub council_id { return 2489; } -sub council_area { return 'Barnet'; } -sub council_name { return 'Barnet Council'; } -sub council_url { return 'barnet'; } - -sub disambiguate_location { - my $self = shift; - return { - %{ $self->SUPER::disambiguate_location() }, - town => 'Barnet', - centre => '51.612832,-0.218169', - span => '0.0563,0.09', - bounds => [ 51.584682, -0.263169, 51.640982, -0.173169 ], - }; -} - -sub example_places { - return [ 'N11 1NP', 'Wood St' ]; -} - -1; - diff --git a/perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm b/perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm deleted file mode 100644 index 58bc6973d..000000000 --- a/perllib/FixMyStreet/Cobrand/BellaVistaEnAccion.pm +++ /dev/null @@ -1,25 +0,0 @@ -package FixMyStreet::Cobrand::BellaVistaEnAccion; -use base 'FixMyStreet::Cobrand::Default'; - -use strict; -use warnings; - -sub country { - return 'CL'; -} - -sub example_places { - return ( 'Dominica, Recoleta', 'Pio Nono' ); -} - -sub languages { [ 'es-cl,Castellano,es_CL' ] } - -sub disambiguate_location { - return { - country => 'cl', - town => 'Santiago', - }; -} - -1; - diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 6ba144f0d..4dc024d48 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -20,7 +20,7 @@ use mySociety::PostcodeUtil; $path = $cobrand->path_to_web_templates( ); Returns the path to the templates for this cobrand - by default -"templates/web/$moniker" and "templates/web/fixmystreet" +"templates/web/$moniker" (and then base in Web.pm). =cut @@ -28,7 +28,6 @@ sub path_to_web_templates { my $self = shift; my $paths = [ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify, - FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify, ]; return $paths; } diff --git a/perllib/FixMyStreet/Cobrand/EmptyHomes.pm b/perllib/FixMyStreet/Cobrand/EmptyHomes.pm deleted file mode 100644 index 70c3c9469..000000000 --- a/perllib/FixMyStreet/Cobrand/EmptyHomes.pm +++ /dev/null @@ -1,549 +0,0 @@ -package FixMyStreet::Cobrand::EmptyHomes; -use base 'FixMyStreet::Cobrand::UK'; - -use strict; -use warnings; - -use FixMyStreet; -use mySociety::Locale; -use Carp; - -sub path_to_web_templates { - my $self = shift; - return [ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify ]; -} - -sub _fallback_body_sender { - my ( $self, $body, $category ) = @_; - - return { method => 'EmptyHomes' }; -}; - -=item - -Return the base url for this cobranded site - -=cut - -sub base_url { - my $base_url = FixMyStreet->config('BASE_URL'); - if ( $base_url !~ /emptyhomes/ ) { - $base_url =~ s/http:\/\//http:\/\/emptyhomes\./g; - } - return $base_url; -} - -sub area_types { - [ 'DIS', 'LBO', 'MTD', 'UTA', 'LGD', 'COI' ]; # No CTY -} - -sub base_url_with_lang { - my $self = shift; - - my $base = $self->base_url; - - my $lang = $mySociety::Locale::lang; - if ($lang eq 'cy') { - $base =~ s{http://}{$&cy.}; - } else { - $base =~ s{http://}{$&en.}; - } - return $base; -} - -sub languages { [ 'en-gb,English,en_GB', 'cy,Cymraeg,cy_GB' ] } -sub language_domain { 'FixMyStreet-EmptyHomes' } - -=item shorten_recency_if_new_greater_than_fixed - -For empty homes we don't want to shorten the recency - -=cut - -sub shorten_recency_if_new_greater_than_fixed { - return 0; -} - -=head2 default_photo_resize - -Size that photos are to be resized to for display. If photos aren't -to be resized then return 0; - -=cut - -sub default_photo_resize { return '195x'; } - -sub short_name { - my $self = shift; - my ($area) = @_; - - my $name = $area->{name} || $area->name; - $name =~ s/ (Borough|City|District|County) Council$//; - $name =~ s/ Council$//; - $name =~ s/ & / and /; - $name =~ tr{/}{_}; - $name = URI::Escape::uri_escape_utf8($name); - $name =~ s/%20/-/g; - return $name; -} - -=item council_rss_alert_options - -Generate a set of options for council rss alerts. - -=cut - -sub council_rss_alert_options { - my $self = shift; - my $all_councils = shift; - my $c = shift; - - my %councils = map { $_ => 1 } @{$self->area_types}; - - my $num_councils = scalar keys %$all_councils; - - my ( @options, @reported_to_options ); - my ($council, $ward); - foreach (values %$all_councils) { - $_->{short_name} = $self->short_name( $_ ); - ( $_->{id_name} = $_->{short_name} ) =~ tr/+/_/; - if ($councils{$_->{type}}) { - $council = $_; - } else { - $ward = $_; - } - } - - push @options, { - type => 'council', - id => sprintf( 'council:%s:%s', $council->{id}, $council->{id_name} ), - text => sprintf( _('Problems within %s'), $council->{name}), - rss_text => sprintf( _('RSS feed of problems within %s'), $council->{name}), - uri => $c->uri_for( '/rss/reports/' . $council->{short_name} ), - }; - push @options, { - type => 'ward', - id => sprintf( 'ward:%s:%s:%s:%s', $council->{id}, $ward->{id}, $council->{id_name}, $ward->{id_name} ), - rss_text => sprintf( _('RSS feed of problems within %s ward'), $ward->{name}), - text => sprintf( _('Problems within %s ward'), $ward->{name}), - uri => $c->uri_for( '/rss/reports/' . $council->{short_name} . '/' . $ward->{short_name} ), - }; - - return ( \@options, @reported_to_options ? \@reported_to_options : undef ); -} - -sub report_form_extras { - ( { name => 'address', required => 1 } ) -} - -sub front_stats_data { - my ( $self ) = @_; - my $key = "recent_new"; - my $result = Memcached::get($key); - unless ($result) { - $result = $self->problems->search( - { state => [ FixMyStreet::DB::Result::Problem->visible_states() ] } - )->count; - foreach my $v (values %{$self->old_site_stats}) { - $result += $v; - } - Memcached::set($key, $result, 3600); - } - return $result; -} - -# A record of the number of reports from the Channel 4 site and other old data -sub old_site_stats { - return { - 2223 => 95, - 2238 => 82, - 2245 => 54, - 2248 => 31, - 2250 => 132, - 2253 => 15, - 2255 => 25, - 2256 => 8, - 2257 => 3, - 2258 => 14, - 2259 => 5, - 2260 => 22, - 2261 => 12, - 2262 => 21, - 2263 => 14, - 2264 => 1, - 2267 => 1, - 2271 => 13, - 2272 => 7, - 2273 => 13, - 2274 => 7, - 2275 => 15, - 2276 => 14, - 2277 => 10, - 2278 => 7, - 2279 => 23, - 2280 => 16, - 2281 => 25, - 2282 => 14, - 2283 => 10, - 2284 => 22, - 2285 => 25, - 2286 => 32, - 2287 => 13, - 2288 => 13, - 2289 => 16, - 2290 => 18, - 2291 => 1, - 2292 => 9, - 2293 => 15, - 2294 => 16, - 2295 => 12, - 2296 => 4, - 2299 => 2, - 2300 => 1, - 2304 => 10, - 2305 => 17, - 2306 => 6, - 2307 => 11, - 2308 => 17, - 2309 => 9, - 2310 => 6, - 2311 => 9, - 2312 => 26, - 2313 => 2, - 2314 => 34, - 2315 => 18, - 2316 => 13, - 2317 => 17, - 2318 => 7, - 2319 => 14, - 2320 => 4, - 2321 => 20, - 2322 => 7, - 2323 => 10, - 2324 => 7, - 2325 => 15, - 2326 => 12, - 2327 => 25, - 2328 => 23, - 2329 => 11, - 2330 => 4, - 2331 => 29, - 2332 => 12, - 2333 => 7, - 2334 => 5, - 2335 => 16, - 2336 => 7, - 2337 => 7, - 2338 => 2, - 2339 => 12, - 2340 => 2, - 2341 => 7, - 2342 => 14, - 2343 => 20, - 2344 => 13, - 2345 => 17, - 2346 => 6, - 2347 => 4, - 2348 => 6, - 2349 => 18, - 2350 => 13, - 2351 => 11, - 2352 => 24, - 2353 => 10, - 2354 => 20, - 2355 => 14, - 2356 => 13, - 2357 => 14, - 2358 => 8, - 2359 => 6, - 2360 => 10, - 2361 => 36, - 2362 => 17, - 2363 => 8, - 2364 => 7, - 2365 => 8, - 2366 => 26, - 2367 => 19, - 2368 => 20, - 2369 => 8, - 2370 => 14, - 2371 => 79, - 2372 => 10, - 2373 => 5, - 2374 => 4, - 2375 => 12, - 2376 => 10, - 2377 => 24, - 2378 => 9, - 2379 => 8, - 2380 => 25, - 2381 => 13, - 2382 => 11, - 2383 => 16, - 2384 => 18, - 2385 => 12, - 2386 => 18, - 2387 => 5, - 2388 => 8, - 2389 => 12, - 2390 => 11, - 2391 => 23, - 2392 => 11, - 2393 => 16, - 2394 => 9, - 2395 => 27, - 2396 => 8, - 2397 => 27, - 2398 => 14, - 2402 => 1, - 2403 => 18, - 2404 => 14, - 2405 => 7, - 2406 => 9, - 2407 => 12, - 2408 => 3, - 2409 => 8, - 2410 => 23, - 2411 => 27, - 2412 => 9, - 2413 => 20, - 2414 => 96, - 2415 => 11, - 2416 => 20, - 2417 => 18, - 2418 => 24, - 2419 => 18, - 2420 => 7, - 2421 => 29, - 2427 => 7, - 2428 => 15, - 2429 => 18, - 2430 => 32, - 2431 => 9, - 2432 => 17, - 2433 => 8, - 2434 => 10, - 2435 => 14, - 2436 => 13, - 2437 => 11, - 2438 => 5, - 2439 => 4, - 2440 => 23, - 2441 => 8, - 2442 => 18, - 2443 => 12, - 2444 => 3, - 2445 => 8, - 2446 => 31, - 2447 => 15, - 2448 => 3, - 2449 => 12, - 2450 => 11, - 2451 => 8, - 2452 => 20, - 2453 => 25, - 2454 => 8, - 2455 => 6, - 2456 => 24, - 2457 => 6, - 2458 => 10, - 2459 => 15, - 2460 => 17, - 2461 => 20, - 2462 => 12, - 2463 => 16, - 2464 => 5, - 2465 => 14, - 2466 => 20, - 2467 => 14, - 2468 => 12, - 2469 => 4, - 2470 => 1, - 2471 => 1, - 2474 => 9, - 2475 => 12, - 2476 => 11, - 2477 => 9, - 2478 => 10, - 2479 => 21, - 2480 => 26, - 2481 => 30, - 2482 => 38, - 2483 => 46, - 2484 => 63, - 2485 => 7, - 2486 => 14, - 2487 => 16, - 2488 => 14, - 2489 => 39, - 2490 => 112, - 2491 => 79, - 2492 => 137, - 2493 => 55, - 2494 => 18, - 2495 => 41, - 2496 => 41, - 2497 => 22, - 2498 => 26, - 2499 => 46, - 2500 => 62, - 2501 => 90, - 2502 => 47, - 2503 => 32, - 2504 => 33, - 2505 => 47, - 2506 => 56, - 2507 => 26, - 2508 => 48, - 2509 => 47, - 2510 => 16, - 2511 => 6, - 2512 => 4, - 2513 => 41, - 2514 => 138, - 2515 => 48, - 2516 => 65, - 2517 => 35, - 2518 => 40, - 2519 => 31, - 2520 => 27, - 2521 => 25, - 2522 => 34, - 2523 => 27, - 2524 => 47, - 2525 => 22, - 2526 => 125, - 2527 => 126, - 2528 => 93, - 2529 => 23, - 2530 => 28, - 2531 => 24, - 2532 => 46, - 2533 => 22, - 2534 => 24, - 2535 => 27, - 2536 => 44, - 2537 => 54, - 2538 => 17, - 2539 => 13, - 2540 => 29, - 2541 => 15, - 2542 => 19, - 2543 => 14, - 2544 => 34, - 2545 => 30, - 2546 => 38, - 2547 => 32, - 2548 => 22, - 2549 => 37, - 2550 => 9, - 2551 => 41, - 2552 => 17, - 2553 => 36, - 2554 => 10, - 2555 => 20, - 2556 => 13, - 2557 => 19, - 2558 => 13, - 2559 => 23, - 2560 => 13, - 2561 => 62, - 2562 => 29, - 2563 => 31, - 2564 => 34, - 2565 => 57, - 2566 => 16, - 2567 => 22, - 2568 => 40, - 2569 => 5, - 2570 => 38, - 2571 => 17, - 2572 => 9, - 2573 => 12, - 2574 => 10, - 2575 => 16, - 2576 => 2, - 2577 => 28, - 2578 => 37, - 2579 => 79, - 2580 => 17, - 2581 => 734, - 2582 => 11, - 2583 => 23, - 2584 => 16, - 2585 => 4, - 2586 => 33, - 2587 => 3, - 2588 => 22, - 2589 => 19, - 2590 => 14, - 2591 => 9, - 2592 => 19, - 2593 => 11, - 2594 => 14, - 2595 => 13, - 2596 => 21, - 2597 => 10, - 2598 => 16, - 2599 => 26, - 2600 => 1, - 2601 => 19, - 2602 => 23, - 2603 => 12, - 2604 => 31, - 2605 => 30, - 2606 => 5, - 2607 => 32, - 2608 => 14, - 2609 => 27, - 2610 => 15, - 2611 => 20, - 2612 => 22, - 2613 => 20, - 2614 => 97, - 2615 => 29, - 2616 => 6, - 2617 => 34, - 2618 => 16, - 2619 => 25, - 2620 => 12, - 2621 => 29, - 2622 => 18, - 2623 => 12, - 2624 => 58, - 2625 => 54, - 2626 => 15, - 2627 => 1, - 2629 => 17, - 2630 => 22, - 2636 => 13, - 2637 => 13, - 2638 => 25, - 2639 => 57, - 2640 => 15, - 2641 => 11, - 2642 => 14, - 2643 => 38, - 2644 => 19, - 2645 => 6, - 2646 => 1, - 2647 => 16, - 2648 => 25, - 2649 => 38, - 2650 => 12, - 2651 => 78, - 2652 => 12, - 2654 => 16, - 2655 => 13, - 2656 => 15, - 2657 => 44, - 2658 => 53, - 16869 => 73, - 21068 => 44, - 21069 => 57, - 21070 => 20, - }; -} - -1; - diff --git a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm deleted file mode 100644 index 194556e72..000000000 --- a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm +++ /dev/null @@ -1,55 +0,0 @@ -package FixMyStreet::Cobrand::FixMyBarangay; -use base 'FixMyStreet::Cobrand::Default'; - -use strict; -use warnings; - -sub country { - return 'PH'; -} - -sub language_domain { 'FixMyBarangay' } - -sub area_types { - return [ 'BGY' ]; -} - -sub disambiguate_location { - return { - country => 'ph', - bing_country => 'Philippines', - }; -} - -sub only_authed_can_create { - return 1; -} - -# effectively allows barangay staff to hide reports -sub council_id { return '1,2' ; } - -sub areas_on_around { - return [ 1, 2 ]; -} - -sub can_support_problems { - return 1; -} - -sub default_show_name { - my $self = shift; - - return 0 if $self->{c}->user->from_council; - return 1; -} - -# makes no sense to send questionnaires since FMB's reporters are mostly staff -sub send_questionnaires { - return 0; -} - -# let staff hide reports in their own barangay -sub users_can_hide { 1 } - -1; - diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm index 99fe6da15..c8c1eef66 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm @@ -8,7 +8,6 @@ sub path_to_web_templates { my $self = shift; return [ FixMyStreet->path_to( 'templates/web/fixmystreet.com' )->stringify, - FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify ]; } diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index b4b91b7dd..0321e0297 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -18,7 +18,6 @@ sub path_to_web_templates { return [ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify, FixMyStreet->path_to( 'templates/web/fixmystreet-uk-councils' )->stringify, - FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify ]; } diff --git a/perllib/FixMyStreet/Cobrand/ZeroTB.pm b/perllib/FixMyStreet/Cobrand/ZeroTB.pm deleted file mode 100644 index ef1b0b1e1..000000000 --- a/perllib/FixMyStreet/Cobrand/ZeroTB.pm +++ /dev/null @@ -1,56 +0,0 @@ -package FixMyStreet::Cobrand::ZeroTB; -use base 'FixMyStreet::Cobrand::Default'; - -use strict; -use warnings; - -sub enter_postcode_text { return _ ('Enter a nearby street name and area, postal code or district in Delhi'); } - -sub country { - return 'IN'; -} - -sub disambiguate_location { - return { - country => 'in', - town => 'Delhi', - bounds => [ 28.404625000000024, 76.838845800000072, 28.884380600000028, 77.347877500000067 ], - }; -} - -sub only_authed_can_create { return 1; } -sub allow_photo_display { return 0; } -sub allow_photo_upload{ return 0; } -sub send_questionnaires { return 0; } -sub on_map_default_max_pin_age { return 0; } -sub never_confirm_updates { 1; } -sub include_time_in_update_alerts { 1; } - -sub pin_colour { - return 'clinic'; -} - -sub path_to_pin_icons { - return '/cobrands/zerotb/images/'; -} - -sub get_clinic_list { - my $self = shift; - - return $self->problems->search({ state => 'confirmed' }, { order_by => 'title' }); -} - -sub prettify_dt { - my ( $self, $dt, $type ) = @_; - $type ||= ''; - - if ( $type eq 'alert' ) { - return $dt->strftime('%H:%M %Y-%m-%d'); - } else { - return Utils::prettify_dt( $dt, $type ); - } - -} - -1; - diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index 764f381a2..12dad073e 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -557,59 +557,48 @@ sub meta_line { my $date_time = Utils::prettify_dt( $problem->confirmed ); my $meta = ''; - # FIXME Should be in cobrand - if ($c->cobrand->moniker eq 'emptyhomes') { - - my $category = _($problem->category); - utf8::decode($category); - $meta = sprintf(_('%s, reported at %s'), $category, $date_time); - - } else { - - if ( $problem->anonymous ) { - if ( $problem->service - and $problem->category && $problem->category ne _('Other') ) - { - $meta = - sprintf( _('Reported via %s in the %s category anonymously at %s'), - $problem->service, $problem->category, $date_time ); - } - elsif ( $problem->service ) { - $meta = sprintf( _('Reported via %s anonymously at %s'), - $problem->service, $date_time ); - } - elsif ( $problem->category and $problem->category ne _('Other') ) { - $meta = sprintf( _('Reported in the %s category anonymously at %s'), - $problem->category, $date_time ); - } - else { - $meta = sprintf( _('Reported anonymously at %s'), $date_time ); - } + if ( $problem->anonymous ) { + if ( $problem->service + and $problem->category && $problem->category ne _('Other') ) + { + $meta = + sprintf( _('Reported via %s in the %s category anonymously at %s'), + $problem->service, $problem->category, $date_time ); + } + elsif ( $problem->service ) { + $meta = sprintf( _('Reported via %s anonymously at %s'), + $problem->service, $date_time ); + } + elsif ( $problem->category and $problem->category ne _('Other') ) { + $meta = sprintf( _('Reported in the %s category anonymously at %s'), + $problem->category, $date_time ); } else { - if ( $problem->service - and $problem->category && $problem->category ne _('Other') ) - { - $meta = sprintf( - _('Reported via %s in the %s category by %s at %s'), - $problem->service, $problem->category, - $problem->name, $date_time - ); - } - elsif ( $problem->service ) { - $meta = sprintf( _('Reported via %s by %s at %s'), - $problem->service, $problem->name, $date_time ); - } - elsif ( $problem->category and $problem->category ne _('Other') ) { - $meta = sprintf( _('Reported in the %s category by %s at %s'), - $problem->category, $problem->name, $date_time ); - } - else { - $meta = - sprintf( _('Reported by %s at %s'), $problem->name, $date_time ); - } + $meta = sprintf( _('Reported anonymously at %s'), $date_time ); + } + } + else { + if ( $problem->service + and $problem->category && $problem->category ne _('Other') ) + { + $meta = sprintf( + _('Reported via %s in the %s category by %s at %s'), + $problem->service, $problem->category, + $problem->name, $date_time + ); + } + elsif ( $problem->service ) { + $meta = sprintf( _('Reported via %s by %s at %s'), + $problem->service, $problem->name, $date_time ); + } + elsif ( $problem->category and $problem->category ne _('Other') ) { + $meta = sprintf( _('Reported in the %s category by %s at %s'), + $problem->category, $problem->name, $date_time ); + } + else { + $meta = + sprintf( _('Reported by %s at %s'), $problem->name, $date_time ); } - } return $meta; @@ -660,7 +649,7 @@ sub response_templates { } # returns true if the external id is the council's ref, i.e., useful to publish it -# (by way of an example, the barnet send method returns a useful reference when +# (by way of an example, the Oxfordshire send method returns a useful reference when # it succeeds, so that is the ref we should show on the problem report page). # Future: this is installation-dependent so maybe should be using the contact # data to determine if the external id is public on a council-by-council basis. diff --git a/perllib/FixMyStreet/Script/Questionnaires.pm b/perllib/FixMyStreet/Script/Questionnaires.pm index 2d676f15d..f72f59077 100644 --- a/perllib/FixMyStreet/Script/Questionnaires.pm +++ b/perllib/FixMyStreet/Script/Questionnaires.pm @@ -10,8 +10,6 @@ use FixMyStreet::Cobrand; sub send { my ( $params ) = @_; send_questionnaires_period( '4 weeks', $params ); - send_questionnaires_period( '26 weeks', $params ) - if $params->{site} eq 'emptyhomes'; } sub send_questionnaires_period { @@ -29,17 +27,11 @@ sub send_questionnaires_period { ], send_questionnaire => 1, }; - # FIXME Do these a bit better... - if ($params->{site} eq 'emptyhomes' && $period eq '4 weeks') { - $q_params->{'(select max(whensent) from questionnaire where me.id=problem_id)'} = undef; - } elsif ($params->{site} eq 'emptyhomes' && $period eq '26 weeks') { - $q_params->{'(select max(whensent) from questionnaire where me.id=problem_id)'} = { '!=', undef }; - } else { - $q_params->{'-or'} = [ - '(select max(whensent) from questionnaire where me.id=problem_id)' => undef, - '(select max(whenanswered) from questionnaire where me.id=problem_id)' => { '<', \"current_timestamp - '$period'::interval" } - ]; - } + + $q_params->{'-or'} = [ + '(select max(whensent) from questionnaire where me.id=problem_id)' => undef, + '(select max(whenanswered) from questionnaire where me.id=problem_id)' => { '<', \"current_timestamp - '$period'::interval" } + ]; my $unsent = FixMyStreet::DB->resultset('Problem')->search( $q_params, { order_by => { -desc => 'confirmed' } @@ -60,13 +52,7 @@ sub send_questionnaires_period { # call checks if this is the host that sends mail for this cobrand. next unless $cobrand->email_host; - my $template; - if ($params->{site} eq 'emptyhomes') { - ($template = $period) =~ s/ //; - $template = Utils::read_file( FixMyStreet->path_to( "templates/email/emptyhomes/" . $row->lang . "/questionnaire-$template.txt" )->stringify ); - } else { - $template = FixMyStreet->get_email_template($cobrand->moniker, $row->lang, 'questionnaire.txt'); - } + my $template = FixMyStreet->get_email_template($cobrand->moniker, $row->lang, 'questionnaire.txt'); my %h = map { $_ => $row->$_ } qw/name title detail category/; $h{created} = Utils::prettify_duration( time() - $row->confirmed->epoch, 'week' ); @@ -76,10 +62,8 @@ sub send_questionnaires_period { whensent => \'current_timestamp', } ); - # We won't send another questionnaire unless they ask for it (or it was - # the first EHA questionnaire. - $row->send_questionnaire( 0 ) - if $params->{site} ne 'emptyhomes' || $period eq '26 weeks'; + # We won't send another questionnaire unless they ask for it + $row->send_questionnaire( 0 ); my $token = FixMyStreet::DB->resultset("Token")->new_result( { scope => 'questionnaire', diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm index 8b1ce6759..75111b852 100644 --- a/perllib/FixMyStreet/Script/Reports.pm +++ b/perllib/FixMyStreet/Script/Reports.pm @@ -203,7 +203,7 @@ sub send(;$) { if (FixMyStreet->config('STAGING_SITE') && !FixMyStreet->config('SEND_REPORTS_ON_STAGING')) { # on a staging server send emails to ourselves rather than the bodies - %reporters = map { $_ => $reporters{$_} } grep { /FixMyStreet::SendReport::(Email|EmptyHomes)/ } keys %reporters; + %reporters = map { $_ => $reporters{$_} } grep { /FixMyStreet::SendReport::Email/ } keys %reporters; unless (%reporters) { %reporters = ( 'FixMyStreet::SendReport::Email' => FixMyStreet::SendReport::Email->new() ); } diff --git a/perllib/FixMyStreet/SendReport/EmptyHomes.pm b/perllib/FixMyStreet/SendReport/EmptyHomes.pm deleted file mode 100644 index b5faf8ddc..000000000 --- a/perllib/FixMyStreet/SendReport/EmptyHomes.pm +++ /dev/null @@ -1,56 +0,0 @@ -package FixMyStreet::SendReport::EmptyHomes; - -use Moo; -use namespace::autoclean; - -use mySociety::MaPit; - -BEGIN { extends 'FixMyStreet::SendReport::Email'; } - -sub build_recipient_list { - my ( $self, $row, $h ) = @_; - - my $all_confirmed = 1; - foreach my $body ( @{ $self->bodies } ) { - my $contact = $row->result_source->schema->resultset("Contact")->find( { - deleted => 0, - body_id => $body->id, - category => 'Empty property', - } ); - - my ($body_email, $confirmed, $note) = ( $contact->email, $contact->confirmed, $contact->note ); - - unless ($confirmed) { - $all_confirmed = 0; - #$note = 'Council ' . $row->body . ' deleted' - #unless $note; - $body_email = 'N/A' unless $body_email; - #$notgot{$body_email}{$row->category}++; - #$note{$body_email}{$row->category} = $note; - } - - push @{ $self->to }, [ $body_email, $body->name ]; - - my $area_info = mySociety::MaPit::call('area', $body->body_areas->first->area_id); - my $country = $area_info->{country}; - if ($country eq 'W') { - push @{$self->bcc}, 'wales@' . FixMyStreet->config('EMAIL_DOMAIN'); - } elsif ($country eq 'S') { - push @{$self->bcc}, 'scotland@' . FixMyStreet->config('EMAIL_DOMAIN'); - } else { - push @{$self->bcc}, 'eha@' . FixMyStreet->config('EMAIL_DOMAIN'); - } - } - - # Set address email parameter from added data - $h->{address} = $row->extra->{address}; - - return $all_confirmed && @{$self->to}; -} - -sub get_template { - my ( $self, $row ) = @_; - return Utils::read_file( FixMyStreet->path_to( "templates", "email", "emptyhomes", $row->lang, "submit.txt" )->stringify ); -} - -1; diff --git a/perllib/FixMyStreet/SendReport/Open311.pm b/perllib/FixMyStreet/SendReport/Open311.pm index 4844aa2e9..5c7fa30f3 100644 --- a/perllib/FixMyStreet/SendReport/Open311.pm +++ b/perllib/FixMyStreet/SendReport/Open311.pm @@ -126,8 +126,8 @@ sub send { $revert = 1; } - if ($row->cobrand eq 'fixmybarangay' || $row->bodies_str =~ /$COUNCIL_ID_GREENWICH/) { - # FixMyBarangay endpoints expect external_id as an attribute, as do Greenwich + if ($row->bodies_str =~ /$COUNCIL_ID_GREENWICH/) { + # Greenwich endpoint expects external_id as an attribute $row->set_extra_fields( { 'name' => 'external_id', 'value' => $row->id } ); $revert = 1; } diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm index 15a827217..3236f3798 100644 --- a/perllib/Open311/PopulateServiceList.pm +++ b/perllib/Open311/PopulateServiceList.pm @@ -18,7 +18,6 @@ sub process_bodies { while ( my $body = $self->bodies->next ) { next unless $body->endpoint; next unless lc($body->send_method) eq 'open311'; - next if $body->jurisdiction =~ /^fixmybarangay_\w+$/; # FMB depts. not using service discovery yet $self->_current_body( $body ); $self->process_body; } diff --git a/t/app/controller/about.t b/t/app/controller/about.t index 6a082a2ff..cec50abfa 100644 --- a/t/app/controller/about.t +++ b/t/app/controller/about.t @@ -1,3 +1,4 @@ +use utf8; use strict; use warnings; @@ -21,19 +22,12 @@ ok !$mech->res->is_success(), "want a bad response"; is $mech->res->code, 404, "got 404"; FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'emptyhomes' ], + ALLOWED_COBRANDS => [ 'fiksgatami' ], }, sub { - # check that geting the page as EHA produces a different page - ok $mech->host("reportemptyhomes.co.uk"), 'change host to reportemptyhomes'; - $mech->get_ok('/about'); - $mech->content_like(qr{About us ::}); - $mech->content_contains('html lang="en-gb"'); - - # check that geting the page as EHA in welsh produces a different page - ok $mech->host("cy.reportemptyhomes.co.uk"), 'host to cy.reportemptyhomes'; - $mech->get_ok('/about'); - $mech->content_like(qr{Amdanom ni ::}); - $mech->content_contains('html lang="cy"'); + ok $mech->host("www.fiksgatami.no"), 'host to fiksgatami'; + $mech->get_ok('/faq'); + $mech->content_like(qr{Ofte spurte spørsmÃ¥l ::}); + $mech->content_contains('html class="no-js" lang="nb"'); }; done_testing(); diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t index 310e0a677..1dcb768dc 100644 --- a/t/app/controller/admin.t +++ b/t/app/controller/admin.t @@ -104,9 +104,9 @@ subtest 'check summary counts' => sub { $mech->content_contains( "$q_count questionnaires sent" ); FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'barnet' ], + ALLOWED_COBRANDS => [ 'oxfordshire' ], }, sub { - ok $mech->host('barnet.fixmystreet.com'); + ok $mech->host('oxfordshire.fixmystreet.com'); $mech->get_ok('/admin'); $mech->title_like(qr/Summary/); @@ -115,11 +115,11 @@ subtest 'check summary counts' => sub { my ($num_alerts) = $mech->content =~ /(\d+) confirmed alerts/; my ($num_qs) = $mech->content =~ /(\d+) questionnaires sent/; - $report->bodies_str(2489); - $report->cobrand('barnet'); + $report->bodies_str(2237); + $report->cobrand('oxfordshire'); $report->update; - $alert->cobrand('barnet'); + $alert->cobrand('oxfordshire'); $alert->update; $mech->get_ok('/admin'); diff --git a/t/app/controller/questionnaire.t b/t/app/controller/questionnaire.t index cad86a40d..7bc6545db 100644 --- a/t/app/controller/questionnaire.t +++ b/t/app/controller/questionnaire.t @@ -394,31 +394,23 @@ for my $test ( } FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'emptyhomes', 'fixmystreet' ], + ALLOWED_COBRANDS => [ 'fixmystreet' ], }, sub { - # EHA extra checking - ok $mech->host("reportemptyhomes.com"), 'change host to reportemptyhomes'; - - # Reset, and all the questionaire sending function - FIXME should it detect site itself somehow? + $report->discard_changes; $report->send_questionnaire( 1 ); $report->update; $questionnaire->delete; - FixMyStreet::App->model('DB::Questionnaire')->send_questionnaires( { - site => 'emptyhomes' - } ); + FixMyStreet::App->model('DB::Questionnaire')->send_questionnaires(); $email = $mech->get_email; ok $email, "got an email"; $mech->clear_emails_ok; (my $body = $email->body) =~ s/\s+/ /g; - like $body, qr/fill in this short questionnaire/i, "got questionnaire email"; + like $body, qr/fill in our short questionnaire/i, "got questionnaire email"; ($token) = $email->body =~ m{http://.*?/Q/(\S+)}; ok $token, "extracted questionnaire token '$token'"; - $mech->get_ok("/Q/" . $token); - $mech->content_lacks( 'Would you like to receive another questionnaire' ); - # Test already answered the ever reported question, so not shown again $dt = $dt->add( weeks => 4 ); my $questionnaire2 = FixMyStreet::App->model('DB::Questionnaire')->find_or_create( @@ -429,17 +421,11 @@ FixMyStreet::override_config { } ); ok $questionnaire2, 'added another questionnaire'; - ok $mech->host("www.fixmystreet.com"), 'change host to fixmystreet'; $mech->get_ok("/Q/" . $token); $mech->title_like( qr/Questionnaire/ ); $mech->content_contains( 'Has this problem been fixed?' ); $mech->content_lacks( 'ever reported' ); - # EHA extra checking - ok $mech->host("reportemptyhomes.com"), 'change host to reportemptyhomes'; - $mech->get_ok("/Q/" . $token); - $mech->content_lacks( 'Would you like to receive another questionnaire' ); - $token = FixMyStreet::App->model("DB::Token")->find( { scope => 'questionnaire', token => $token } ); ok $token, 'found token for questionnaire'; $questionnaire = FixMyStreet::App->model('DB::Questionnaire')->find( { id => $token->data } ); @@ -452,11 +438,12 @@ FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'fiksgatami' ], }, sub { # I18N Unicode extra testing using FiksGataMi + $report->discard_changes; $report->send_questionnaire( 1 ); $report->cobrand( 'fiksgatami' ); $report->update; $questionnaire->delete; - FixMyStreet::App->model('DB::Questionnaire')->send_questionnaires( { site => 'fixmystreet' } ); # It's either fixmystreet or emptyhomes + FixMyStreet::App->model('DB::Questionnaire')->send_questionnaires(); $email = $mech->get_email; ok $email, "got an email"; $mech->clear_emails_ok; diff --git a/t/app/controller/report_interest_count.t b/t/app/controller/report_interest_count.t index 506b50edd..4e86789ba 100644 --- a/t/app/controller/report_interest_count.t +++ b/t/app/controller/report_interest_count.t @@ -1,5 +1,16 @@ use strict; use warnings; + +package FixMyStreet::Cobrand::Tester; + +use parent 'FixMyStreet::Cobrand::Default'; + +sub can_support_problems { + return 1; +} + +package main; + use Test::More; use FixMyStreet::TestMech; @@ -52,7 +63,7 @@ my $report_id = $report->id; ok $report, "created test report - $report_id"; FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'fixmybarangay' ], + ALLOWED_COBRANDS => [ 'tester' ], }, sub { my $body = $mech->create_body_ok(2504, 'Westminster City Council'); @@ -76,7 +87,6 @@ FixMyStreet::override_config { }, ) { subtest $test->{desc} => sub { - ok $mech->host('fixmybarangay.com'), 'changed to fixmybarangay'; $mech->log_in_ok( $user->email ); $user->from_body( $test->{from_body} ); $user->update; @@ -92,7 +102,7 @@ FixMyStreet::override_config { $mech->content_contains('Add support'); $mech->submit_form_ok( { form_number => 1 } ); - is $mech->uri, "http://fixmybarangay.com/report/$report_id", 'add support redirects to report page'; + is $mech->uri->path, "/report/$report_id", 'add support redirects to report page'; $mech->content_contains($test->{updated_support}); } else { @@ -102,26 +112,22 @@ FixMyStreet::override_config { } subtest 'check non body user cannot increment support count' => sub { - ok $mech->host('fixmybarangay.com'), 'changed to fixmybarangay'; - ok $report->update({ interest_count => 1 }), 'updated interest count'; is $report->interest_count, 1, 'correct interest count'; $mech->get_ok("/report/$report_id"); $mech->content_contains( '1 supporter' ); - # This doesn't send cookie, so is logged out + $mech->log_out_ok( $user->email ); $mech->post_ok("/report/support", { id => $report_id } ); - is $mech->uri, "http://fixmybarangay.com/report/$report_id", 'add support redirects to report page'; + is $mech->uri->path, "/report/$report_id", 'add support redirects to report page'; $mech->content_contains( '1 supporter' ); }; }; subtest 'check support details not shown if not enabled in cobrand' => sub { - ok $mech->host('www.fixmystreet.com'), 'changed to fixmystreet'; - $report->interest_count(1); ok $report->update, 'updated interest count'; diff --git a/t/app/controller/reports.t b/t/app/controller/reports.t index 9b446174d..8869adaa7 100644 --- a/t/app/controller/reports.t +++ b/t/app/controller/reports.t @@ -196,17 +196,6 @@ $mech->get_ok('/reports'); $stats = $mech->extract_report_stats; is $stats->{'Westminster City Council'}->[1], 5, 'non public reports included in stats'; -subtest "test emptyhomes all reports page" => sub { - FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'emptyhomes' ], - }, sub { - ok $mech->host("reportemptyhomes.com"), 'change host to reportemptyhomes'; - $mech->get_ok('/reports'); - # EHA lacks one column the others have - $mech->content_lacks('state unknown'); - }; -}; - subtest "test fiksgatami all reports page" => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'fiksgatami' ], diff --git a/t/app/model/user.t b/t/app/model/user.t index 24e5d2d98..bf73a9d09 100644 --- a/t/app/model/user.t +++ b/t/app/model/user.t @@ -46,7 +46,7 @@ END { sub create_update { my ($problem, %params) = @_; - my $dt = DateTime->now()->add(hours => 1); + my $dt = DateTime->now()->add(days => 1); return FixMyStreet::App->model('DB::Comment')->find_or_create({ problem_id => $problem->id, user_id => $problem->user_id, diff --git a/t/app/uri_for.t b/t/app/uri_for.t index 810aade62..9cbcd3767 100644 --- a/t/app/uri_for.t +++ b/t/app/uri_for.t @@ -17,7 +17,6 @@ use_ok('FixMyStreet::App'); my $fms_c = ctx_request('http://www.fixmystreet.com/'); my $fgm_c = ctx_request('http://www.fiksgatami.no/'); -my $reh_en_c = ctx_request('http://reportemptyhomes.com/'); is( $fms_c->uri_for('/bar/baz') . "", @@ -44,29 +43,4 @@ is( 'FiksGataMi url with lat not zoom' ); -FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'emptyhomes' ], -}, sub { - like( - $reh_en_c->uri_for_email( '/foo' ), - qr{^http://en.}, - 'adds en to retain language' - ); -}; - -# instantiate this here otherwise sets locale to cy and breaks test -# above -my $reh_cy_c; -FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'emptyhomes' ], -}, sub { - $reh_cy_c = ctx_request('http://cy.reportemptyhomes.com/'); - - like( - $reh_cy_c->uri_for_email( '/foo' ), - qr{^http://cy.}, - 'retains language' - ); -}; - done_testing(); diff --git a/t/cobrand/fixmybarangay.t b/t/cobrand/fixmybarangay.t deleted file mode 100644 index 2f99b8c1e..000000000 --- a/t/cobrand/fixmybarangay.t +++ /dev/null @@ -1,150 +0,0 @@ -use strict; -use warnings; -use Test::More; - -BEGIN { - use FixMyStreet; - FixMyStreet->test_mode(1); -} - -use FixMyStreet::TestMech; -my $mech = FixMyStreet::TestMech->new; - -# Front page test - -ok $mech->host("www.fixmybarangay.com"), "change host to FixMyBarangay"; -FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'fixmybarangay' ], -}, sub { - $mech->get_ok('/'); -}; -$mech->content_like( qr/FixMyBarangay/ ); - -# Set up bodies - -my $luz = $mech->create_body_ok( 1, 'Bgy Luz', id => 1 ); -$luz->update( { send_method => 'Email' } ); - -my $bsn = $mech->create_body_ok( 2, 'Bgy BSN', id => 2 ); -$bsn->update( { send_method => 'Email' } ); - -my $dps = $mech->create_body_ok( 3, 'DPS', id => 3 ); -$dps->update( { send_method => 'Open311', endpoint => 'http://dps.endpoint.example.com', jurisdiction => 'FMB', api_key => 'test' } ); -FixMyStreet::DB->resultset('BodyArea')->find_or_create({ area_id => 1, body_id => $dps->id }); -FixMyStreet::DB->resultset('BodyArea')->find_or_create({ area_id => 2, body_id => $dps->id }); - -# Create contacts for these bodies -# TODO: log in as a Bgy user, and create a report using the front end, -# testing that the drop-down has the right things in it, and so on. - -$mech->create_contact_ok( - body_id => $luz->id, - category => 'Streetlight (BGY)', - email => 'bgy@example.com', -); -$mech->create_contact_ok( - body_id => $dps->id, - category => 'Streetlight (DPS)', - email => 'LIGHT', -); - -# Create a couple of reports - -my @reports = $mech->create_problems_for_body( 1, $luz->id, 'Test', { - cobrand => 'fixmybarangay', - category => 'Streetlight (BGY)', -}); -my $luz_report = $reports[0]; - -@reports = $mech->create_problems_for_body( 1, $dps->id, 'Test', { - cobrand => 'fixmybarangay', - category => 'Streetlight (DPS)', -}); -my $dps_report = $reports[0]; - -$mech->get_ok( '/report/' . $luz_report->id ); -$mech->get_ok( '/report/' . $dps_report->id ); - -# Send the reports - -$mech->email_count_is(0); - -FixMyStreet::override_config { - SEND_REPORTS_ON_STAGING => 1, -}, sub { - FixMyStreet::DB->resultset('Problem')->send_reports('fixmybarangay'); -}; - -# Check BGY one sent by email -my $email = $mech->get_email; -like $email->header('Subject'), qr/Problem Report: Test Test/, 'subject looks okay'; -like $email->header('To'), qr/bgy\@example.com/, 'to line looks correct'; -$mech->clear_emails_ok; - -$luz_report->discard_changes; -$dps_report->discard_changes; -ok $luz_report->whensent, 'Luz report marked as sent'; -ok $dps_report->whensent, 'DPS report marked as sent'; -is $dps_report->send_method_used, 'Open311', 'DPS report sent via Open311'; -is $dps_report->external_id, 248, 'DPS report has right external ID'; - -my $fmb_test_email = 'luz_test_user@example.com'; -my $user = FixMyStreet::DB->resultset('User')->find_or_create( { email => $fmb_test_email, from_body => $luz->id, password => 'fmbsecret' } ); -ok $user, "test user does exist"; - -my $alert = FixMyStreet::DB->resultset('Alert')->find_or_create({ - user => $user, - parameter => '-0.142497580865087', - parameter2 => '51.5016605453401', - alert_type => 'local_problems', - whensubscribed => '2014-01-01 10:00:00', - confirmed => 1, - cobrand => 'fixmybarangay', -}); - -FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'fixmybarangay' ], -}, sub { - FixMyStreet::DB->resultset('AlertType')->email_alerts(); -}; - -$mech->email_count_is(1); -$email = $mech->get_email; -like $email->body, qr/The following FixMyBarangay reports/, 'Start of email looks correct'; -$mech->clear_emails_ok; - -$mech->log_out_ok; -$mech->get_ok( '/report/' . $luz_report->id ); -$mech->content_lacks( "Remove from site" ); -$mech->content_contains( "Report abuse" ); - -$mech->post_ok('/report/delete/' . $luz_report->id); -is $mech->uri->path, '/report/' . $luz_report->id, "should redirect to report page, deletion ignored"; -$luz_report->discard_changes; -is $luz_report->state, 'confirmed', 'should be confirmed'; - -$user = $mech->log_in_ok($fmb_test_email); - -FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'fixmybarangay' ], -}, sub { - $mech->get_ok( '/report/' . $luz_report->id ); -}; -$mech->content_contains( "Remove from site" ); -$mech->content_lacks( "Report abuse" ); - -$mech->form_id('remove-from-site-form'); -$mech->submit_form(); -is $mech->uri->path, '/report/' . $luz_report->id, "should redirect to report page, deletion successful"; -$luz_report->discard_changes; -is $luz_report->state, 'hidden', 'should be hidden'; - -$mech->delete_user($fmb_test_email); - -$mech->delete_body($luz); -$mech->delete_body($bsn); -$mech->delete_body($dps); - -ok $mech->host("www.fixmystreet.com"), "change host back"; - -done_testing(); diff --git a/t/cobrand/form_extras.t b/t/cobrand/form_extras.t index 9c20b7ad4..c6f6976d5 100644 --- a/t/cobrand/form_extras.t +++ b/t/cobrand/form_extras.t @@ -13,7 +13,6 @@ sub path_to_web_templates { my $self = shift; return [ FixMyStreet->path_to( 't/cobrand/form_extras/templates' )->stringify, - FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify ]; } diff --git a/t/cobrand/loading.t b/t/cobrand/loading.t index 48a10293e..b4738fb63 100644 --- a/t/cobrand/loading.t +++ b/t/cobrand/loading.t @@ -44,8 +44,8 @@ FixMyStreet::override_config { }, sub { run_host_tests( 'www.fixmystreet.com' => 'FixMyStreet', - 'reportemptyhomes.com' => 'FixMyStreet', - 'barnet.fixmystreet.com' => 'FixMyStreet', + 'fiksgatami.example.org' => 'FixMyStreet', + 'oxfordshire.fixmystreet.com' => 'FixMyStreet', 'some.odd.site.com' => 'FixMyStreet', ); }; @@ -62,49 +62,49 @@ FixMyStreet::override_config { # Couple of cobrands, hostname checking and default fallback FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'emptyhomes', 'fixmystreet' ], + ALLOWED_COBRANDS => [ 'fiksgatami', 'fixmystreet' ], }, sub { run_host_tests( 'www.fixmystreet.com' => 'FixMyStreet', - 'reportemptyhomes.com' => 'EmptyHomes', - 'barnet.fixmystreet.com' => 'FixMyStreet', # not in the allowed_cobrands list + 'fiksgatami.example.org' => 'FiksGataMi', + 'oxfordshire.fixmystreet.com' => 'FixMyStreet', # not in the allowed_cobrands list 'some.odd.site.com' => 'Default', ); }; -# now enable barnet too and check that it works +# now enable oxfordshire too and check that it works FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'emptyhomes', 'barnet', 'fixmystreet' ], + ALLOWED_COBRANDS => [ 'fiksgatami', 'oxfordshire', 'fixmystreet' ], }, sub { run_host_tests( 'www.fixmystreet.com' => 'FixMyStreet', - 'reportemptyhomes.com' => 'EmptyHomes', - 'barnet.fixmystreet.com' => 'Barnet', # found now it is in allowed_cobrands + 'fiksgatami.example.org' => 'FiksGataMi', + 'oxfordshire.fixmystreet.com' => 'Oxfordshire', # found now it is in allowed_cobrands 'some.odd.site.com' => 'Default', ); }; # And a check with some regex matching FixMyStreet::override_config { - ALLOWED_COBRANDS => [ { 'fixmystreet' => 'empty' }, 'barnet', { 'testing' => 'fixmystreet' } ], + ALLOWED_COBRANDS => [ { 'fixmystreet' => 'example' }, 'oxfordshire', { 'testing' => 'fixmystreet' } ], }, sub { run_host_tests( 'www.fixmystreet.com' => 'testing', - 'reportemptyhomes.com' => 'FixMyStreet', - 'barnet.fixmystreet.com' => 'Barnet', + 'fiksgatami.example.org' => 'FixMyStreet', + 'oxfordshire.fixmystreet.com' => 'Oxfordshire', 'some.odd.site.com' => 'Default', ); }; # check that the moniker works as expected both on class and object. -is FixMyStreet::Cobrand::EmptyHomes->moniker, 'emptyhomes', +is FixMyStreet::Cobrand::FiksGataMi->moniker, 'fiksgatami', 'class->moniker works'; -is FixMyStreet::Cobrand::EmptyHomes->new->moniker, 'emptyhomes', +is FixMyStreet::Cobrand::FiksGataMi->new->moniker, 'fiksgatami', 'object->moniker works'; # check is_default works ok FixMyStreet::Cobrand::Default->is_default, '::Default is default'; -ok !FixMyStreet::Cobrand::EmptyHomes->is_default, '::Emptyhomes is not default'; +ok !FixMyStreet::Cobrand::FiksGataMi->is_default, '::FiksGataMi is not default'; # all done done_testing(); @@ -14,11 +14,11 @@ use mySociety::Locale; die "You need to run 'commonlib/bin/gettext-makemo --quiet FixMyStreet' " . "to generate the *.mo files needed." unless -e FixMyStreet->path_to( - 'locale/cy_GB.UTF-8/LC_MESSAGES/FixMyStreet-EmptyHomes.mo'); + 'locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.mo'); # Test the language negotiation works my $lang = mySociety::Locale::negotiate_language( - 'en-gb,English,en_GB|cy,Cymraeg,cy_GB|es,Spanish,es_ES', + 'en-gb,English,en_GB|es,Spanish,es_ES', undef, HTTP::Headers->new( Accept_Language => 'es,en-gb;q=0.6,en;q=0.4' @@ -28,27 +28,26 @@ is $lang, 'es', 'Language negotiation works okay'; # Example strings my $english = "Please enter a valid email"; -my $welsh = "Cofnodwch gyfeiriad e-bost dilys"; +my $norwegian = "Legg til en gyldig e-post"; # set english as the language mySociety::Locale::negotiate_language( # - 'en-gb,English,en_GB|cy,Cymraeg,cy_GB', 'en_GB' + 'en-gb,English,en_GB|nb,Norwegian,nb_NO', 'en_GB' ); -mySociety::Locale::gettext_domain( 'FixMyStreet-EmptyHomes', 1 ); +mySociety::Locale::gettext_domain( 'FixMyStreet', 1 ); mySociety::Locale::change(); is _($english), $english, "english to english"; -# set to welsh and check for translation -mySociety::Locale::change('cy'); -is _($english), $welsh, "english to welsh"; +mySociety::Locale::change('nb'); +is _($english), $norwegian, "english to norwegian"; # check that being in a deep directory does not confuse the code chdir FixMyStreet->path_to('t/app/controller') . ''; -mySociety::Locale::gettext_domain( 'FixMyStreet-EmptyHomes', 1, +mySociety::Locale::gettext_domain( 'FixMyStreet', 1, FixMyStreet->path_to('locale')->stringify ); -mySociety::Locale::change('cy'); -is _($english), $welsh, "english to welsh (deep directory)"; +mySociety::Locale::change('nb'); +is _($english), $norwegian, "english to norwegian (deep directory)"; # test that sorting works as expected in the right circumstances... my @random_sorted = qw( Ã… Z Ø A ); @@ -59,7 +58,7 @@ my @default_sorted = qw( A Z Ã… Ø ); SKIP: { mySociety::Locale::negotiate_language( # - 'en-gb,English,en_GB|cy,Cymraeg,cy_GB', 'en_GB' + 'en-gb,English,en_GB', 'en_GB' ); mySociety::Locale::change(); @@ -82,7 +81,7 @@ SKIP: { skip 'Will not pass on Mac', 2 if $^O eq 'darwin'; mySociety::Locale::negotiate_language( # - 'en-gb,English,en_GB|cy,Cymraeg,cy_GB', 'en_GB' + 'en-gb,English,en_GB', 'en_GB' ); mySociety::Locale::change(); use locale; diff --git a/templates/email/barnet/site-name.txt b/templates/email/barnet/site-name.txt deleted file mode 100644 index 78563bdf3..000000000 --- a/templates/email/barnet/site-name.txt +++ /dev/null @@ -1 +0,0 @@ -Barnet Council FixMyStreet diff --git a/templates/email/emptyhomes/cy/alert-confirm.txt b/templates/email/emptyhomes/cy/alert-confirm.txt deleted file mode 100644 index 9be79a952..000000000 --- a/templates/email/emptyhomes/cy/alert-confirm.txt +++ /dev/null @@ -1,15 +0,0 @@ -Subject: Cadarnhau eich rhybudd ar reportemptyhomes.com - -Helo, - -Cliciwch ar y ddolen isod i gadarnhau'r rhybudd yr ydych newydd -ofyn am danysgrifio iddo ar Asiantaeth Tai Gwag: - - [% token_url %] - -Os na allwch glicio ar y ddolen, dylech ei chopïo a'i gludo ym -mar cyfeiriad eich porwr gwe. - -Yn gywir, -Tîm yr Asiantaeth Tai Gwag - diff --git a/templates/email/emptyhomes/cy/alert-problem-area.txt b/templates/email/emptyhomes/cy/alert-problem-area.txt deleted file mode 100644 index c7712f62f..000000000 --- a/templates/email/emptyhomes/cy/alert-problem-area.txt +++ /dev/null @@ -1,13 +0,0 @@ -Subject: Adroddiadau newydd am eiddo gwag yn ardal <?=$values['area_name']?> ar reportemptyhomes.com - -Mae'r eiddo gwag canlynol wedi cael eu hychwanegu yn ardal -<?=$values['area_name']?>: - -<?=$values['data']?> - -Yn gywir, -reportemptyhomes.com - -I roi'r gorau i dderbyn negeseuon e-bost pan fydd eiddo newydd yn ymddangos yn ardal -<?=$values['area_name']?>, dilynwch y ddolen hon: -<?=$values['unsubscribe_url']?> diff --git a/templates/email/emptyhomes/cy/alert-problem-council.txt b/templates/email/emptyhomes/cy/alert-problem-council.txt deleted file mode 100644 index 678e3fa9f..000000000 --- a/templates/email/emptyhomes/cy/alert-problem-council.txt +++ /dev/null @@ -1,12 +0,0 @@ -Subject: Adroddiadau newydd am eiddo gwag a hysbyswyd i ardal <?=$values['area_name']?> ar reportemptyhomes.com - -Mae'r eiddo gwag canlynol wedi cael eu hysbysu i ardal <?=$values['area_name']?>: - -<?=$values['data']?> - -Yn gywir, -reportemptyhomes.com - -I roi'r gorau i dderbyn negeseuon e-bost pan gaiff eiddo gwag newydd eu hysbysu i ardal -<?=$values['area_name']?>, dilynwch y ddolen hon: -<?=$values['unsubscribe_url']?> diff --git a/templates/email/emptyhomes/cy/alert-problem-nearby.txt b/templates/email/emptyhomes/cy/alert-problem-nearby.txt deleted file mode 100644 index b72d68979..000000000 --- a/templates/email/emptyhomes/cy/alert-problem-nearby.txt +++ /dev/null @@ -1,11 +0,0 @@ -Subject: Eiddo gwag cyfagos newydd ar reportemptyhomes.com - -Mae'r eiddo gwag cyfagos newydd wedi cael eu hychwanegu: - -<?=$values['data']?> - -Yn gywir, -reportemptyhomes.com - -I roi'r gorau i dderbyn negeseuon e-bost pan fydd eiddo gerllaw, -dilynwch y ddolen hon: <?=$values['unsubscribe_url']?> diff --git a/templates/email/emptyhomes/cy/alert-problem-ward.txt b/templates/email/emptyhomes/cy/alert-problem-ward.txt deleted file mode 100644 index 603c55fa0..000000000 --- a/templates/email/emptyhomes/cy/alert-problem-ward.txt +++ /dev/null @@ -1,13 +0,0 @@ -Subject: Adroddiadau newydd am eiddo gwag a hysbyswyd i ardal <?=$values['area_name']?>, yn ward <?=$values['ward_name']?> ar reportemptyhomes.com - -Mae'r eiddo gwag canlynol wedi cael eu hysbysu i ardal <?=$values['area_name']?>, -o fewn ward <?=$values['ward_name']?>: - -<?=$values['data']?> - -Yn gywir, -reportemptyhomes.com - -I roi'r gorau i dderbyn negeseuon e-bost pan gaiff eiddo newydd eu hysbysu i ardal -<?=$values['area_name']?>, o fewn ward <?=$values['ward_name']?>, -dilynwch y ddolen hon: <?=$values['unsubscribe_url']?> diff --git a/templates/email/emptyhomes/cy/alert-problem.txt b/templates/email/emptyhomes/cy/alert-problem.txt deleted file mode 100644 index a2c56cf52..000000000 --- a/templates/email/emptyhomes/cy/alert-problem.txt +++ /dev/null @@ -1,11 +0,0 @@ -Subject: Adroddiadau newydd am eiddo gwag ar reportemptyhomes.com - -Mae'r eiddo gwag canlynol wedi cael eu hychwanegu: - -<?=$values['data']?> - -Yn gywir, -reportemptyhomes.com - -I roi'r gorau i dderbyn negeseuon e-bost pan fydd eiddo newydd yn ymddangos, -dilynwch y ddolen hon: <?=$values['unsubscribe_url']?> diff --git a/templates/email/emptyhomes/cy/alert-update.txt b/templates/email/emptyhomes/cy/alert-update.txt deleted file mode 100644 index 9a80d55c5..000000000 --- a/templates/email/emptyhomes/cy/alert-update.txt +++ /dev/null @@ -1,13 +0,0 @@ -Subject: Diweddariadau newydd am eiddo gwag - '<?=$values['title']?>' - -Mae'r diweddariadau canlynol wedi cael eu gadael am yr eiddo gwag hwn: - -<?=$values['data']?> - -Gweld y diweddariadau hyn neu eu hateb: <?=$values['problem_url']?> - -Yn gywir, -reportemptyhomes.com - -I roi'r gorau i dderbyn negeseuon e-bost pan fydd diweddariadau newydd yn ymddangos am yr eiddo hwn, -dilynwch y ddolen hon: <?=$values['unsubscribe_url']?> diff --git a/templates/email/emptyhomes/cy/partial.txt b/templates/email/emptyhomes/cy/partial.txt deleted file mode 100644 index 0692e2548..000000000 --- a/templates/email/emptyhomes/cy/partial.txt +++ /dev/null @@ -1,16 +0,0 @@ -Subject: Eich adroddiad newydd ar reportemptyhomes.com - -Helo[% report.name || report.email %], - -Rydym wedi storio'r adroddiad y gwnaethoch ei lwytho i'r Asiantaeth Tai Gwag -drwy gyfrwng -[% report.service %]. I gadarnhau'r manylion sydd gennym, -ac i ychwanegu atynt, ewch i'r URL canlynol: - -[% token_url %] - -Yna, gallwn anfon eich adroddiad at y cyngor. Diolch! - -Yn gywir, -Tîm yr Asiantaeth Tai Gwag - diff --git a/templates/email/emptyhomes/cy/problem-confirm.txt b/templates/email/emptyhomes/cy/problem-confirm.txt deleted file mode 100644 index a9f1b021d..000000000 --- a/templates/email/emptyhomes/cy/problem-confirm.txt +++ /dev/null @@ -1,21 +0,0 @@ -Subject: Cadarnhau eich adroddiad am eiddo gwag - -Helo [% report.user.name %], - -Cliciwch ar y ddolen isod i gadarnhau'r adroddiad am eiddo gwag -yr ydych newydd ei ychwanegu at y safle: - -[% token_url %] - -Os nad yw eich rhaglen e-bost yn gadael i chi glicio ar y ddolen hon, -dylech ei chopïo a'i gludo i'ch porwr gwe a phwyso'r fysell 'return'. - -Roedd gan eich adroddiad y pwnc: -[% report.title %] - -A'r manylion: -[% report.detail %] - -Yn gywir, -reportemptyhomes.com - diff --git a/templates/email/emptyhomes/cy/questionnaire-26weeks.txt b/templates/email/emptyhomes/cy/questionnaire-26weeks.txt deleted file mode 100644 index b2b40ac80..000000000 --- a/templates/email/emptyhomes/cy/questionnaire-26weeks.txt +++ /dev/null @@ -1,25 +0,0 @@ -Subject: Holiadur ar eich adroddiad am eiddo gwag - -Helo <?=$values['name']?>, - -Chwe mis yn ôl, fe wnaethoch adrodd am eiddo gwag ar ReportEmptyHomes.com gan roi'r -manylion sydd wedi'u cynnwys ar ddiwedd y neges e-bost hon. Er mwyn cadw'n safle'n gyfredol -ac yn berthnasol, byddwn yn ddiolchgar petaech yn llenwi'r holiadur byr hwn er mwyn -dweud wrthom ni beth sydd wedi digwydd: - - <?=$values['url']?> - -Peidiwch ag ateb y neges hon; mae blwch sylwadau cyhoeddus -ar yr holiadur. - -Yn gywir, -reportemptyhomes.com - -Roedd eich adroddiad fel a ganlyn: - -<?=$values['title']?> - -Math o eiddo: <?=$values['category']?> - -<?=$values['detail']?> - diff --git a/templates/email/emptyhomes/cy/questionnaire-4weeks.txt b/templates/email/emptyhomes/cy/questionnaire-4weeks.txt deleted file mode 100644 index c4c9d80aa..000000000 --- a/templates/email/emptyhomes/cy/questionnaire-4weeks.txt +++ /dev/null @@ -1,25 +0,0 @@ -Subject: Holiadur ar eich adroddiad am eiddo gwag - -Helo <?=$values['name']?>, - -Bedair wythnos yn ôl, fe wnaethoch adrodd am eiddo gwag ar ReportEmptyHomes.com gan roi'r -manylion sydd wedi'u cynnwys ar ddiwedd y neges e-bost hon. Er mwyn cadw'n safle'n gyfredol -ac yn berthnasol, byddwn yn ddiolchgar petaech yn gallu llenwi'r holiadur byr hwn -i ddweud wrthom beth sydd wedi digwydd: - - <?=$values['url']?> - -Peidiwch ag ateb y neges e-bost hon; mae blwch sylwadau cyhoeddus -ar yr holiadur. - -Yn gywir, -reportemptyhomes.com - -Roedd eich adroddiad fel a ganlyn: - -<?=$values['title']?> - -Math o eiddo: <?=$values['category']?> - -<?=$values['detail']?> - diff --git a/templates/email/emptyhomes/cy/submit.txt b/templates/email/emptyhomes/cy/submit.txt deleted file mode 100644 index 061758d12..000000000 --- a/templates/email/emptyhomes/cy/submit.txt +++ /dev/null @@ -1,39 +0,0 @@ -Subject: Adroddiad am eiddo gwag - -Annwyl Swyddog Eiddo Gwag, - -Dyma gyfeiriad newydd am eiddo gwag yn eich ardal, a wnaed gan ddefnyddiwr -gwefan ReportEmptyHomes.com; dywedwyd wrth ddefnyddiwr y wefan fod yr achos -wedi cael ei gyfeirio atoch. Byddem yn ddiolchgar petaech yn gwneud yr hyn y -gallwch i helpu adfer yr eiddo hwn i'w ddefnyddio eto. - -<?=$values['url']?> - -<?=$values['has_photo']?>Os hoffech gael help neu gyngor ar gael eiddo gwag yn -ôl mewn defnydd mae llawer o wybodaeth ddefnyddiol ar wefan yr Asiantaeth Tai -Gwag www.EmptyHomes.com - os oes gennych unrhyw gwestiynau eraill, rhowch alwad -i ni. - ----------- - -Enw: <?=$values['name']?> - -E-bost: <?=$values['email']?> - -<?=$values['phone_line']?>Pwnc: <?=$values['title']?> - -Math o eiddo: <?=$values['category']?> - -Address: <?=$values['address']?> - -Manylion: <?=$values['detail']?> - -<?=$values['closest_address']?>---------- - -Bydd ymatebion i'r neges e-bost hon yn mynd at y defnyddiwr a gyflwynodd yr -adroddiad, os hoffech ofyn am fwy o wybodaeth. - -Yn gywir, -reportemptyhomes.com - - diff --git a/templates/email/emptyhomes/cy/update-confirm.txt b/templates/email/emptyhomes/cy/update-confirm.txt deleted file mode 100644 index 655844adf..000000000 --- a/templates/email/emptyhomes/cy/update-confirm.txt +++ /dev/null @@ -1,18 +0,0 @@ -Subject: Cadarnhewch eich diweddariad ar reportemptyhomes.com - -Helo [% update.user.name %], - -Cliciwch ar y ddolen isod i gadarnhau'r diweddariad yr ydych newydd ei -ysgrifennu: - -[% token_url %] - -Os nad ydych yn gallu clicio ar y ddolen, dylech ei chopïo a'i gludo -ym mar cyfeiriad eich porwr gwe. - -Mae eich diweddariad yn darllen fel a ganlyn: - -[% update.text %] - -Yn gywir, -Tîm yr Asiantaeth Tai Gwag diff --git a/templates/email/emptyhomes/en-gb/alert-confirm.txt b/templates/email/emptyhomes/en-gb/alert-confirm.txt deleted file mode 100644 index 31952be28..000000000 --- a/templates/email/emptyhomes/en-gb/alert-confirm.txt +++ /dev/null @@ -1,14 +0,0 @@ -Subject: Confirm your alert on reportemptyhomes.com - -Hi, - -Please click on the link below to confirm the alert you just -asked to subscribe to on reportemptyhomes.com: - - [% token_url %] - -If you can't click the link, please copy and paste it to the -address bar of your web browser. - -Yours, -The reportemptyhomes.com team diff --git a/templates/email/emptyhomes/en-gb/alert-problem-area.txt b/templates/email/emptyhomes/en-gb/alert-problem-area.txt deleted file mode 100644 index 0fb11665c..000000000 --- a/templates/email/emptyhomes/en-gb/alert-problem-area.txt +++ /dev/null @@ -1,13 +0,0 @@ -Subject: New empty properties in <?=$values['area_name']?> on reportemptyhomes.com - -The following empty properties have been added within -<?=$values['area_name']?>: - -<?=$values['data']?> - -Yours, -reportemptyhomes.com - -To stop receiving emails when there are new properties in -<?=$values['area_name']?>, please follow this link: -<?=$values['unsubscribe_url']?> diff --git a/templates/email/emptyhomes/en-gb/alert-problem-council.txt b/templates/email/emptyhomes/en-gb/alert-problem-council.txt deleted file mode 100644 index 6c2d5b55c..000000000 --- a/templates/email/emptyhomes/en-gb/alert-problem-council.txt +++ /dev/null @@ -1,12 +0,0 @@ -Subject: New empty properties reported to <?=$values['area_name']?> on reportemptyhomes.com - -The following empty properties have been reported to <?=$values['area_name']?>: - -<?=$values['data']?> - -Yours, -reportemptyhomes.com - -To stop receiving emails when there are new properties reported to -<?=$values['area_name']?>, please follow this link: -<?=$values['unsubscribe_url']?> diff --git a/templates/email/emptyhomes/en-gb/alert-problem-nearby.txt b/templates/email/emptyhomes/en-gb/alert-problem-nearby.txt deleted file mode 100644 index abe027d20..000000000 --- a/templates/email/emptyhomes/en-gb/alert-problem-nearby.txt +++ /dev/null @@ -1,11 +0,0 @@ -Subject: New nearby empty properties on reportemptyhomes.com - -The following nearby empty properties have been added: - -<?=$values['data']?> - -Yours, -reportemptyhomes.com - -To stop receiving emails when there are nearby properties, -please follow this link: <?=$values['unsubscribe_url']?> diff --git a/templates/email/emptyhomes/en-gb/alert-problem-ward.txt b/templates/email/emptyhomes/en-gb/alert-problem-ward.txt deleted file mode 100644 index 14dabc386..000000000 --- a/templates/email/emptyhomes/en-gb/alert-problem-ward.txt +++ /dev/null @@ -1,13 +0,0 @@ -Subject: New empty properties reported to <?=$values['area_name']?> within <?=$values['ward_name']?> on reportemptyhomes.com - -The following empty properties have been reported to <?=$values['area_name']?> -within <?=$values['ward_name']?>: - -<?=$values['data']?> - -Yours, -reportemptyhomes.com - -To stop receiving emails when there are new properties reported to -<?=$values['area_name']?> within <?=$values['ward_name']?>, -please follow this link: <?=$values['unsubscribe_url']?> diff --git a/templates/email/emptyhomes/en-gb/alert-problem.txt b/templates/email/emptyhomes/en-gb/alert-problem.txt deleted file mode 100644 index 30dc10c42..000000000 --- a/templates/email/emptyhomes/en-gb/alert-problem.txt +++ /dev/null @@ -1,11 +0,0 @@ -Subject: New empty properties on reportemptyhomes.com - -The following empty properties have been added: - -<?=$values['data']?> - -Yours, -reportemptyhomes.com - -To stop receiving emails when there are new properties, -please follow this link: <?=$values['unsubscribe_url']?> diff --git a/templates/email/emptyhomes/en-gb/alert-update.txt b/templates/email/emptyhomes/en-gb/alert-update.txt deleted file mode 100644 index 9ae295b3e..000000000 --- a/templates/email/emptyhomes/en-gb/alert-update.txt +++ /dev/null @@ -1,13 +0,0 @@ -Subject: New updates on empty property- '<?=$values['title']?>' - -The following updates have been left on this empty property: - -<?=$values['data']?> - -View or reply to these updates: <?=$values['problem_url']?> - -Yours, -reportemptyhomes.com - -To stop receiving emails when there are new updates on this property, -please follow this link: <?=$values['unsubscribe_url']?> diff --git a/templates/email/emptyhomes/en-gb/contact.txt b/templates/email/emptyhomes/en-gb/contact.txt deleted file mode 100644 index 446265517..000000000 --- a/templates/email/emptyhomes/en-gb/contact.txt +++ /dev/null @@ -1,5 +0,0 @@ -Subject: reportemptyhomes.com message: [% subject %] - -[% message %] - -[ Sent by contact.cgi on [% host %]. IP address [% ip %] ] diff --git a/templates/email/emptyhomes/en-gb/partial.txt b/templates/email/emptyhomes/en-gb/partial.txt deleted file mode 100644 index 0ec2d4b68..000000000 --- a/templates/email/emptyhomes/en-gb/partial.txt +++ /dev/null @@ -1,14 +0,0 @@ -Subject: Confirm your report on reportemptyhomes.com - -Hi [% report.name || report.email %], - -To confirm the report you have uploaded to reportemptyhomes.com via -[% report.service %], and to check or add any details, -please visit the following URL: - -[% token_url %] - -Thanks! - -Yours, -The reportemptyhomes.com team diff --git a/templates/email/emptyhomes/en-gb/problem-confirm.txt b/templates/email/emptyhomes/en-gb/problem-confirm.txt deleted file mode 100644 index f8ff3e7ca..000000000 --- a/templates/email/emptyhomes/en-gb/problem-confirm.txt +++ /dev/null @@ -1,20 +0,0 @@ -Subject: Confirm your empty property report - -Hi [% report.user.name %], - -Please click on the link below to confirm the empty property -report you just added to the site: - -[% token_url %] - -If your email program does not let you click on this link, -copy and paste it into your web browser and press return. - -Your report had the subject: -[% report.title %] - -And details: -[% report.detail %] - -Yours, -reportemptyhomes.com diff --git a/templates/email/emptyhomes/en-gb/questionnaire-26weeks.txt b/templates/email/emptyhomes/en-gb/questionnaire-26weeks.txt deleted file mode 100644 index 30fd4a874..000000000 --- a/templates/email/emptyhomes/en-gb/questionnaire-26weeks.txt +++ /dev/null @@ -1,33 +0,0 @@ -Subject: Questionnaire about your empty property report - -Hi <?=$values['name']?>, - -Getting empty homes back into use can be difficult, properties can -remain empty for many months if the owner is unwilling or the property -is in very poor repair. If nothing has happened or you are not satisfied -with the progress the council is making, now is the right time to say -so. We think it's a good idea to contact some other people who may be -able to help or put pressure on the council For advice on how to do this -and other useful information please go to http://www.emptyhomes.com - -Over six months ago, you reported an empty home on ReportEmptyHomes.com -with the details provided at the end of this email. To keep our site up -to date and relevant, I'd be grateful if you could fill in this short -questionnaire to tell us what has happened: - - <?=$values['url']?> - -Please do not reply to this email; there is a public comment -box on the questionnaire. - -Yours, -reportemptyhomes.com - -Your report was as follows: - -<?=$values['title']?> - -Property type: <?=$values['category']?> - -<?=$values['detail']?> - diff --git a/templates/email/emptyhomes/en-gb/questionnaire-4weeks.txt b/templates/email/emptyhomes/en-gb/questionnaire-4weeks.txt deleted file mode 100644 index f66e9af5e..000000000 --- a/templates/email/emptyhomes/en-gb/questionnaire-4weeks.txt +++ /dev/null @@ -1,32 +0,0 @@ -Subject: Questionnaire about your empty property report - -Hi <?=$values['name']?>, - -Getting empty homes back into use can be difficult. -If you are not satisfied with progress or information from the council, -now is the right time to say. You may also want to try contacting some -other people who may be able to help. For advice on how to do this and -other useful information please go to -http://www.emptyhomes.com - -Over four weeks ago, you reported an empty home on ReportEmptyHomes.com -with the details provided at the end of this email. To keep our site up -to date and relevant, I'd be grateful if you could fill in this short -questionnaire to tell us what has happened: - - <?=$values['url']?> - -Please do not reply to this email; there is a public comment -box on the questionnaire. - -Yours, -reportemptyhomes.com - -Your report was as follows: - -<?=$values['title']?> - -Property type: <?=$values['category']?> - -<?=$values['detail']?> - diff --git a/templates/email/emptyhomes/en-gb/submit.txt b/templates/email/emptyhomes/en-gb/submit.txt deleted file mode 100644 index 2256732d5..000000000 --- a/templates/email/emptyhomes/en-gb/submit.txt +++ /dev/null @@ -1,37 +0,0 @@ -Subject: Empty property report - -Dear Empty Property Officer, - -This is a new referral of an empty property in your area made by a user of the -website ReportEmptyHomes.com; the website user has been told that the case has -been referred to you. We would be grateful if you could do whatever you can to -help get this property back into use. - -<?=$values['url']?> - -<?=$values['has_photo']?>If you would like help or advice on getting empty properties back into use -there is lots of useful information on the Empty Homes Agency's website -www.EmptyHomes.com - if you have further questions please give us a call. - ----------- - -Name: <?=$values['name']?> - -Email: <?=$values['email']?> - -<?=$values['phone_line']?>Subject: <?=$values['title']?> - -Property type: <?=$values['category']?> - -Address: <?=$values['address']?> - -Details: <?=$values['detail']?> - -<?=$values['closest_address']?>---------- - -Replies to this email will go to the user who submitted the report, if -you would like to ask for any further information. - -Yours, -reportemptyhomes.com - diff --git a/templates/email/emptyhomes/en-gb/update-confirm.txt b/templates/email/emptyhomes/en-gb/update-confirm.txt deleted file mode 100644 index 8facbcf07..000000000 --- a/templates/email/emptyhomes/en-gb/update-confirm.txt +++ /dev/null @@ -1,17 +0,0 @@ -Subject: Confirm your update on reportemptyhomes.com - -Hi [% update.user.name %], - -Please click on the link below to confirm the update you just wrote: - -[% token_url %] - -If your email program does not let you click on this link, -copy and paste it into your web browser and press return. - -Your update reads: - -[% update.text %] - -Yours, -The reportemptyhomes.com team diff --git a/templates/email/fixmybarangay/login.txt b/templates/email/fixmybarangay/login.txt deleted file mode 100644 index 3ca8d1323..000000000 --- a/templates/email/fixmybarangay/login.txt +++ /dev/null @@ -1,14 +0,0 @@ -Subject: [% loc('Your FixMyBarangay.com account details') %] - -Please click on the link below to confirm your email address. Then you will be -able to view your problem reports and manage them more easily. - -[% c.uri_for_action( 'auth/token', token ) %] - -Note that your can't create new reports on FixMyBarangay unless your account has -been authorised as a staff account, which we can do after it has been created. -Get in touch with the team if you think this applies to you, and we haven't yet -authorised your account. - -[% INCLUDE 'signature.txt' %] - diff --git a/templates/email/fixmybarangay/signature.txt b/templates/email/fixmybarangay/signature.txt deleted file mode 100644 index eb5000f58..000000000 --- a/templates/email/fixmybarangay/signature.txt +++ /dev/null @@ -1,2 +0,0 @@ -Yours, -The FixMyBarangay team diff --git a/templates/email/fixmybarangay/site-name.txt b/templates/email/fixmybarangay/site-name.txt deleted file mode 100644 index 075d881b5..000000000 --- a/templates/email/fixmybarangay/site-name.txt +++ /dev/null @@ -1 +0,0 @@ -FixMyBarangay diff --git a/templates/email/zerotb/alert-update.txt b/templates/email/zerotb/alert-update.txt deleted file mode 100644 index ee32524f9..000000000 --- a/templates/email/zerotb/alert-update.txt +++ /dev/null @@ -1,9 +0,0 @@ -Subject: New stockout report for Clinic - '<?=$values['title']?>' - -The following stockouts have been reported for this clinic: - -<?=$values['data']?> - -You cannot contact anyone by replying to this email. - -<?=$values['signature']?> diff --git a/templates/web/angus/header.html b/templates/web/angus/header.html index d1a40574e..a7199949d 100644 --- a/templates/web/angus/header.html +++ b/templates/web/angus/header.html @@ -26,7 +26,7 @@ <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> <script src="[% version('/cobrands/angus/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + [% INCLUDE 'common_header_tags.html' %] [% extra_js %] [% IF c.req.uri.host == 'osm.fixmystreet.com' %] diff --git a/templates/web/barnet/about/faq-en-gb.html b/templates/web/barnet/about/faq-en-gb.html deleted file mode 100755 index bc381a509..000000000 --- a/templates/web/barnet/about/faq-en-gb.html +++ /dev/null @@ -1,103 +0,0 @@ -[% INCLUDE 'header.html', title = 'Help', bodyclass = 'twothirdswidthpage' %] - -<h1>Frequently Asked Questions</h1> - -<p>These pages are for reporting things which are broken or dirty or damaged or dumped, and need fixing, cleaning or clearing, such as:</p> - <ul><li>abandoned vehicles - <li>flyposting or graffiti - <li>flytipping or litter - <li>streetcleaning, such as broken glass in a cycle lane - <li>unlit lampposts - <li>broken playground equipment - <li>potholes - </ul> - -<dl> - <dt>What issues can’t be reported here?</dt> - <dd><p>It is not a way of reporting all issues. Problems such as:</p> - <ul> - <li>missed rubbish or recycling collections - <li>anti-social behaviour - <li>noise pollution or barking dogs - <li>fires and smoke/smell pollution - <li>proposals for speed bumps/ CCTV/ pedestrian crossings/ new road layouts/ etc. - <li>complaining about your neighbours - <li>complaining or commenting about the council - </ul> - </dd> - - <dt>How do I report a problem here?</dt> - <dd>After entering a postcode or location, you are shown -a map of that area. You can view problems already reported in that area, -or report ones of your own by clicking on the map at the location of -the problem.</dd> - <dt>How are the problems solved?</dt> - <dd>They are reported directly to us so we can then resolve the problem. - You can also discuss the problem on the website with others if you wish.</dd> - - <dt>Do you remove silly or illegal content?</dt> - <dd>Barnet Council and FixMyStreet are not responsible for the content and accuracy -of material submitted by their users. We reserve the right to edit or remove any -problems or updates which we consider to be inappropriate upon being informed -by a user of the site.</dd> - - <dt>Can I use FixMyStreet on my mobile?</dt> - <dd>Yes a special mobile friendly version is available to report problem in Barnet’s streets or parks. - </dd> - - <dt>Can I use these pages to report problems outside of the London Borough of Barnet?</dd> - <dd>No, please visit the main FixMyStreet site at <a href="https://www.fixmystreet.com/">https://www.fixmystreet.com/</a> to report problem outside the borough.</dd> - - <dt>Who built FixMyStreet?</dt> - <dd>FixMyStreet was built by <a href="http://www.mysociety.org/">mySociety</a>, in conjunction with the <a href="http://www.youngfoundation.org.uk/">Young Foundation</a>. -mySociety is the project of a registered charity which has grown out of the community of -volunteers who built sites like <a href="http://www.theyworkforyou.com/">TheyWorkForYou</a>. -mySociety’s primary mission is to build Internet projects which give people simple, tangible -benefits in the civic and community aspects of their lives. Our first project -was <a href="http://www.writetothem.com/">WriteToThem</a>, where you can write to any of your -elected representatives, for free. The charity is called UK Citizens Online Democracy and is charity number 1076346. mySociety -can be contacted by email at <a href="mailto:hello@mysociety.org">hello@mysociety.org</a>, -or by post at: mySociety, 483 Green Lanes, London, N13 4BS, UK.</dd> - - <dt>Why does the site use kilometres for measurements?</dt> - <dd>The British national - grid reference system, devised by Ordnance Survey (the British national - mapping agency) around the time of the second world war, uses eastings and - northings measured in metres and kilometres; the maps we use are from - Ordnance Survey and so this is what we use to display distances. - There you have it: not everything British is in miles!</dd> - - <dt>Why can’t I zoom out more on the reporting map?</dt> - <dd>We want to keep reports locally focused, so we restrict the ability to - move radically between areas. The map on <a href="/my">Your Reports</a> will let you see all - the reports you’ve made, wherever they are.</dd> - - <dt>Who gets to see my email address?</dt> - <dd>If you submit a problem, your details, and details - of the problem, will be submitted to Barnet Council. -Other than the council, only people we authorise to view the FixMyStreet administration interface -will be able to see your email address and they will never use it for anything other than -to help administer FixMyStreet. We will never give or sell your email address to anyone else, -unless we are obliged to by law. Your name will not be published anywhere unless you let us.</dd> - - <dt>What emails will you send to me?</dt> - <dd>We will email you if someone leaves an update on a -problem you’ve reported, and send you a questionnaire email four weeks -after you submit a problem, asking for a status update; we’ll only ever -send you emails in relation to your problem.</dd> - - <dt>I’d like a site like this for my own location/ where’s the "source code" to this site?</dt> - <dd> -The software behind this site is open source, and available -to you mainly under the GNU Affero GPL software license. You can <a -href="http://github.com/mysociety/fixmystreet">download the -source code</a> and help us develop it. -You’re welcome to use it in your own projects, although you must also -make available the source code to any such projects. -<a href="http://www.fiksgatami.no/">Fiksgatami</a> is an example of our code -being used in a Norwegian version of this site. -</dd> - - </dl> - -[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/barnet/footer.html b/templates/web/barnet/footer.html deleted file mode 100644 index e5f8739b4..000000000 --- a/templates/web/barnet/footer.html +++ /dev/null @@ -1,80 +0,0 @@ - <p id="barnet-powered-by" class="desk-only"> - <a href="https://www.fixmystreet.com/council">Powered by <img src="/cobrands/barnet/img/fms-logo.png" style="height:20px;"></a> - </p> - </div><!-- .content role=main --> - </div><!-- .container --> - </div><!-- .table-cell --> - - <div class="nav-wrapper"> - <div class="nav-wrapper-2"> - <div id="main-nav" role="navigation"> - <ul class="nav-menu nav-menu--mysoc"> - <li><a href="https://www.fixmystreet.com/council">Powered by <img src="/cobrands/barnet/img/fms-logo.png" style="height:20px;"></a></li> - </ul> - <ul class="nav-menu nav-menu--main"> - <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn" - >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/my' %]span[% ELSE %]a href="/my"[% END - %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/reports/Barnet' %]span[% ELSE %]a href="/reports/Barnet"[% END - %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END - %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END - %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li> - </ul> - </div> - </div> - </div> - - </div> <!-- .wrapper --> -</div> -</div> -</div> - -<!-- googleoff: index --> - <div id="column_nav"> - <div class="navigation active"> - <h2><a href="/">FixMyStreet</a></h2> - <ul> - <li>[% c.req.uri.path == '/' ? '<strong>Report a problem</strong>' : '<a href="/">Report a problem</a>' %]</li> - <li>[% c.req.uri.path == '/reports/Barnet' ? '<strong>All reports</strong>' : '<a href="/reports/Barnet">All reports</a>' %]</li> - <li>[% c.req.uri.path == '/alert' ? '<strong>Local alerts</strong>' : '<a href="/alert">Local alerts</a>' %]</li> - <li class="lastItem">[% c.req.uri.path == '/faq' ? '<strong>Help</strong>' : '<a href="/faq">Help</a>' %]</li> - </ul> - </div> - <div class="clear"></div> - </div> - <div class="clear"></div> - <div id="footer"> - <p class="addNav"> - <a href="http://www.barnet.gov.uk/copyright">Copyright</a> | <a href="http://www.barnet.gov.uk/privacy">Privacy notice</a> | <a accesskey="0" href="http://www.barnet.gov.uk/accessibility">Accessibility</a> | <a accesskey="8" href="http://www.barnet.gov.uk/terms">Disclaimer</a> | <a accesskey="3" href="http://www.barnet.gov.uk/site_map">Sitemap</a> | <a href="http://www.barnet.gov.uk/contact">Contact us</a> | <a accesskey="6" href="http://www.barnet.gov.uk/a_to_z">A - Z</a> - </p> - <p class="assocLinks"> - <a id="goto_browsealoud" href="http://www.browsealoud.co.uk" title="BrowseAloud"><span class="hidden">BrowseAloud</span></a> - <a id="goto_directgov" href="http://www.direct.gov.uk" title="DirectGov"><span class="hidden">DirectGov</span></a> - <a class="external_link" id="share_facebook" href="http://www.facebook.com/barnetcouncil" title="London Borough of Barnet on Facebook"><span class="hidden">Facebook</span></a> - <a class="external_link" id="share_twitter" href="http://www.twitter.com/barnetcouncil" title="London Borough of Barnet on Twitter"><span class="hidden">Twitter</span></a> - <a class="external_link" id="share_youtube" href="http://www.youtube.com/Barnetcouncil1" title="London Borough of Barnet on YouTube"><span class="hidden">YouTube</span></a> - <a class="external_link" id="share_flickr" href="http://www.flickr.com/photos/barnetcouncil" title="London Borough of Barnet on Flickr"><span class="hidden">Flickr</span></a> - <a class="external_link" id="share_sharethis" href="http://www.sharethis.com/barnetcouncil" title="London Borough of Barnet on ShareThis"><span class="hidden">ShareThis</span></a> - </p> - <div class="clear"></div> - <p class="hidden"> - <a accesskey="1" href="http://www.barnet.gov.uk">Homepage</a> - <a accesskey="2" href="http://www.barnet.gov.uk/whats_new" rel="nofollow">What's new</a> - <a accesskey="4" href="http://www.barnet.gov.uk/site_search" rel="nofollow">Search facility </a> - <a accesskey="5" href="http://www.barnet.gov.uk/faqs" rel="nofollow">Frequently asked questions</a> - <a accesskey="9" href="http://www.barnet.gov.uk/feedback" rel="nofollow">Feedback</a> - <a accesskey="/" href="#mast" rel="nofollow">Top of the page</a> - <a accesskey="s" href="#content" rel="nofollow">Skip to content</a> - <a accesskey="n" href="#column_nav" rel="nofollow">Skip to main navigation</a> - </p> - <div id="bottomBar"> - </div> - </div> -<!-- googleon: index --> -</div> -</div> - </body> -</html> diff --git a/templates/web/barnet/header.html b/templates/web/barnet/header.html deleted file mode 100644 index bb89483cb..000000000 --- a/templates/web/barnet/header.html +++ /dev/null @@ -1,96 +0,0 @@ -<!doctype html> -<!--[if lt IE 7]><html class="no-js ie6 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 7]> <html class="no-js ie7 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 8]> <html class="no-js ie8 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 9]> <html class="no-js ie9" lang="[% lang_code %]"><![endif]--> -<!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> - <head> - <meta name="viewport" content="initial-scale=1.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> - <meta name="HandHeldFriendly" content="true"> - <meta name="mobileoptimized" content="0"> - - <link rel="ToC" href="http://www.barnet.gov.uk/site_map" /> - <meta name="Keywords" content="fixmystreet barnet pothole streetlights report street problem" /> - <meta name="Description" content="FixMyStreet Barnet: report problems in Barnet like graffiti, fly tipping, broken paving slabs, or street lighting" /> - - <link rel="Shortcut Icon" type="image/x-icon" href="/cobrands/barnet/img/favicon.ico" /> - - <link rel="stylesheet" href="[% version('/cobrands/barnet/base.css') %]"> - <link rel="stylesheet" href="[% version('/cobrands/barnet/layout.css') %]" media="(min-width:48em)"> - <link rel="stylesheet" href="[% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]"> - <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/barnet/layout.css') %]"> - <![endif]--> - <link rel="stylesheet" href="[% version('/cobrands/barnet/barnet.css') %]" media="(min-width:48em)"> - <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/barnet/barnet.css') %]"> - <![endif]--> - - <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> - <script src="[% version('/cobrands/barnet/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] - <script src="[% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script> - - [% PROCESS 'header_extra.html' %] - - </head> - <body class="[% bodyclass | html IF bodyclass %]"> - <div id="barnet-wrapper"> - <div id="ie_wrapper"> - <div id="mast"> - <div class="pseudoH1"> - <a href="http://www.barnet.gov.uk/"><span>London Borough of Barnet</span> <img src="/cobrands/barnet/img/blank.gif" alt="London Borough of Barnet logo" /></a> - </div> - <ul id="skip" class="hidden"> - <li><a href="#content" rel="nofollow">Skip to content</a></li> - <li><a href="#column_nav" rel="nofollow">Skip to main navigation</a></li> - </ul> - <div class="mast_links"></div> - <span class="clear"></span> - <div id="search"></div> - <div class="clear"></div> - </div> - <div id="page_wrap"> - <div id="page"> - <div id="breadcrumb"> - <!-- googleoff:all --> - <ul> - <li><a href="http://www.barnet.gov.uk/">Home</a></li> - <li><a href="/">FixMyStreet</a></li> - <li class="bc_end"><span> - [% IF c.req.uri.path == '/' %]Report a problem[% ELSE %][% title %][% END %] - </span></li> - </ul> - <!-- googleon:all --> - </div> - <div id="content" class="withWidth fullWidth"> - [% IF c.user_exists %] - <div id="user-meta"> - <p> - [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] - <a href="/auth/sign_out">[% loc('sign out') %]</a> - </p> - </div> - [% END %] - - <h1 id="page-title"> - <span>FixMyStreet</span> - </h1> - - <div class="wrapper"> - <div class="table-cell"> - <header id="site-header" role="banner"> - <div class="container"> - <a href="/" id="site-logo">FixMyStreet</a> - <a href="#main-nav" id="nav-link">Main Navigation</a> - </div> - </header> - - [% pre_container_extra %] - - <div class="container"> - <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> - - <!-- end of header --> diff --git a/templates/web/barnet/report/new/councils_text_all.html b/templates/web/barnet/report/new/councils_text_all.html deleted file mode 100644 index ae02f7647..000000000 --- a/templates/web/barnet/report/new/councils_text_all.html +++ /dev/null @@ -1,4 +0,0 @@ -<p> -All the information you provide here will be sent to the <strong>relevant department</strong>. -[% loc('The summary and description will also be made public (see our <a href="/privacy">privacy policy</a>).') %] -</p> diff --git a/templates/web/barnet/report/updates-sidebar-notes.html b/templates/web/barnet/report/updates-sidebar-notes.html deleted file mode 100644 index 3ac015f53..000000000 --- a/templates/web/barnet/report/updates-sidebar-notes.html +++ /dev/null @@ -1 +0,0 @@ - <p>Please note that updates are not sent to the relevant department. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a></p> diff --git a/templates/web/barnet/site-name.html b/templates/web/barnet/site-name.html deleted file mode 100644 index 78563bdf3..000000000 --- a/templates/web/barnet/site-name.html +++ /dev/null @@ -1 +0,0 @@ -Barnet Council FixMyStreet diff --git a/templates/web/base/admin/body.html b/templates/web/base/admin/body.html index be84c6415..d5e575666 100644 --- a/templates/web/base/admin/body.html +++ b/templates/web/base/admin/body.html @@ -124,7 +124,6 @@ <form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - [% IF c.cobrand.moniker != 'emptyhomes' %] <div class="admin-hint"> <p> [% loc('Choose a <strong>category</strong> name that makes sense to the public (e.g., "Pothole", "Street lighting") but is helpful @@ -137,7 +136,6 @@ <p> <strong>[% loc('Category:') %] </strong><input type="text" name="category" size="30" value="[% contact.category | html %]"> </p> - [% END %] <div class="admin-hint"> <p> diff --git a/templates/web/fixmystreet/alert/list-ajax.html b/templates/web/base/alert/list-ajax.html index 639af6f07..639af6f07 100644 --- a/templates/web/fixmystreet/alert/list-ajax.html +++ b/templates/web/base/alert/list-ajax.html diff --git a/templates/web/base/alert/updates.html b/templates/web/base/alert/updates.html index 5efc41bac..104bfa55a 100644 --- a/templates/web/base/alert/updates.html +++ b/templates/web/base/alert/updates.html @@ -5,16 +5,27 @@ [% INCLUDE 'errors.html' %] +<p><a href="[% c.uri_for( '/rss', problem_id ) %]"> + <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="float:right"> + </a> +</p> + <p> [% loc('Receive email when updates are left on this problem.') %] </p> <form action="/alert/subscribe" method="post"> -<label class="n" for="alert_rznvy">[% loc('Email:') %]</label> -<input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30"> -<input type="hidden" name="id" value="[% problem_id | html %]"> -<input type="hidden" name="type" value="updates"> -<input type="submit" value="[% loc('Subscribe') %]"> + <fieldset> + <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label> + + <div class="form-txt-submit-box"> + <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" placeholder="[% loc('Your email') %]"> + <input class="green-btn" type="submit" value="[% loc('Subscribe') %]"> + </div> + + <input type="hidden" name="id" value="[% problem_id | html %]"> + <input type="hidden" name="type" value="updates"> + </fieldset> </form> diff --git a/templates/web/base/around/_main.html b/templates/web/base/around/_main.html index 1b832cb49..900dcb6aa 100644 --- a/templates/web/base/around/_main.html +++ b/templates/web/base/around/_main.html @@ -1,8 +1,3 @@ -<form action="[% c.uri_for('/around') %]" method="get" name="mapForm" id="mapForm"> - <div id="side-form"> - <div id="report-a-problem-main"> - [% pre_container_extra %] - [% INCLUDE 'around/_error_multiple.html' %] - </div> - </div> -</form> +<div class="tablewrapper"> + [% INCLUDE 'around/_error_multiple.html' %] +</div> diff --git a/templates/web/base/around/_updates.html b/templates/web/base/around/_updates.html index 8110a6c7c..458983e8f 100755 --- a/templates/web/base/around/_updates.html +++ b/templates/web/base/around/_updates.html @@ -1,12 +1,5 @@ -<h1>[% loc('Problems in this area') %]</h1> - -<p id="alert_links_area"> - <a id="email_alert" rel="nofollow" href="[% email_url | html %]"> - [%- loc('Email me new local problems') -%] -</a> | - <a href="[% rss_url | html %]" id="rss_alert"> - <span>[% rss_alt %]</span> - <img src="/i/feed.png" width="16" height="16" title="[% rss_title %]" alt="[% rss_alt %]" border="0" style="vertical-align: top"> - </a> -</p> - +<div class="shadow-wrap"> + <ul id="key-tools" class="singleton"> + <li><a class="feed" id="key-tool-around-updates" href="[% email_url | html %]">[% loc("Get updates") %]</a></li> + </ul> +</div> diff --git a/templates/web/base/around/display_location.html b/templates/web/base/around/display_location.html index d38ae6754..7bf62e528 100755 --- a/templates/web/base/around/display_location.html +++ b/templates/web/base/around/display_location.html @@ -30,7 +30,7 @@ PROCESS "maps/${map.type}.html" around_page = 1; SET bodyclass = 'mappage'; - SET rss = [ tprintf(loc('Recent local problems, %s', "%s is the site name"), site_name), rss_url ] IF c.cobrand.moniker != 'emptyhomes'; + SET rss = [ tprintf(loc('Recent local problems, %s', "%s is the site name"), site_name), rss_url ]; INCLUDE 'header.html', title => loc('Viewing a location') robots => 'noindex,nofollow'; @@ -51,7 +51,6 @@ [% map_html %] - [% IF c.cobrand.moniker != 'emptyhomes' %] <p id='sub_map_links'> [% map_sub_links %] [% IF c.req.params.no_pins %] @@ -68,7 +67,6 @@ [% END %] [% END %] </p> - [% END %] </div> @@ -82,13 +80,11 @@ [% TRY %][% INCLUDE 'around/extra_text.html' %][% CATCH file %][% END %] [% END %] - [% IF c.cobrand.moniker != 'emptyhomes' %] [% INCLUDE 'around/_updates.html' %] <section class="full-width"> [% INCLUDE "around/tabbed_lists.html" %] </section> - [% END %] </div> [% IF allow_creation %] diff --git a/templates/web/base/around/postcode_form.html b/templates/web/base/around/postcode_form.html index 601f0ee9e..9c0bc5942 100644 --- a/templates/web/base/around/postcode_form.html +++ b/templates/web/base/around/postcode_form.html @@ -6,9 +6,6 @@ question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area'); %] - [% IF c.cobrand.moniker == 'fixmybarangay' %] - [% INCLUDE '_barangay_buttons.html' %] - [% ELSE %] <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> <label for="pc">[% question %]:</label> <div> @@ -21,6 +18,5 @@ [% END %] </form> - [% END %] </div> </div> diff --git a/templates/web/base/common_header_tags.html b/templates/web/base/common_header_tags.html index d13509a7a..99d409362 100644 --- a/templates/web/base/common_header_tags.html +++ b/templates/web/base/common_header_tags.html @@ -12,7 +12,7 @@ <script type="text/javascript" src="[% start %][% version('/js/geo.min.js') %]"></script> <script type="text/javascript" src="[% start %][% version('/js/fixmystreet.js') %]"></script> -<script type="text/javascript" src="[% start %][% version(js_override || '/js/fixmystreet-old-box.js') %]"></script> +<script type="text/javascript" src="[% start %][% version('/cobrands/fixmystreet/fixmystreet.js') %]"></script> [% IF admin %] <script src="[% start %]/js/jquery-ui/js/jquery-ui-1.10.3.custom.min.js"></script> diff --git a/templates/web/base/dashboard/index.html b/templates/web/base/dashboard/index.html index b3e1e8426..c0f94ce56 100644 --- a/templates/web/base/dashboard/index.html +++ b/templates/web/base/dashboard/index.html @@ -17,7 +17,6 @@ </hgroup> <div class="filters"> - [% IF c.cobrand.moniker != 'fixmybarangay' %] <p> <label for="ward">Ward:</label> <select name="ward"><option value=''>All</option> @@ -26,7 +25,6 @@ [% END %] </select> </p> - [% END %] <p> <label for="category">Report category:</label> diff --git a/templates/web/base/footer.html b/templates/web/base/footer.html index 3f4e5b551..7626736a0 100644 --- a/templates/web/base/footer.html +++ b/templates/web/base/footer.html @@ -1,33 +1,53 @@ - </div><!-- #mysociety .container --> - - <div id="navigation" class="container" role="navigation"> - <div class="spacer"></div> - <ul id="site-nav" class="nav"> - <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END - %]>[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/my' %]span[% ELSE %]a href="/my"[% END - %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END - %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END - %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END - %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li> - </ul> - - </div> - -</div></div></div><!-- wrappers --> - -<div id="footer"> - - <p><a href="/contact">[% tprintf(loc("Contact %s", "%s is the site name"), site_name) | replace(' ', ' ') %]</a></p> - - [% INCLUDE 'front/footer-marketing.html' %] - -</div> - -[% INCLUDE 'debug_footer.html' %] + [% IF pagefooter %] + <footer role="contentinfo"> + [% INCLUDE 'front/footer-marketing.html' %] + </footer> + [% END %] + </div><!-- .content role=main --> + </div><!-- .container --> + [% IF c.cobrand.moniker == 'fixmystreet' AND bodyclass != 'mappage' %] + [% INCLUDE 'footer-nav.html' %] + [% END %] + </div><!-- .table-cell --> + + <div class="nav-wrapper"> + <div class="nav-wrapper-2"> + <div id="main-nav" role="navigation"> + <ul class="nav-menu nav-menu--mysoc"> + <li><a id="mysoc-logo" href="https://www.mysociety.org/">mySociety</a></li> + </ul> +[% + SET base = ""; + SET base = c.cobrand.base_url IF admin; +%] + <ul class="nav-menu nav-menu--main"> + <li><[% IF c.req.uri.path == '/' + %]span[% ELSE %]a href="[% base %]/"[% END %] class="report-a-problem-btn" + >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/my' + %]span[% ELSE %]a href="[% base %]/my"[% END + %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/reports' + %]span[% ELSE %]a href="[% base %]/reports"[% END + %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/alert' + %]span[% ELSE %]a href="[% base %]/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END + %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/faq' + %]span[% ELSE %]a href="[% base %]/faq"[% END + %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>[% + %]<li class="nav-menu__item--privacy"><[% IF c.req.uri.path == '/privacy' + %]span[% ELSE %]a href="[% base %]/privacy"[% END + %]>[% loc("Privacy") %]</[% c.req.uri.path == '/privacy' ? 'span' : 'a' %]></li> + </ul> + </div> + </div> + </div> + +<!-- [% INCLUDE 'debug_footer.html' %] --> + </div> <!-- .wrapper --> + + [% TRY %][% PROCESS 'footer_extra.html' %][% CATCH file %][% END %] </body> </html> diff --git a/templates/web/base/header.html b/templates/web/base/header.html index 1d7960661..7ef37675a 100644 --- a/templates/web/base/header.html +++ b/templates/web/base/header.html @@ -1,30 +1,61 @@ +[% + SET html_att = ' lang="' _ lang_code _ '"'; + # For a right-to-left language, use the following line in your own header: + # SET html_att = html_att _ ' dir="rtl"'; +-%] <!doctype html> -<!--[if lt IE 7]><html class="no-js ie6 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 7]> <html class="no-js ie7 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 8]> <html class="no-js ie8 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if gt IE 8]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> +<!--[if lt IE 7]><html class="no-js ie6 iel8"[% html_att %]><![endif]--> +<!--[if IE 7]> <html class="no-js ie7 iel8"[% html_att %]><![endif]--> +<!--[if IE 8]> <html class="no-js ie8 iel8"[% html_att %]><![endif]--> +<!--[if IE 9]> <html class="no-js ie9"[% html_att %]><![endif]--> +<!--[if gt IE 9]><!--><html class="no-js"[% html_att %]><!--<![endif]--> <head> <meta name="viewport" content="initial-scale=1.0"> - <meta name="apple-mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-status-bar-style" content="black"> + <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta name="HandHeldFriendly" content="true"> <meta name="mobileoptimized" content="0"> [% INCLUDE 'header_opengraph.html' %] + [% SET start = c.config.ADMIN_BASE_URL IF admin; - <link rel="stylesheet" href="[% version('/css/core.css') %]"> + # For clarity, the 'fixmystreet' moniker (for fixmystreet.com) puts + # it stylesheets under fixmystreet.com + IF c.cobrand.moniker == 'fixmystreet'; + SET css_dir = 'fixmystreet.com'; + ELSE; + SET css_dir = c.cobrand.moniker; + END %] + <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ css_dir _ '/base.css') %]"> + <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ css_dir _ '/layout.css') %]" media="(min-width:48em)"> + [% extra_css %] + <!--[if (lt IE 9) & (!IEMobile)]> + <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ css_dir _ '/layout.css') %]"> + <![endif]--> + <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> + <script src="[% start %][% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script> [% INCLUDE 'common_header_tags.html' %] - - </head> - <body> + [% extra_js %] + + [% IF c.req.uri.host == 'osm.fixmystreet.com' %] + <link rel="canonical" href="https://www.fixmystreet.com[% c.req.uri.path_query %]"> + [% END %] -<div id="wrapper"><div id="wrapper2"><div id="wrapper3"> + [% TRY %][% PROCESS 'header_extra.html' %][% CATCH file %][% END %] + + </head> + [% TRY %][% PROCESS 'set_body_class.html' %][% CATCH file %][% END %] + <body class="[% bodyclass | html IF bodyclass %]"> - [% IF NOT title AND NOT c.req.path %]<h1 id="header" role="banner">[% ELSE %]<div id="header" role="banner"><a href="/">[% END - %][% loc('FixMyStreet') %] - [%- IF NOT title AND NOT c.req.path %]</h1>[% ELSE %]</a></div>[% END %] + <div class="wrapper"> + <div class="table-cell"> + <header id="site-header" role="banner"> + <div class="container"> + [% INCLUDE 'header_logo.html' %] + <a href="#main-nav" id="nav-link">Main Navigation</a> + </div> + </header> [% IF c.user_exists %] <div id="user-meta"> @@ -37,6 +68,7 @@ [% pre_container_extra %] - <div id="mysociety" class="container" role="main"> + <div class="container"> + <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> - [% INCLUDE 'debug_header.html' %] + <!-- [% INCLUDE 'debug_header.html' %] --> diff --git a/templates/web/base/header_logo.html b/templates/web/base/header_logo.html index e69de29bb..66378235a 100644 --- a/templates/web/base/header_logo.html +++ b/templates/web/base/header_logo.html @@ -0,0 +1,2 @@ + <a href="[% c.cobrand.base_url IF admin %]/" id="site-logo">[% site_name %]</a> + <a href="[% c.cobrand.base_url IF admin %]/" id="report-cta" title="[%- loc('Report a problem') -%]">[%- loc('Report') -%]</a> diff --git a/templates/web/base/index-steps.html b/templates/web/base/index-steps.html index 431791c20..0ee57bfca 100644 --- a/templates/web/base/index-steps.html +++ b/templates/web/base/index-steps.html @@ -1,26 +1,6 @@ <h2>[% loc('How to report a problem') %]</h2> <ol class="big-numbers"> -[% IF c.cobrand.moniker == 'fixmybarangay' %] - <li>Text <span class="promo-big">FMB LUZ</span> or <span class="promo-big">FMB BSN</span> followed by your report to - <ul id="promo-list"> - <li> - <span class="promo-bigger">391-FMB</span> (391362) SMART short code - </li> - <li> - <span class="promo-bigger">0908 896 8278</span> for all networks - </li> - </ul> - <div class="promo-example"> - For example:<br/> - <div> - FMB LUZ Busted streetlamp, P. Cabantan St., Pole # 12345, near Sto. Antonio Chapel - </div> - </div> - </li> - <li>Or visit the Barangay Center in person</li> - <li>Staff? <a href="/auth">Sign in</a> and click on the map! -[% ELSE %] <li>[% question %]</li> <li>[% loc('Locate the problem on a map of the area') %]</li> <li>[% loc('Enter details of the problem') %]</li> @@ -30,13 +10,10 @@ [% ELSE %] <li>[% loc('We send it to the council on your behalf') %]</li> [% END %] -[% END %] </ol> -[% IF c.cobrand.moniker != 'emptyhomes' %] <section class="full-width"> [% INCLUDE "front/stats.html" %] [% TRY %][% INCLUDE "front/tips.html" %][% CATCH file %][% END %] </section> -[% END %] diff --git a/templates/web/base/my/my.html b/templates/web/base/my/my.html index dff18c025..c3911d4c1 100644 --- a/templates/web/base/my/my.html +++ b/templates/web/base/my/my.html @@ -21,9 +21,7 @@ c.uri_for('/') ) %] [% END %] -[% IF c.cobrand.moniker == 'fixmybarangay' %] - [% INCLUDE '_barangay_buttons.html' %] -[% ELSIF c.cobrand.moniker == 'hart' %] +[% IF c.cobrand.moniker == 'hart' %] [% INCLUDE '_hart_hants_note.html' %] [% END %] diff --git a/templates/web/base/questionnaire/index.html b/templates/web/base/questionnaire/index.html index a523cd439..1068e21e3 100644 --- a/templates/web/base/questionnaire/index.html +++ b/templates/web/base/questionnaire/index.html @@ -93,7 +93,6 @@ </div> [% END %] -[% IF c.cobrand.moniker != 'emptyhomes' %] <div class="js-another-questionnaire"> <p>[% loc('Would you like to receive another questionnaire in 4 weeks, reminding you to check the status?') %]</p> <p class="radio-segmented-control"> @@ -103,7 +102,6 @@ <label class="inline" for="another_no">[% loc('No') %]</label> </p> </div> -[% END %] <p><input type="submit" name="submit" value="[% loc('Submit questionnaire') %]"></p> diff --git a/templates/web/base/report/_main.html b/templates/web/base/report/_main.html index a7aafb6d0..7260e619a 100644 --- a/templates/web/base/report/_main.html +++ b/templates/web/base/report/_main.html @@ -54,7 +54,7 @@ <p class="report_meta_info"> [% problem.meta_line(c) | html %] - [%- IF !problem.used_map AND c.cobrand.moniker != 'emptyhomes' %]; <strong>([% loc('there is no pin shown as the user did not use the map') %])</strong>[% END %] + [%- IF !problem.used_map %]; <strong>([% loc('there is no pin shown as the user did not use the map') %])</strong>[% END %] </p> [% IF problem.bodies_str %] [% INCLUDE 'report/_council_sent_info.html' %] diff --git a/templates/web/base/report/new/category.html b/templates/web/base/report/new/category.html index f640c548c..a89a4d5e9 100644 --- a/templates/web/base/report/new/category.html +++ b/templates/web/base/report/new/category.html @@ -4,11 +4,7 @@ category = category | lower; END; %] <label for='form_category' id="form_category_label"> - [%- IF c.cobrand.moniker == 'emptyhomes' %] - [%- loc('Property type:') %] - [%- ELSE %] [%- loc('Category') %] - [%- END -%]</label> <select name='category' id='form_category'> [% FOREACH cat_op IN category_options %] [% cat_op_lc = cat_op | lower %] diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html index a39200c72..75ff76204 100644 --- a/templates/web/base/report/new/form_user_loggedin.html +++ b/templates/web/base/report/new/form_user_loggedin.html @@ -26,11 +26,9 @@ <label for="form_phone">[% loc('Phone number (optional)') %]</label> <input class="" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]"> - [% IF c.cobrand.moniker != 'fixmybarangay' || c.user.from_body %] - <div class="general-notes"> - <p>[% loc('We never show your email address or phone number.') %]</p> - </div> - [% END %] + <div class="general-notes"> + <p>[% loc('We never show your email address or phone number.') %]</p> + </div> <div class="form-txt-submit-box"> <input class="green-btn" type="submit" id="submit_register" name="submit_register" value="[% loc('Submit') %]"> diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html index 3e0ac890b..29529e5a1 100644 --- a/templates/web/base/report/update-form.html +++ b/templates/web/base/report/update-form.html @@ -5,7 +5,7 @@ [% IF NOT login_success AND NOT oauth_need_email %] <h2>[% loc( 'Provide an update') %]</h2> - [% IF c.cobrand.moniker != 'emptyhomes' AND c.cobrand.moniker != 'stevenage' %] + [% IF c.cobrand.moniker != 'stevenage' %] <div class="general-notes"> [% INCLUDE 'report/updates-sidebar-notes.html' %] </div> diff --git a/templates/web/base/reports/_rss.html b/templates/web/base/reports/_rss.html index 9756f131d..f2d164bfa 100644 --- a/templates/web/base/reports/_rss.html +++ b/templates/web/base/reports/_rss.html @@ -1,2 +1,19 @@ -<p><a href="[% rss_url %]"><img align="right" src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% tprintf(loc('RSS feed of problems in this %s'), thing) %]" border="0" hspace="4"></a> +<div class="shadow-wrap"> + <ul id="key-tools"[% IF NOT children.size %] class="singleton"[% END %]> + <li><a rel="nofollow" id="key-tool-updates-area" class="feed" href="[% rss_url %]">[% + IF c.cobrand.moniker == 'bromley' AND thing == 'council'; + 'Get updates of reports in Bromley'; + ELSIF c.cobrand.moniker == 'bromley'; + 'Get updates of reports in this ward'; + ELSIF c.cobrand.is_council; + tprintf(loc('Get updates of %s problems'), thing); + ELSE; + tprintf(loc('Get updates of problems in this %s'), thing); + END + %]</a></li> + [% IF children.size %] + <li><a href="#council_wards" id="key-tool-wards" class="chevron">[% ward_text %]</a></li> + [% END %] + </ul> +</div> diff --git a/templates/web/base/reports/_ward-list.html b/templates/web/base/reports/_ward-list.html index e78ac7d90..b7e19ffc2 100755 --- a/templates/web/base/reports/_ward-list.html +++ b/templates/web/base/reports/_ward-list.html @@ -1,9 +1,14 @@ -[% IF location == 'before' AND children.size %] -<h2 style="clear:right">[% ward_text %]</h2> -<p>[% loc('Follow a ward link to view only reports within that ward.') %]</p> -<ul> -[% FOR child IN children.values.sort('name') %] -<li><a href="[% child.url %]">[% child.name %]</a></li> -[% END %] -</ul> +[% IF location == 'after' AND children.size %] +<section id="council_wards" class="hidden-js"> +<h2>[% ward_text %]</h2> + <p>[% loc('Follow a ward link to view only reports within that ward.') %]</p> + <ul class="item-list item-list--wards full-width"> + [% FOR child IN children.values.sort('name') %] + <li class="item-list__item item-list--wards__item"> + <a href="[% child.url %]">[% child.name %]</a> + </li> + [% END %] + </ul> +</section> [% END %] + diff --git a/templates/web/eastsussex/header.html.template b/templates/web/eastsussex/header.html.template index 1ca60f4b7..d80d4101a 100644 --- a/templates/web/eastsussex/header.html.template +++ b/templates/web/eastsussex/header.html.template @@ -11,7 +11,7 @@ <![endif]--> <script src="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + [% INCLUDE 'common_header_tags.html' %] [% extra_js %] <script src="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/report-form.js') %]"></script> diff --git a/templates/web/eastsussex/report/update-form.html b/templates/web/eastsussex/report/update-form.html index abcc2f532..e4fb47a45 100644 --- a/templates/web/eastsussex/report/update-form.html +++ b/templates/web/eastsussex/report/update-form.html @@ -47,7 +47,7 @@ <h2>[% loc( 'Provide an update') %]</h2> - [% IF c.cobrand.moniker != 'emptyhomes' AND c.cobrand.moniker != 'stevenage' %] + [% IF c.cobrand.moniker != 'stevenage' %] <div class="general-notes"> [% INCLUDE 'report/updates-sidebar-notes.html' %] </div> diff --git a/templates/web/emptyhomes/about/about-cy.html b/templates/web/emptyhomes/about/about-cy.html deleted file mode 100644 index dab6cefea..000000000 --- a/templates/web/emptyhomes/about/about-cy.html +++ /dev/null @@ -1,44 +0,0 @@ -[% INCLUDE 'header.html', title => loc('About us') %] - -<h1>[% loc('About us') %]</h1> - -<div style="float: left; width: 48%;"> - - <h2>Yr Asiantaeth Tai Gwag</h2> - -<p>Mae'r Asiantaeth Tai Gwag yn elusen ymgyrchu annibynnol. Nid ydym yn rhan -o'r llywodraeth, ac nid oes gennym unrhyw gysylltiadau ffurfiol â chynghorau -lleol er ein bod yn cydweithio â'r naill a'r llall. Rydym yn bodoli er mwyn -amlygu gwastraff yr eiddo gwag ac yn gweithio gyda eraill er mwyn dyfeisio a -hyrwyddo atebion cynaliadwy er mwyn adfer eiddo gwag yn eiddo y mae pobl yn byw -ynddynt eto. Rydym wedi'n lleoli yn Llundain ond rydym yn gweithio ledled -Lloegr. Rydym hefyd yn gweithio mewn partneriaeth ag elusennau eraill ledled y -DU.</p> - -</div> - -<div style="float: right; width:48%;"> - - <h2>Shelter Cymru</h2> - -<p>Shelter Cymru yw’r elusen yng Nghymru ar gyfer pobl a chartrefi ac -rydym eisiau i bawb yng Nghymru gael cartref addas. Credwn fod cartref yn hawl -sylfaenol a’i fod yn hanfodol i iechyd a lles pobl a chymunedau. Rydym -yn gweithio dros bobl sydd mewn angen am dai. Mae gennym swyddfeydd ar draws -Cymru ac rydym yn atal pobl rhag colli eu cartrefi drwy gynnig cyngor -annibynnol, cyfrinachol, am ddim. Pan fo’r angen, rydym yn herio’n -adeiladol ar ran pobl er mwyn sicrhau eu bod yn cael eu cynorthwyo’n -gywir ac i wella ymarfer a dysgu. Mae Shelter Cymru yn credu y gall gwneud -gwell defnydd o gartrefi gwag gyfrannu’n sylweddol at y ddaprariaeth o -dai fforddiadwy yng Nghymru. - - <a href="http://www.sheltercymru.org.uk/shelter/advice/pdetail.asp?cat=20"> - Gwybodaeth bellach am ein gwaith ar gartrefi gwag</a>. - - </p> - -</div> - -<br clear="both"> - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/emptyhomes/about/about-en-gb.html b/templates/web/emptyhomes/about/about-en-gb.html deleted file mode 100644 index e9eeea103..000000000 --- a/templates/web/emptyhomes/about/about-en-gb.html +++ /dev/null @@ -1,62 +0,0 @@ -[% INCLUDE 'header.html', title => loc('About us') %] - -<h1>[% loc('About us') %]</h1> - -<div style="float: left; width: 31%; margin-right: 4%"> - - <h2>The Empty Homes Agency</h2> - - <p>The Empty Homes agency is an independent campaigning charity. We - are not part of government, and have no formal links with local councils - although we work in cooperation with both. We exist to highlight the waste - of empty property and work with others to devise and promote sustainable - solutions to bring empty property back into use. We are based in London but - work across England. We also work in partnership with other charities across - the UK.</p> - -</div> - -<div style="float: left; width: 31%;"> - - <h2>Shelter<br>Cymru</h2> - - <p>Shelter Cymru is Wales’ people and homes charity and wants - everyone in Wales to have a decent home. We believe a home is a fundamental - right and essential to the health and well-being of people and communities. - We work for people in housing need. We have offices all over Wales and - prevent people from losing their homes by offering free, confidential and - independent advice. When necessary we constructively challenge on behalf of - people to ensure they are properly assisted and to improve practice and - learning. We believe that bringing empty homes back into use can make a - significant contribution to the supply of affordable homes in Wales. - - <a href="http://www.sheltercymru.org.uk/shelter/advice/pdetail.asp?cat=20"> - Further information about our work on empty homes</a>. - - </p> - -</div> - -<div style="float: right; width: 31%;"> - - <h2>The Scottish Empty Homes Partnership</h2> - -<p>The Scottish Empty Homes Partnership works with Scottish Local Authorities -and their partners to help them bring the 23,000+ long term private sector -empty homes in Scotland back into use. In existence since June 2010, the -Partnership is funded by Scottish Government and hosted by Shelter Scotland. - -<p>We provide training for empty homes officers, share best practice, link -industry professionals and provide consultancy and advice to councils and -others working to bring private sector empty homes back into use. We aim to -highlight the opportunities for communities in bringing empty homes back into -use. Based on our experience we also make recommendations for changes in both -practice and policy on local and national levels. To find out more about the -work we do please -<a href="http://scotland.shelter.org.uk/housing_issues/empty_homes">visit our webpage</a>. - -</div> - -<br clear="both"> - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/emptyhomes/about/faq-cy.html b/templates/web/emptyhomes/about/faq-cy.html deleted file mode 100644 index 842f0c028..000000000 --- a/templates/web/emptyhomes/about/faq-cy.html +++ /dev/null @@ -1,62 +0,0 @@ -[% INCLUDE 'header.html', title => loc('Frequently Asked Questions') %] - -<h1>Cwestiynau Cyffredin</h1> - -<dl> -<dt>Beth yw diben y safle hwn?</dt> -<dd>Diben y safle hwn yw ei gwneud mor hawdd â phosibl i chi gael tai gwag yn eich ardal yn ôl mewn defnydd. Mae’n gwneud cynghorau’n atebol am ymateb i’r tai gwag rydych chi’n rhoi gwybod amdanynt, ac am ddelio â nhw.</dd> -<dt>Sut ydw i’n defnyddio’r safle?</dt> -<dd>Rhowch god post neu gyfeiriad yn y blwch ar y dudalen hafan ac fe gyflwynir map o’r ardal honno i chi. Cliciwch ar y man lle mae’r eiddo gwag, llenwch y manylion, llwythwch ffotograff i fyny os oes un gennych a phwyswch anfon. A dyna’r cyfan.</dd> -<dt>A yw’r gwasanaeth ar gael am ddim?</dt> -<dd>Ydy. Talwyd am gostau datblygu a chynnal y safle hwn gan yr Asiantaeth Tai Gwag a Shelter Cymru drwy haelioni eu cyllidwyr. Mae'r Asiantaeth Tai Gwag a Shelter Cymru yn elusennau cofrestredig, felly os ydych yn credu yn ein nodau a hoffech gyfrannu, mae croeso i chi wneud hynny. -<a href="https://secure.thebiggive.org.uk/donate/donate.php?charity_id=6651">Asiantaeth Tai Gwag</a>, -<a href="http://cymraeg.sheltercymru.org.uk/Help/donating.aspx?ParentID=7&year=0&type=1&subcat=32&pageid=93">Shelter Cymru</a>, -<a href="http://scotland.shelter.org.uk/donate">Shelter Scotland</a>.</dd> - -<dt>Ydych chi’n cael gwared ar gynnwys gwirion neu anghyfreithlon?</dt> -<dd>Rydym yn cadw’r hawl i ddileu unrhyw adroddiadau neu ddiweddariadau yr ydym yn eu hystyried yn amhriodol.</dd> -<dt>Sut mae cynghorau’n dod ag eiddo gwag yn ôl mewn defnydd?</dt> -<dd><p>Mae gan bob cyngor yng Nghymru a Lloegr bwerau i ddod â thai gwag yn ôl mewn defnydd. Mae llawer ohonynt yn dda iawn wrth wneud hynny, nid yw rhai eraill. Mae’r rhan fwyaf o gynghorau’n ceisio helpu a dwyn perswâd ar y perchennog i ddod â’u heiddo yn ôl mewn defnydd; dim ond pan fydd help a pherswâd wedi methu y byddant yn defnyddio pwerau cyfreithiol fel Gorchmynion Rheoli Anheddau Gwag.</p> <p> -Mae’r rhan fwyaf o eiddo gwag yn cael eu dwyn yn ôl mewn defnydd ymhen hir a hwyr gan eu perchennog. Fodd bynnag, mewn achosion niferus, mae hyn yn cymryd blynyddoedd. Yn aml, bydd eiddo gwag yn dirywio’n gyflym – bydd chwyn yn eu goresgyn a bydd y tywydd yn ymosod arnynt. Maent yn aml yn cael eu defnyddio gan sgwatwyr, pobl sy’n tipio’n anghyfreithlon, fandaliaid ac weithiau cânt eu rhoi ar dân yn fwriadol. Mae’r gymdogaeth gyfan yn dioddef wrth aros i’r perchennog ddelio â’i eiddo.</p> <p> -Mae cynghorau’n helpu ac yn dwyn perswâd ar berchenogion i adfer eu heiddo i’w defnyddio yn gyflymach. -Hyd yn oed wedyn, gall y broses fod yn araf, yn enwedig os yw’r eiddo mewn cyflwr gwael iawn neu os yw’r perchennog yn amharod i wneud unrhyw beth. Yn y rhan fwyaf o achosion, bydd chwe mis yn mynd heibio cyn y gallwch ddisgwyl gweld unrhyw beth yn newid, weithiau hwy. Nid yw hyn yn golygu nad yw’r cyngor yn gwneud unrhyw beth, a dyma pam rydym ni’n annog y cyngor i ddiweddaru’r wefan fel y gallwch weld beth sy’n digwydd.</p> <p> -Byddwn yn cysylltu â chi ddwywaith (mis a chwe mis ar ôl i chi roi gwybod am yr eiddo gwag), fel y gallwch ddweud wrthym beth sydd wedi digwydd. Os nad yw’r cyngor yn gwneud unrhyw beth, neu os ydych chi’n meddwl bod eu hymateb yn annigonol, byddwn yn rhoi cyngor i chi ar beth i’w wneud nesaf.</p> <p> -Os taw’r llywodraeth neu un o’i hasiantaethau sy’n berchen ar yr eiddo gwag, nid oes gan gynghorau unrhyw bŵer i helpu’n aml. Fodd bynnag, mae’n bosibl y byddwch yn gallu gweithredu’ch hunan yn uniongyrchol gan ddefnyddio PROD: -<a href="http://www.emptyhomes.com/what-you-can-do-2/resources/prods-2">http://www.emptyhomes.com/what-you-can-do-2/resources/prods-2</a> -</dd> - <dt>A fydd adrodd am eiddo gwag yn gwneud unrhyw wahaniaeth?</dt> - <dd><p>Bydd. Gall cynghorau wneud gwahaniaeth gwirioneddol, ond mae ganddynt lawer o bethau i’w gwneud. Bydd llawer o gynghorau ddim ond yn delio ag eiddo gwag sydd wedi cael eu hysbysu iddyn nhw. Os nad yw pobl yn rhoi gwybod am eiddo gwag, mae’n bosibl iawn y daw cynghorau i’r casgliad bod meysydd gwaith eraill yn fwy pwysig.</p> <p> - Mae dros 840,000 o dai gwag yn y DU. Mae’r Asiantaeth Tai Gwag yn amcangyfrif bod dros hanner y rhain yn wag heb angen. Effaith hyn yw gostwng sylweddol yn y stoc tai sydd ar gael, gan fwydo argyfwng tai’r DU. Sgil-effaith y gwastraff hwn yw bod llawer mwy o bwysau’n cael ei roi ar dir adeiladau gan fod mwy o dai’n cael eu hadeiladu i ateb y diffyg. Mae’r Asiantaeth Tai Gwag yn amcangyfrif y byddai dod â dim ond chwarter tai gwag y DU yn ôl mewn defnydd yn rhoi cartrefi i 700,000 o bobl, yn arbed 160 cilometr sgwâr o dir ac yn arbed 10 miliwn tunnell fetrig o CO<sub>2</sub> dros adeiladu’r un nifer o dai newydd. - </dt> - </dl> - <h2>Cwestiynau Preifatrwydd </h2> - <dl> - <dt>Pwy sy’n cael gweld fy nghyfeiriad e-bost?</dt> - <dd>Os gwnaethoch gyflwyno eiddo gwag, wrth reswm, mae eich manylion yn cael eu darparu i ni. Ni fyddwn byth yn rhoi nac yn gwerthu eich cyfeiriad e-bost i unrhyw un arall, oni bai ein bod ni’n gorfod gwneud hynny yn ôl y gyfraith.</dd> - <dt>A fyddwch chi’n anfon negeseuon sbam budr, bwystfilaidd at fy nghyfeiriad e-bost?</dt> - <dd>Byth. Byddwn yn anfon neges e-bost atoch os yw rhywun yn gadael diweddariad ar adroddiad a wnaed gennych, ac yn anfon holiaduron e-bost atoch chi bedair wythnos a chwe mis wedi i chi gyflwyno problem yn gofyn am ddiweddariad am ei statws; dim ond ynghylch eich problem y byddwn yn anfon negeseuon e-bost atoch chi.</dd> - </dl> - <h2>Cwestiynau am y Sefydliad </h2> - <dl> - <dt>Pwy adeiladodd y safle hwn?</dt> - <dd>Adeiladwyd y safle hwn gan <a href="http://www.mysociety.org/">mySociety</a>. - Mae mySociety yn brosiect elusen gofrestredig sydd wedi tyfu o gymuned o wirfoddolwyr a wnaeth adeiladu safleoedd fel <a href="http://www.theyworkforyou.com/">TheyWorkForYou</a>. - Prif genhadaeth mySociety yw adeiladu prosiectau ar y Rhyngrwyd sy’n cynnig manteision syml, dirnadwy i bobl yn yr agweddau dinesig a chymunedol ar eu bywydau. Ein prosiect cyntaf oedd <a href="http://www.writetothem.com/">WriteToThem</a>, lle gallwch ysgrifennu at eich cynrychiolwyr etholedig, am ddim. - <a href="https://secure.mysociety.org/donate/">Cyfrannu at mySociety</a></dd> - <dt>Lle mae’r "cod gwreiddiol" i’r safle hwn?</dt> - <dd>Y meddalwedd wrth gefn y safle hwn yw cod agored, ac mae ar gael i chi yn bennaf o dan drwydded meddalwedd GNU Affero GPL. Gallwch <a - href="http://github.com/mysociety/fixmystreet"> lawrlwytho’r cod gwreiddiol</a> a’n helpu ni i’w ddatblygu. - Mae croeso i chi hefyd ei ddefnyddio yn eich prosiectau eich hunan, er bod rhaid i chi ryddhau’r cod gwreiddiol i unrhyw brosiectau o’r fath.</dd> - <dt>Pobl sy’n adeiladu pethau, nid sefydliadau. Pwy wnaeth ei adeiladu <em>go iawn</em>?</dt> - <dd>Ysgrifennwyd yr addasiad hwn o <a href="https://www.fixmystreet.com/">Fix­MyStreet</a> - gan Matthew Somerville. Diolch i’r - <a href="http://www.ordnancesurvey.co.uk">Arolwg Ordnans</a> (am y mapiau, - codau post y DU a chyfeiriadau’r DU – data © Hawlfraint y Goron, cedwir pob hawl - , Y Weinyddiaeth Gyfiawnder 100037819 2008), - Yahoo! am eu llyfrgelloedd JavaScript wedi’u trwyddedu gan BSD, y gymuned meddalwedd am ddim gyfan (daethpwyd â’r prosiect arbennig hwn i chi gan Perl, PostgreSQL, - a’r rhif 161.290) ac <a - href="http://www.bytemark.co.uk/">Bytemark</a> (sydd mor garedig â gwesteia’n holl weinyddion). - - Rhowch wybod i ni os ydym wedi hepgor unrhyw un.</dd> - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/emptyhomes/about/faq-en-gb.html b/templates/web/emptyhomes/about/faq-en-gb.html deleted file mode 100755 index 4b3e71ce2..000000000 --- a/templates/web/emptyhomes/about/faq-en-gb.html +++ /dev/null @@ -1,96 +0,0 @@ -[% INCLUDE 'header.html', title => loc('Frequently Asked Questions') %] - -<h1>Frequently Asked Questions</h1> - <dl> - <dt>What is this site for?</dt> - <dd>This site is to help make it as easy as possible for you to get -empty homes in your area put back into use. It makes councils accountable for responding and dealing with the empty homes you -report.</dd> - <dt>How do I use the site?</dt> - <dd>Enter a postcode or address in the box on the homepage and you -are presented with a map of that area. Click where the empty property is, fill -in the details, upload a photo if you have one and press submit. That’s -it. </dd> - <dt>Is it free?</dt> - <dd>Yes. The costs of developing and running this site are shared -between the Empty Homes Agency, Shelter Cymru and Shlter Scotland through the generosity of their funders. We are all registered charities, so if you believe in their aims and would like to make a contribution, please do: -<a href="https://secure.thebiggive.org.uk/donate/donate.php?charity_id=6651">Empty Homes</a>, -<a href="http://www.sheltercymru.org.uk/Help/donating.aspx?ParentID=7&year=0&type=1&subcat=32&pageid=93">Shelter Cymru</a>, -<a href="http://scotland.shelter.org.uk/donate">Shelter Scotland</a>.</dd> - <dt>Do you remove silly or illegal content?</dt> - <dd>We reserve the right to remove any reports or updates -which we consider to be inappropriate.</dd> - <dt>How do councils bring empty properties back into use?</dt> - <dd><p>All councils in England and Wales have powers to bring empty -homes back into use. Many are very good at it, some are not. Most councils seek -to persuade and help the owner to bring their property back into use; they only -use legal powers such as Empty Dwelling Management Orders when help and -persuasion have failed.</p> <p> -Most empty homes are brought back into use eventually by their owner. But in -many cases this takes years. Empty homes often decline fast – they become -overrun with weeds and attacked by the weather. They are often used by -squatters, fly tippers, vandals and are sometimes subject to arson. The whole -neighbourhood suffers waiting for the owner to deal with their property.</p> <p> -Councils help and persuade owners to bring their properties into use faster. -Even so the process can be slow, especially if the property is in very poor -repair or the owner is unwilling to do anything. In most cases it takes six -months before you can expect to see anything change, occasionally longer. This -doesn’t mean the council isn’t doing anything, which is why we encourage -councils to update you to let you know what is happening.</p> <p> -If the empty home is owned by the government or one its agencies, councils are -often powerless to help. However you might be able to take action directly -yourself using the -<a href="http://emptyhomes.com/what-you-can-do-2/resources/prods-2/">Community Right to Reclaim Land</a> -</dd> - <dt>Will reporting an empty home make any difference?</dt> - <dd><p>Yes. Councils can make a real difference, but they have lots of -things to do. Many councils only deal with empty homes that are reported to -them. If people do not report empty homes, councils may well conclude that -other areas of work are more important.</p> <p> -</dt> - </dl> - <h2>Privacy Questions</h2> - <dl> - <dt>Who gets to see my email address?</dt> - <dd>If you submit an empty property, your details are provided to us and to the council. We will never give or sell your email address to -anyone else, unless we are obliged to by law.</dd> - <dt>Will you send nasty, brutish spam to my email address?</dt> - <dd>Never. We will email you if someone leaves an update on a -report you’ve made, and send you questionnaire emails four weeks and six months -after you submit a problem, asking for a status update; we’ll only ever -send you emails in relation to your report.</dd> - </dl> - <h2>Organisation Questions</h2> - <dl> - <dt>Who built this site?</dt> - <dd>This site was built by <a href="http://www.mysociety.org/">mySociety</a>. -mySociety is the project of a registered charity which has grown out of the community of -volunteers who built sites like <a href="http://www.theyworkforyou.com/">TheyWorkForYou</a>. -mySociety’s primary mission is to build Internet projects which give people simple, tangible -benefits in the civic and community aspects of their lives. Their first project -was <a href="http://www.writetothem.com/">WriteToThem</a>, where you can write to any of your -elected representatives, for free. -<a href="https://secure.mysociety.org/donate/">Donate to mySociety</a></dd> - <dt>Where’s the "source code" to this site?</dt> - <dd>The software behind this site is open source, and available -to you mainly under the GNU Affero GPL software license. You can <a -href="http://github.com/mysociety/fixmystreet">download the -source code</a> and help us develop it. -You’re welcome to use it in your own projects, although you must also -make available the source code to any such projects.</dd> - <dt>People build things, not organisations. Who <em>actually</em> built it?</dt> - <dd>This adaptation of <a href="https://www.fixmystreet.com/">Fix­MyStreet</a> -was written by Matthew Somerville. Thanks go to -<a href="http://www.ordnancesurvey.co.uk">Ordnance Survey</a> (for the maps, -UK postcodes, and UK addresses – data © Crown copyright, all -rights reserved, Ministry of Justice 100037819 2008), -Yahoo! for their BSD-licensed JavaScript libraries, the entire free software -community (this particular project was brought to you by Perl, PostgreSQL, -and the number 161.290) and <a -href="http://www.bytemark.co.uk/">Bytemark</a> (who kindly host all -our servers). - -Let us know if we’ve missed anyone.</dd> - </dl> - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/emptyhomes/alert/index.html b/templates/web/emptyhomes/alert/index.html deleted file mode 100644 index cbb2b45f9..000000000 --- a/templates/web/emptyhomes/alert/index.html +++ /dev/null @@ -1,5 +0,0 @@ -[% INCLUDE 'header.html', title => loc('Local RSS feeds and email alerts') %] - -<h1>[% loc('Local RSS feeds and email alerts') %]</h1> - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/emptyhomes/around/extra_text.html b/templates/web/emptyhomes/around/extra_text.html deleted file mode 100644 index a69aa8fbf..000000000 --- a/templates/web/emptyhomes/around/extra_text.html +++ /dev/null @@ -1,9 +0,0 @@ -[% -# Need to ignore any county council -FOR coun IN all_areas.values; - SET council = coun IF coun.type != 'CTY'; -END; -%] -<a href="/local/[% c.cobrand.short_name(council) | lower %]/"> - Find out local news and stats for [% council.name %] -</a> diff --git a/templates/web/emptyhomes/contact/blurb.html b/templates/web/emptyhomes/contact/blurb.html deleted file mode 100644 index f1a2aa611..000000000 --- a/templates/web/emptyhomes/contact/blurb.html +++ /dev/null @@ -1,3 +0,0 @@ -<p> -[% loc('We’d love to hear what you think about this website. Just fill in the form. Please don’t contact us about individual empty homes; use the box accessed from <a href="/">the front page</a>.') %] -</p> diff --git a/templates/web/emptyhomes/footer.html b/templates/web/emptyhomes/footer.html deleted file mode 100644 index 29af4df9f..000000000 --- a/templates/web/emptyhomes/footer.html +++ /dev/null @@ -1,43 +0,0 @@ -</div> -</div> - -<div id="emptyhomes-footer"> - -<div> -Empty Homes<br> -14-16 Cowcross Street<br> -London<br> -EC1M 6DG<br> -Tel: 020 3135 0674<br> -Email: <a href="mailto:info@emptyhomes.com">info@emptyhomes.com</a> -</div> - -<div> -<i>In conjunction with,</i> -</div> - -<div> -<i>in Wales:</i><br> -Shelter Cymru<br> -[% lang_code == 'cy' ? '25 Heol Walter<br>Abertawe' : '25 Walter Road<br>Swansea' %] -<br>SA1 5NN<br> -<a href="mailto:emptyhomes@sheltercymru.org.uk">emptyhomes@sheltercymru.org.uk</a> -</div> - -<div> -<i>in Scotland:</i><br> -Scottish Empty Homes Partnership<br> -Shelter Scotland<br> -6 South Charlotte Street<br> -Edinburgh EH2 4AW<br> -Tel: 0344 515 2461<br> -<a href="mailto:EmptyHomes@shelter.org.uk">EmptyHomes@shelter.org.uk</a> -</div> - -</div> - -[% INCLUDE 'debug_footer.html' %] - -</body> -</html> - diff --git a/templates/web/emptyhomes/front/stats.html b/templates/web/emptyhomes/front/stats.html deleted file mode 100644 index 5ecc415bf..000000000 --- a/templates/web/emptyhomes/front/stats.html +++ /dev/null @@ -1,7 +0,0 @@ -[% stats = c.cobrand.front_stats_data %] - -<div id="front_stats"> - <div>[% tprintf( loc("<big>%s</big> reports"), stats ) %]</div> - <!-- <div><a href="/local/">[% loc('Find latest local and national news') %]</a></div> --> - <div id="eha-app-link"><a href="https://itunes.apple.com/gb/app/empty-homes-spotter/id482550587?mt=8">Get the Empty Homes Spotter App for iPhone</a></div> -</div> diff --git a/templates/web/emptyhomes/header.html b/templates/web/emptyhomes/header.html deleted file mode 100644 index 0f6d1b3b8..000000000 --- a/templates/web/emptyhomes/header.html +++ /dev/null @@ -1,56 +0,0 @@ -<!doctype html> -<!--[if lt IE 7]><html class="ie6" lang="[% lang_code %]"><![endif]--> -<!--[if IE 7]> <html class="ie7" lang="[% lang_code %]"><![endif]--> -<!--[if IE 8]> <html class="ie8" lang="[% lang_code %]"><![endif]--> -<!--[if gt IE 8]><!--><html lang="[% lang_code %]"><!--<![endif]--> -<head> - -[% SET start = c.config.ADMIN_BASE_URL IF admin %] - - <link rel="stylesheet" type="text/css" href="[% start %][% version('/css/core.css') %]"> - <link rel="stylesheet" type="text/css" href="[% start %][% version('/cobrands/emptyhomes/css/css.css') %]"> - [% INCLUDE 'common_header_tags.html' %] - -</head> -<body> - -<div id="header"> - <a href="http://www.emptyhomes.com/"><img id="eha-logo" border="0" src="/cobrands/emptyhomes/eha-logo.jpeg" alt="Empty Homes Agency" width="91" height="71" align="left"></a> - <div> - <small><em>in conjunction with</em></small> - <br> - <a href="http://www.sheltercymru.org.uk/"><img border="0" src="/cobrands/emptyhomes/Sheltercymru47s.png" alt="Shelter Cymru" width="80" height="33" align="bottom"></a> - <a href="http://scotland.shelter.org.uk/housing_issues/more_homes/empty_homes"><img border="0" src="/cobrands/emptyhomes/SEHPlogo-bwS.png" alt="Scottish Empty Homes Partnership" width="131" height="40" align="bottom"></a> - <a href="http://www.channel4.com/"><img src="/cobrands/emptyhomes/c4logo.png" border="0" alt="Channel 4" align="bottom" width="30" height="40"></a> - <a href="http://www.tigeraspect.co.uk/"><img src="/cobrands/emptyhomes/tiger-aspect.png" border="0" alt="Tiger Aspect" align="bottom" width="113" height="30"></a> - </div> -</div> - -<div id="navigation"> - <ul> - <li><a href="/">[% loc("Report a problem") %]</a></li> - <li><a href="/reports">[% loc("All reports") %]</a></li> - <li><a href="/faq">[% loc("Help") %]</a></li> - <li><a href="/about">[% loc('About us') %]</a></li> - [% IF lang_code == 'en-gb' %] - <li><a href="http://cy.[% c.cobrand.base_host %][% c.req.uri.path_query %]">Cymraeg</a></li> - [% ELSE %] - <li><a href="http://en.[% c.cobrand.base_host %][% c.req.uri.path_query %]">English</a></li> - [% END %] - </ul> -</div> - -<ul id="meta"> - [% IF c.user_exists %] - <li>[% tprintf(loc('Signed in as %s'), c.user.name || c.user.email) %] - <li><a href="/auth/sign_out">[% loc('Sign out') %]</a></li> - [% ELSE %] - <li> </li> - [% END %] -</ul> - -<div id="wrapper"> -<div id="mysociety"> - - [% INCLUDE 'debug_header.html' %] - diff --git a/templates/web/emptyhomes/index-steps.html b/templates/web/emptyhomes/index-steps.html deleted file mode 100644 index c358205c0..000000000 --- a/templates/web/emptyhomes/index-steps.html +++ /dev/null @@ -1,13 +0,0 @@ -[%# NB: if the site is reenabled, this template should be deleted, -and we'll then defer to the version in templates/web/base/ again %] - -<h2> This site is currently suspended </h2> - -<ol class="big-numbers"> - - <li> If you would like to report an empty home, please contact your - local council in England or Empty Homes in Scotland</li> - <li> If you have recently reported an empty home you will be - contacted by email </li> - <li> If you have been contacted, please follow the instructions in your email </li> -</ol> diff --git a/templates/web/emptyhomes/index.html b/templates/web/emptyhomes/index.html deleted file mode 100644 index 1d17c3423..000000000 --- a/templates/web/emptyhomes/index.html +++ /dev/null @@ -1,57 +0,0 @@ -[% INCLUDE 'header.html', title = '' %] - -<div class="grid-50"> - <!-- - <h1 class="bl"> - <small>[% loc('Report, view, or discuss local problems') %]</small> - </h1> - - [% IF error %] - <p class="error">[% error %]</p> - [% END %] - - [% PROCESS 'around/postcode_form.html' %] - --> - - <div class="grid-50"> - [% INCLUDE 'front/stats.html' %] - </div> - -[% - recent_photos = c.cobrand.recent_photos('front', 2); - probs = c.cobrand.recent(); -%] -[% IF probs.size %] - <div class="grid-50"> - <h2 class="bl"><small>[% loc('Recently reported problems') %]</small></h2> - <ul id="nearby_lists"> - [% FOREACH p IN probs %] - <li> - <a href="/report/[% p.id %]">[% p.title | html %]</a> - <small>[% prettify_dt( p.confirmed, 1 ) %]</small> - </li> - [% END %] - </ul> - </div> -[% END %] - -</div> - -<div class="grid-50"> - <div id="eha_steps"> - [% INCLUDE 'index-steps.html', - question = c.cobrand.enter_postcode_text %] - </div> - - [% IF recent_photos.size %] - <p id="front_photos"> - [% FOREACH p IN recent_photos %] - <a href="/report/[% p.id %]"><img border="0" height="100" - src="[% p.photos.first.url_tn %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a> - [% END %] - </p> - [% END %] - -</div> - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/emptyhomes/report/banner.html b/templates/web/emptyhomes/report/banner.html deleted file mode 100644 index d473a777e..000000000 --- a/templates/web/emptyhomes/report/banner.html +++ /dev/null @@ -1,6 +0,0 @@ -[% IF problem.is_fixed %] -<p class="banner" id="fixed"> - [% loc('This problem has been fixed') %]. -</p> -[% END %] - diff --git a/templates/web/emptyhomes/report/new/councils_text_all.html b/templates/web/emptyhomes/report/new/councils_text_all.html deleted file mode 100644 index a2eae5efb..000000000 --- a/templates/web/emptyhomes/report/new/councils_text_all.html +++ /dev/null @@ -1,8 +0,0 @@ -<p> -[% - tprintf( - loc('All the information you provide here will be sent to <strong>%s</strong>.') - all_body_names.join( '</strong>' _ loc(' or ') _ '<strong>' ) - ); -%] -</p> diff --git a/templates/web/emptyhomes/report/new/councils_text_none.html b/templates/web/emptyhomes/report/new/councils_text_none.html deleted file mode 100644 index 088e6fa1d..000000000 --- a/templates/web/emptyhomes/report/new/councils_text_none.html +++ /dev/null @@ -1,10 +0,0 @@ -<p> -[% - nget( - "We do not yet have details for the council that covers this location.", - "We do not yet have details for the councils that cover this location.", - all_areas.size - ); -%] -[% loc("If you submit a report here it will be left on the site, but not reported to the council – please still leave your report, so that we can show to the council the activity in their area."); %] -</p> diff --git a/templates/web/emptyhomes/report/new/fill_in_details_form.html b/templates/web/emptyhomes/report/new/fill_in_details_form.html deleted file mode 100644 index 049ffa076..000000000 --- a/templates/web/emptyhomes/report/new/fill_in_details_form.html +++ /dev/null @@ -1,143 +0,0 @@ -<h1>[% loc('Report your problem') %]</h1> - - [% IF report.used_map %] - <p class="change_location">[% loc('Wrong location? Just click again on the map.') %]</p> - [% IF partial_token %] - <p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p> - [% END %] -[% END %] - -[% IF js %] - <p id="councils_text">[% - tprintf( - loc('All the information you provide here will be sent to <strong>%s</strong>.'), - loc('the local council') - ); - %] - </p> -[% ELSE %] - [% PROCESS 'report/new/councils_text.html' %] -[% END %] - -<p> -[% IF report.used_map %] - [% INCLUDE 'report/new/fill_in_details_text.html' %] -[% ELSE %] - [% loc('Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box.') %] -[% END %] -</p> - -[% INCLUDE 'errors.html' %] - -<div id="problem_form"> - -[% INCLUDE 'report/new/form_heading.html' %] - -<div class="fieldset"> - -[% IF field_errors.bodies %] - <div class='form-error'>[% field_errors.bodies %]</div> -[% END %] - -<div id="form_sign_in_yes"> - -<h3>[% loc('Public information (shown on site)') %]</h3> - -<p>[% loc('Please do not give address or personal information in this section.') %]</p> - -[% PROCESS "report/new/category_wrapper.html" %] - -[% IF field_errors.title %] - <div class='form-error'>[% field_errors.title %]</div> -[% END %] - -<div class="form-field"> - <label for="form_title">[% loc('Subject:') %]</label> - <input type="text" value="[% report.title | html %]" name="title" id="form_title" size="25" required> -</div> - -[% IF field_errors.detail %] - <div class='form-error'>[% field_errors.detail %]</div> -[% END %] - -<div class="form-field"> - <label for="form_detail">[% loc('Details:') %]</label> - <textarea name="detail" id="form_detail" rows="7" cols="26" required>[% report.detail | html %]</textarea> -</div> - -[% IF c.cobrand.allow_photo_upload %] - <input type="hidden" name="upload_fileid" value="[% upload_fileid %]" /> - <label for="form_photo">[% loc('Photo') %]</label> - [% IF field_errors.photo %] - <div class='form-error'>[% field_errors.photo %]</div> - [% END %] - - <div id="form_photos"> - [% IF upload_fileid %] - <p>[% loc('You have already attached photos to this report. Note that you can attach a maximum of 3 to this report (if you try to upload more, the oldest will be removed).') %]</p> - [% FOREACH id IN upload_fileid.split(',') %] - <img align="right" src="/photo/temp.[% id %]" alt=""> - [% END %] - [% END %] - <input type="file" name="photo1" id="form_photo"> - <label for="form_photo2">[% loc('Photo') %]</label> - <input type="file" name="photo2" id="form_photo2"> - <label for="form_photo3">[% loc('Photo') %]</label> - <input type="file" name="photo3" id="form_photo3"> - </div> -[% END %] - -</div> - -<div id="form_sign_in_no"> - -<h3>[% loc('Private information (not shown on site)') %]</h3> - -[% IF field_errors.address %] - <div class='form-error'>[% field_errors.address %]</div> -[% END %] - -<div class="form-field"> - <label for="form_address">[% loc('Property address:') %]</label> - <textarea name="address" id="form_address" rows="7" cols="26">[% report.extra.address | html %]</textarea> -</div> - - [% IF field_errors.name %] - <div class='form-error'>[% field_errors.name %]</div> - [% END %] - - <div class="form-field"> - <label for="form_name">[% loc('Your name:') %]</label> - <input type="text" required value="[% report.name | html %]" name="name" id="form_name" size="25"> - </div> - - [% IF field_errors.email %] - <div class='form-error'>[% field_errors.email %]</div> - [% END %] - - <div class="form-field"> - <label for="form_email">[% loc('Your email:') %]</label> - <input type="email" value="[% report.user.email | html %]" name="email" id="form_email" size="25" required> - </div> - - <div class="form-field"> - <label for="form_phone">[% loc('Phone:') %]</label> - <input type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" size="15"> - <small>[% loc('(optional)') %]</small> - </div> - - <p> - <input type="submit" value="[% loc('Submit') %]"> - </p> - -</div> - -[% IF partial_token %] - <input type="hidden" name="partial" value="[% partial_token.token %]"> -[% END %] - -<input type="hidden" name="submit_problem" value="1"> - -</div> -</div> - diff --git a/templates/web/emptyhomes/report/new/fill_in_details_text.html b/templates/web/emptyhomes/report/new/fill_in_details_text.html deleted file mode 100644 index b557a9942..000000000 --- a/templates/web/emptyhomes/report/new/fill_in_details_text.html +++ /dev/null @@ -1,6 +0,0 @@ -[% loc('Please fill in details of the empty property below, saying what type of -property it is e.g. an empty home, block of flats, office etc. Tell us -something about its condition and any other information you feel is relevant. -There is no need for you to give the exact address. 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.') %] diff --git a/templates/web/emptyhomes/report/new/form_heading.html b/templates/web/emptyhomes/report/new/form_heading.html deleted file mode 100644 index 911804a58..000000000 --- a/templates/web/emptyhomes/report/new/form_heading.html +++ /dev/null @@ -1 +0,0 @@ -<h2>[% loc('Empty property details form') %]</h2> diff --git a/templates/web/emptyhomes/report/new/notes.html b/templates/web/emptyhomes/report/new/notes.html deleted file mode 100644 index d355cc1ba..000000000 --- a/templates/web/emptyhomes/report/new/notes.html +++ /dev/null @@ -1 +0,0 @@ -[%# This file deliberately left empty - there are no notes for EmptyHomes %]
\ No newline at end of file diff --git a/templates/web/emptyhomes/reports/_ward-list.html b/templates/web/emptyhomes/reports/_ward-list.html deleted file mode 100755 index e69de29bb..000000000 --- a/templates/web/emptyhomes/reports/_ward-list.html +++ /dev/null diff --git a/templates/web/emptyhomes/reports/index.html b/templates/web/emptyhomes/reports/index.html deleted file mode 100755 index 8b8704134..000000000 --- a/templates/web/emptyhomes/reports/index.html +++ /dev/null @@ -1,29 +0,0 @@ -[% INCLUDE 'header.html', title = loc('Summary reports') %] - -<p> -[% loc("This is a summary of all reports on this site; select a particular council to see the empty homes news for that area.") %] -</p> - -<table cellpadding="3" cellspacing="1" border="0"> -<tr> -<th>[% loc('Name') %]</th> -<th>[% loc('New problems') %]</th> -<th>[% loc('Older problems') %]</th> -</tr> - -[% FOREACH body IN bodies %] -<tr align="center" -[%- IF NOT body.areas.size %] class="gone" -[%- ELSIF loop.count % 2 %] class="a" -[%- END -%] -> -<td align="left"><a href="/local/[% c.cobrand.short_name(body) | lower %]/">[% body.name %]</a></td> -<td>[% open.${body.id}.new or 0 %]</td> -<td>[% (open.${body.id}.older or 0) + (open.${body.id}.unknown or 0) + (fixed.${body.id}.new or 0) + (fixed.${body.id}.old or 0) %]</td> -</tr> - -[% END %] -</table> - -[% INCLUDE 'footer.html' %] - diff --git a/templates/web/emptyhomes/site-name.html b/templates/web/emptyhomes/site-name.html deleted file mode 100644 index 7fd286328..000000000 --- a/templates/web/emptyhomes/site-name.html +++ /dev/null @@ -1 +0,0 @@ -[% loc('Report Empty Homes') %] diff --git a/templates/web/emptyhomes/tokens/confirm_problem.html b/templates/web/emptyhomes/tokens/confirm_problem.html deleted file mode 100644 index a8a025058..000000000 --- a/templates/web/emptyhomes/tokens/confirm_problem.html +++ /dev/null @@ -1,42 +0,0 @@ -[% INCLUDE 'header.html', title => loc('Confirmation') %] - -<h1>[% loc('Confirmation') %]</h1> - -[% IF report.bodies_str %] - <p>[% - loc( - 'Thank you for reporting an empty property on ReportEmptyHomes.com. We have emailed the lead officer for empty homes in the council responsible with details, and asked them to do whatever they can to get the empty property back into use as soon as possible.' - ) - %]</p> - - <p>[% - loc( - 'It is worth noting however that the process can sometimes be slow, especially if the property is in very poor repair or the owner is unwilling to act. In most cases it can take six months or more before you can expect to see anything change and sometimes there may be considerable barries to a property being brought back into use. This doesn’t mean the council isn’t doing anything. We encourage councils to update the website so you can see what is happening. It may be a long process, but you reporting your concerns about this property to the council is a valuable first step.' - ) - %]</p> - - <p>[% - loc( - 'We may contact you periodically to ask if anything has changed with the property you reported.' - ) - %]</p> - - <p>[% - loc( - 'Thank you for using ReportEmptyHomes.com. Your action is already helping to resolve the UK’s empty homes crisis.' - ) - %]</p> -[% ELSE %] - <p>[% - loc( 'Thank you for reporting this empty property on ReportEmptyHomes.com. -At present the report cannot be sent through to the council for this area. We -are working with councils to link them into the system so that as many areas -as possible will be covered.') - %]</p> -[% END %] - -<p> - <a href="[% c.uri_for( '/report', report.id ) | html %]">[% loc('View your report') %]</a>. -</p> - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/fiksgatami/header.html b/templates/web/fiksgatami/header.html index ac607be8a..5bc0eaf4b 100644 --- a/templates/web/fiksgatami/header.html +++ b/templates/web/fiksgatami/header.html @@ -24,7 +24,7 @@ <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> <script src="[% start %][% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + [% INCLUDE 'common_header_tags.html' %] [% extra_js %] [% TRY %][% PROCESS 'header_extra.html' %][% CATCH file %][% END %] diff --git a/templates/web/fixmybarangay/_barangay_buttons.html b/templates/web/fixmybarangay/_barangay_buttons.html deleted file mode 100644 index 2925a487d..000000000 --- a/templates/web/fixmybarangay/_barangay_buttons.html +++ /dev/null @@ -1,4 +0,0 @@ -<p id="barangay_buttons"> - <a href="/around?latitude=10.322;longitude=123.907" class="yellow-btn">Bgy. Luz</a> - <a href="/around?latitude=10.288;longitude=123.870" class="yellow-btn">Bgy. Basak San Nicolas</a> -</p> diff --git a/templates/web/fixmybarangay/about/faq-en-gb.html b/templates/web/fixmybarangay/about/faq-en-gb.html deleted file mode 100644 index 6e8893143..000000000 --- a/templates/web/fixmybarangay/about/faq-en-gb.html +++ /dev/null @@ -1,167 +0,0 @@ -[% INCLUDE 'header.html', title => loc('Frequently Asked Questions'), bodyclass => 'twothirdswidthpage' %] - -<div class="sticky-sidebar"> - <aside> - <ul class="plain-list"> - <li><a href="#faq">Frequently Asked Questions</a></li> - <li><a href="#practical">Staff Questions</a></li> - <li><a href="#organisation">Organisation Questions</a></li> - </ul> - </aside> -</div> - -<h1><a name="faq"></a>Frequently Asked Questions</h1> - <dl> - <dt>What is FixMyBarangay?</dt> - <dd>FixMyBarangay is a site to help people report, view, -or discuss local problems they’ve found to the city departments. -The pilot project lets you report the problems by SMS (or dropping -into the barangay center). -</dd> - <dt>What areas are covered?</dt> - <dd> - The pilot project is just running in two barangays in Cebu – - Luz and Basak San Nicolas. - </dd> - <dt>What sort of problems should I report with FixMyBarangay?</dt> - <dd>The FixMyBarangay pilot project is just for potholes (and similar - road surface problems) and broken streetlights. - </dd> - - <dt>What isn’t FixMyBarangay for?</dt> - <dd>FixMyStreet is not a way of getting in touch with Cebu City Hall for other problems - – please use FixMyBarangay only for potholes and streetlights while the pilot - project is running.. - </dd> - - <dt>Staff only: How do I use the site?</dt> - <dd>If you have a staff login, you can view problems already reported in that area, -or report ones of your own simply by clicking on the map at the location of -the problem.</dd> - <dt>How are the problems solved?</dt> - <dd>Problems sent by SMS are initially handled by the barangay staff – they'll - confirm the problem and report it to the relevant department automatically. - Once it's in the department's problem-tracking system, they'll get onto it as - soon as they can.</dd> - <dt>Is it free?</dt> - <dd>The site is free to use, yes. The pilot project has been funded by the World Bank.</dd> - - </dl> - - <h2><a name="practical"></a>Staff questions</h2> - <dl> - <dt>What's my login?</dt> - <dd> - You can use your email address and set a password right away, but your - account won't be enabled as a <em>staff account</em> until one of the - system administrators has checked it. If you're not sure who to contact, try - <a href="mailto:[% c.config.CONTACT_EMAIL %]">[% c.config.CONTACT_EMAIL %]</a>. - </dd> - <dt>I've forgotten my password, what do I do?</dt> - <dd> - No problem — when you log in, if you can't remember your password we'll - send you a confirmation link which lasts for one session, and you can - reset your password once you've clicked on that. - </dd> - <dt>How do I sign out?</dt> - <dd> - Either click on <a href="/auth/sign_out">sign out</a> on the page you're on, - or quit the browser (just closing the window without quitting the browser is not enough). - </dd> - <dt>Reporting</dt> - <dd><p> - To make a new report, start by clicking on the button for either barangay <em>BSN</em> or <em>Luz</em>. - </p> - <ul> - <li> - <strong>To create a standalone report</strong> simply click on the map where the problem is. - </li> - <li> - <strong>To create a report from a text message</strong> log into Message Manager (see below), - then select the message you want to use (click on the radio button). When the message has gone - green, you can click on the map and the message will automatically be used to create the report. - You can edit the text, but that report will be associated with that incoming message. - </li> - </ul> - <p> - Once you've placed the pin, but before you press <em>Submit</em>, you can drag or reposition the pin - if you want to change its position. - </p> - <p> - Choose the category for this report ‐ obviously, this helps FixMyBarangay decide to which - department the report will be sent. - </p> - </dd> - <dt>How do I see the SMS messages people have sent?</dt> - <dd>When you look at the barangay problems, click on <em>Problems via text</em> - (or, if you're viewing a specific report, click <em>Show messages</em>) to see the - currently available messages. You'll need a username and password - for the Message Manager (your manager will have told you what these - are). Note that you can only see messages that have not yet been used to - create a report (and also their replies). - </dd> - <dt>Is my Message Manager username and password the same as the ones I use for FixMyBarangay?</dt> - <dd> - No, it's a separate account (some FMB users don't have any access to the SMS messages). - Your manager will tell you what your login for Message Manager system is, if you have one. - </dd> - <dt>I tried to work with a message but it said "Someone is working with that message right now!" What's up?</dt> - <dd> - This means another staff member has a "lock" on the message. To prevent you both creating - a report, or sending a reply, we use a first-come-first-serve locking mechanism. - Collisions like this are rare, but if they do happen, try again a few minutes later - because the lock may have expired by then. - </dd> - <dt>Can I delete a message?</dt> - <dd> - Yes. Click on the red cross when you hover over it (although really you're only hiding it so - it never gets shown within FixMyBarangay). - You need a manager's account in the Message Manager to be able to see any - messages that have been hidden, so hiding them is as good as deleting them. - </dd> - <dt>It looks like an incoming message is wrongly shown as a reply. Can I fix it?</dt> - <dd> - FixMyBarangay tries to recognise SMS replies, and automatically matches them to the right thread. If it - gets this wrong you can click on the <em>detach</em> button. The message will then be a new "available" - message. If Message Manager got it wrong the other way round, and missed a reply, you can fix this too - but you need to log into Message Manager with a manager's account to do it. - </dd> - <dt>How do the replies get back to the original sender?</dt> - <dd> - Although you're replying from within FixMyBarangay, the replies are sent by SMS. - There may be a delay of a several minutes between the moment you press <strong>reply</strong> - and the message's arrival. - </dd> - <dt>How can I tell the original sender their problem has been fixed?</dt> - <dd> - Go to the report. If the report is marked "this report was submitted by SMS", you can send a reply. - Click on <em>Show Messages</em>. When the messages appear, click on <em>Show messages for - <strong>this</strong> report</em>. Hover over the message you want to send the message to, and - click <em>Reply</em>. - </dd> - - <h2><a name="organisation"></a>Organisation Questions</h2> - <dl> - <dt>Who built FixMyBarangay?</dt> - <dd>This site was built by <a href="http://www.mysociety.org/">mySociety</a>, in conjunction with the <a href="www.worldbank.org/">World Bank</a>. -mySociety is the project of a registered charity which has grown out of the community of -volunteers who built sites like <a href="http://www.theyworkforyou.com/">TheyWorkForYou.com</a> in the UK. -mySociety’s primary mission is to build Internet projects which give people simple, tangible -benefits in the civic and community aspects of their lives. -The charity is called UK Citizens Online Democracy and is charity number 1076346. mySociety -can be contacted by email at <a href="mailto:hello@mysociety.org">hello@mysociety.org</a>, -or by post at:<br> -mySociety<br> -483 Green Lanes<br> -London<br> -N13 4BS<br> -UK</dd> - <dt>I’d like a site like this for my own location/ where’s the "source code" to this site?</dt> - <dd> -The software behind this site is open source, and available -to you mainly under the GNU Affero GPL software license. -See <a href="http://fixmystreet.org/">fixmystreet.org</a> for more information about setting up -and running sites like these. -</dd> - </dl> -[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/fixmybarangay/alert/_list.html b/templates/web/fixmybarangay/alert/_list.html deleted file mode 100644 index 8491b4562..000000000 --- a/templates/web/fixmybarangay/alert/_list.html +++ /dev/null @@ -1,45 +0,0 @@ - <input type="hidden" name="type" value="local"> - <input type="hidden" name="pc" value="[% pc | html %]"> - - - <p> - [% loc("Subscribe to an alert based upon what baranagay you’re in:") %] - </p> - - [% INCLUDE 'errors.html' %] - - <div id="rss_list"> - <p><strong> - [% loc('Problems within the boundary of:') %] - </strong></p> - <ul class="plain-list"> - - [% FOREACH option IN options %] - <li[% IF ! (loop.count % 2) %] class="a"[% END %]> - <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]> - <label class="inline" for="[% option.id %]">[% option.text %]</label> - <a href="[% option.uri %]"><img src="/i/feed.png" width="16" height="16" -title="[% option.rss_text %]" alt="RSS feed" border="0"></a> - </li> - [% END %] -</ul> - - <p> - <input type="submit" name="rss" value="[% loc('Give me an RSS feed') %]"> - <p> - - <p id="alert_or"> - [% loc('or') %] - </p> - - [% UNLESS c.user_exists %] - <p> - [% loc('Your email:') %] <input type="text" id="rznvy" name="rznvy" value="[% rznvy | html %]" size="30"> - </p> - [% END %] - - <p> - <input type="submit" name="alert" value="[% loc('Subscribe me to an email alert') %]"> - </p> - </div> <!-- ???? --> - diff --git a/templates/web/fixmybarangay/alert/index.html b/templates/web/fixmybarangay/alert/index.html deleted file mode 100644 index c842a7683..000000000 --- a/templates/web/fixmybarangay/alert/index.html +++ /dev/null @@ -1,45 +0,0 @@ -[% INCLUDE 'header.html', title = loc('Local RSS feeds and email alerts'), bodyclass = 'twothirdswidthpage' %] - -<h1>[% loc('Local RSS feeds and email alerts') %]</h1> - -<p> -FixMyBarangay has a RSS feeds and email alerts for local problems. -</p> - -[% IF location_error %] - <div class="error">[% location_error %]</div> -[% ELSE %] - [% INCLUDE 'errors.html' %] -[% END %] - -[% options = [ { - id => 'area:1:Luz', - text => 'Luz', - uri => '/rss/area/Luz' - }, - { - id => 'area:2:Basak_San_Nicolas', - text => 'Basak San Nicolas' - uri => '/rss/area/Basak+San_Nicolas' - } ]; -%] - -<form id="alerts" name="alerts" method="post" action="/alert/subscribe"> - -[% IF photos.size %] -<div id="alert_recent"> - <aside> - <h2>[% loc('Some photos of recent reports') %]</h2> - [% FOREACH p IN photos %] - <a href="/report/[% p.id %]"><img border="0" height="100" - src="[% p.photos.first.url_tn %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a> - [% END %] - </aside> -</div> -[% END %] - -[% INCLUDE 'alert/_list.html' %] - -</form> - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/fixmybarangay/around/intro.html b/templates/web/fixmybarangay/around/intro.html deleted file mode 100644 index b876de453..000000000 --- a/templates/web/fixmybarangay/around/intro.html +++ /dev/null @@ -1,2 +0,0 @@ - <h1>View local problems</h1> - <h2>(potholes or street lighting)</h2> diff --git a/templates/web/fixmybarangay/around/tabbed_lists.html b/templates/web/fixmybarangay/around/tabbed_lists.html deleted file mode 100644 index f2f257b03..000000000 --- a/templates/web/fixmybarangay/around/tabbed_lists.html +++ /dev/null @@ -1,18 +0,0 @@ -[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body); - -IF allow_creation %] -<menu id="problems-nav" class="tab-nav"> - <ul> - <li><a href="#current">Problems on the map</a></li> - <li><a href="#message_manager">Problems via text</a></li> - </ul> -</menu> -[% END %] - -<ul id="current" class="item-list item-list--reports tab"> - [% INCLUDE "around/on_map_list_items.html" %] -</ul> - -[% IF allow_creation %] - [% INCLUDE 'report/_message_manager.html' %] -[% END %] diff --git a/templates/web/fixmybarangay/footer.html b/templates/web/fixmybarangay/footer.html deleted file mode 100644 index d1f9203f2..000000000 --- a/templates/web/fixmybarangay/footer.html +++ /dev/null @@ -1,188 +0,0 @@ - </div><!-- .content role=main --> - </div><!-- .container --> - </div><!-- .table-cell --> - - <div class="nav-wrapper"> - <div class="nav-wrapper-2"> - <div id="main-nav" role="navigation"> - <ul class="nav-menu nav-menu--mysoc"> - <li><a id="mysoc-logo" href="http://www.mysociety.org/">mySociety</a></li> - </ul> - - <ul class="nav-menu nav-menu--main"> - <li><a href="/around?latitude=10.322;longitude=123.907" class="fmb-bgy-btn">Luz</a></li> - <li><a href="/around?latitude=10.288;longitude=123.870" class="fmb-bgy-btn">BSN</a></li> - <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn" - >View problems</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END - %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END - %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END - %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li> - </ul> - </div> - </div> - </div> - -[% IF global.want_fmb_hidden_dialogs %] - <!-- fancybox hidden dialogues for message-manager reply/hide/help --> - <div style="display:none"> - <div id="reply-form-container"> - <form action="#" id="reply-form" onsubmit="event.returnValue = false; return false;" method="post" accept-charset="utf-8"> - <div style="display:none;"> - <input type="hidden" name="_method" value="POST"/> - </div> - <!-- populated by Ajax call --> - <div class="input" id="mm-boilerplate-replies-box"> - <label for="boilerplate-replies">Use preloaded reply:</label> - <select name="boilerplate-replies" id="mm-boilerplate-replies"></select> - </div> - <div class="input text"> - <label for="reply_text">Reply text</label> - <textarea name="reply_text" id="reply_text" cols="32" rows="3"></textarea> - </div> - <input type="hidden" name="message_id" id="reply_to_msg_id"/> - <div class="submit"> - <input id="reply-submit" type="submit" value="Send Reply"/> - </div> - </form> - </div> - </div> - <div style="display:none"> - <div id="hide-form-container"> - <p style="color:#000">Hiding message: <span id="hide-form-message-text"></span></p> - <form action="#" id="hide-form" onsubmit="event.returnValue = false; return false;" method="post" accept-charset="utf-8"> - <div style="display:none;"> - <input type="hidden" name="_method" value="POST"/> - </div> - <!-- populated by Ajax call --> - <div class="input" id="mm-boilerplate-hide-reasons-box"> - <label for="boilerplate-hide-reasons">Use preloaded reason:</label> - <select name="boilerplate-hide-reasons" id="mm-hide-reasons"></select> - </div> - <div class="input textarea"> - <label for="reason_text">Reason for hiding message</label> - <textarea name="reason_text" id="reason_text" cols="32" rows="3"></textarea> - </div> - <input type="hidden" name="msg_id" id="hide_msg_id"/> - <div class="submit"> - <input id="hide-submit" type="submit" value="Hide Message"/> - </div> - </form> - </div> - </div> - <div style="display:none"> - <div id="detach-form-container" class="fancybox-popup"> - <p> - Are you sure you want to detach this message? - </p> - <p> - Message Manager probably thinks this message is a reply because - it came in from a number to which we'd recently sent an outward reply. - </p> - <p> - If you detach the message, it will appear as a new, available message (instead of being a reply). - </p> - <form action="/dummy" id="detach-form" onsubmit="event.returnValue = false; return false;" method="post" accept-charset="utf-8"> - <div style="display:none;"> - <input type="hidden" name="_method" value="POST"> - </div> - <input type="hidden" name="msg_id" id="detach_msg_id"> - <div class="submit"> - <input id="detach-submit" type="submit" value="Detach Message"> - </div> - </form> - </div> - </div> - <div style="display:none"> - <div id="mm-help" style="font-size:90%;"> - <h2> Accessing Message Manager from FixMyBarangay (FMB)</h2> - <h3> - Logging into Message Manager - </h3> - <p> - You'll need a username and password (ask your manager if you haven't already got one). Your Message Manager password - might not be the same as your FMB password. - </p> - <p> - When you've logged in, you'll see the currently available messages (and any replies that have been sent to them). - You <em>only</em> see messages that are waiting to be used to make reports, and which are tagged with the keywords - your login allows you to see (these may mean you only see messages for your own barangay). - If you want to see any other messages, you'll need to have a manager or admin account on Message Manager: click on the - <a href="[% c.config.MESSAGE_MANAGER_URL %]">admin</a> link to get there. - </p> - <p> - [% IF global.is_fmb_creation_page %] - <h3> - Creating a new report from a message - </h3> - <p> - If you want to use a message to create a problem report, you'll need to select it first. Click on the radio button. When the message - is selected, it will go bright green. Now when you click on the map, the report will be used to create the report. - </p> - <p> - To stop two people replying to a message at the same time, if anyone else has just started working on it, you'll see a message - warning you, and you won't be able to select the radio button. Normally, if nobody works with a message, such a lock is released - after about 3 minutes. - </p> - [% ELSE %] - <p> - Click <strong>show messages for this report</strong> to see - the message (or messages) that contributed to this report. Often this will be a single message - if the problem was submitted by SMS. But it will also include any messages that have been - added as updates, as well as any replies that were sent back by barangay staff. - As well as letting you review the background to the report, this also lets you reply (for example, - to notify the original reporter that the problem has been fixed). - </p> - <h3> - Adding a message as an update to this report - </h3> - <p> - If you want to add this message's contents as an update to this report, you'll need to select it first. Click - on the radio button. When the message is selected, it will go bright green. Now when you click on the - <strong>COPY TO UPDATE</strong> button, the message text will be added to this report's update text. - You can edit the text before clicking <strong>POST</strong>. - </p> - [% END %] - <h3> - <span class="demo_detach_btn">detach</span> Detaching a message ("not a reply") - </h3> - <p> - Message Manager tries to notice when an incoming message is a reply. Sometimes it guesses wrong. To detach a - message from its parent — that is, to mark it as <em>not a reply</em>, hover over the message and click - <span class="demo_detach_btn">detach</span>. - </p> - - <h3> - <span class="demo_reply_btn">reply</span> Replying to a message - </h3> - <p> - You can send an SMS back to the original sender: just hover over the message and click <span class="demo_reply_btn">reply</span>. It will usually - take a few minutes for the message to arrive. - </p> - <h3> - <span class="demo_info_btn">i</span> Getting message info - </h3> - <p> - Hover over a message and click on its <span class="demo_info_btn">i</span> button to see when it was sent. - You can also see the sender, although not their - actual number (instead the number is scrambled, but will be the <em>same scrambled number</em> on other messages they've sent). - </p> - <h3> - <span class="demo_hide_btn">X</span> Hiding a message - </h3> - <p> - If a message can't be used to create a report, you can hide it by hovering over it and clicking its <span class="demo_hide_btn">X</span> button. If you're not - going to create a problem report with this message, you might like to reply first, to tell the person who sent the message why not. - When you click the X, give a reason why you're hiding it so other staff (managers in Message Manager) can see why the message was hidden. - </p> - </div> - </div> - -[% END %] - -<!-- [% INCLUDE 'debug_footer.html' %] --> - </div> <!-- .wrapper --> -</body> -</html> diff --git a/templates/web/fixmybarangay/header.html b/templates/web/fixmybarangay/header.html deleted file mode 100644 index 739f4c761..000000000 --- a/templates/web/fixmybarangay/header.html +++ /dev/null @@ -1,79 +0,0 @@ -<!doctype html> -<!--[if lt IE 7]><html class="no-js ie6 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 7]> <html class="no-js ie7 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 8]> <html class="no-js ie8 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 9]> <html class="no-js ie9" lang="[% lang_code %]"><![endif]--> -<!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> - <head> - <meta name="viewport" content="initial-scale=1.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> - <meta name="HandHeldFriendly" content="true"> - <meta name="mobileoptimized" content="0"> - -[% SET start = c.config.ADMIN_BASE_URL IF admin %] - - <link rel="stylesheet" href="[% start %][% version('/cobrands/fixmybarangay/base.css') %]"> - <link rel="stylesheet" href="[% start %][% version('/cobrands/fixmybarangay/layout.css') %]" media="(min-width:48em)"> - [% extra_css %] - <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% start %][% version('/cobrands/fixmybarangay/layout.css') %]"> - <![endif]--> - - <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> - <script src="[% start %][% version('/cobrands/fixmybarangay/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html' js_override = '/cobrands/fixmystreet/fixmystreet.js' %] - [% extra_js %] - - [% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body); %] - [% IF allow_creation %] - <link rel="stylesheet" href="[% start %][% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]"> - <script src="[% start %][% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script> - <script src="[% start %][% version('/cobrands/fixmybarangay/message_manager_client.js') %]" charset="utf-8"></script> - <script> - $(document).ready(function() { - - $('#mm_sign_out').click(function(){ - message_manager.sign_out(); - }); - - [% IF c.req.params.external_source_id && problem && problem.external_source_id.match('^\d+$') %] - var mm_msg_id ="[% c.req.params.external_source_id %]"; - var fms_id = "[% problem.id %]"; - if (mm_msg_id && fms_id) { - message_manager.config({url_root: "[% c.config.MESSAGE_MANAGER_URL %]"}); - message_manager.assign_fms_id(mm_msg_id, fms_id); - } - [% END %] - }); - </script> - [% END %] - </head> - <body class="[% bodyclass | html IF bodyclass %]"> - - <div class="wrapper"> - <div class="table-cell"> - <header id="site-header" role="banner"> - <div class="container"> - <a href="/" id="site-logo">FixMyBarangay</a> - <a href="#main-nav" id="nav-link">Main Navigation</a> - </div> - </header> - - <div id="user-meta"> - [% IF c.user_exists %] - <p> - [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] - <a href="/auth/sign_out" id="mm_sign_out">[% loc('sign out') %]</a> - </p> - [% ELSE %] - <!-- <a href="/auth">[% loc('Sign in') %]</a> --> - [% END %] - </div> - - [% pre_container_extra %] - - <div class="container"> - <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> - - <!-- [% INCLUDE 'debug_header.html' %] --> diff --git a/templates/web/fixmybarangay/report/_message_manager.html b/templates/web/fixmybarangay/report/_message_manager.html deleted file mode 100644 index e937066ff..000000000 --- a/templates/web/fixmybarangay/report/_message_manager.html +++ /dev/null @@ -1,312 +0,0 @@ -[% IF c.user && c.user.from_body %] - -[% IF problem.external_source_id && problem.external_source == c.config.MESSAGE_MANAGER_URL %] - <p class="mm-submitted-by-sms"> - [%# OK to link to Message Manager here because (currently) we're only showing this to staff users %] - <a href="[%= problem.external_source %]messages/view/[%= problem.external_source_id %]" - title="view in Message Manager admin"><img - src="/cobrands/fixmybarangay/images/mobile-22x40.png" alt="SMS"></a> - This report was submitted via SMS. - </p> -[% END %] - -[% IF problem.id %] - <div id="mm-container-for-report-btns"> - <input type="button" class="green-btn" value="Show Messages" id="show_messages"> - </div> -[% END %] - -<ul id="message_manager" class="item-list item-list--reports tab" style="display: none"> - <li id="mm-admin-buttons"> - [% IF problem.id %] - <a style="float:left" id="mm-link-to-toggle-archive" href="#" title="show the message(s) associated with this report">show message for <b>this</b> report</a> - [% END %] - <a id="mm-link-to-refresh" href="#" title="update list of messages">refresh</a> - <a id="mm-link-to-admin" href="[% c.config.MESSAGE_MANAGER_URL %]" title="jump to Message Manager admin">admin</a> - <a id="mm-link-to-help" href="#mm-help" title="show help information">help</a> - </li> - <li id="message-control"> - <div id="mm-username-container">username: <span id="mm-received-username"></span></div> - <div id="mm-status-message-container"> - <img id="mm-spinner" src="/cobrands/fixmybarangay/images/fmb-spinner-16x16.gif" alt=""/> - <p id="mm-status-message"></p> - </div> - <div id="mm-login-container"> - <div> - <label for="mm-htauth-username">Username:</label> - <input name="mm-htauth-username" id="mm-htauth-username" type="text"/> - </div> - <div> - <label for="mm-htauth-password">Password:</label> - <input name="mm-htauth-password" id="mm-htauth-password" type="password"/> - </div> - <div class="submit"> - <input id="available-submit" type="submit" value="Get available messages" class="green-btn"/> - </div> - </div> - </li> - <li> - <div id="mm-message-list" style="min-height:1em;"></div> - </li> -</ul> - -<script type="text/javascript"> - -$(document).ready(function() { - var $mm_message_list = $('#mm-message-list'); - var mm_url = "[% c.config.MESSAGE_MANAGER_URL %]"; // from config - - [%# note that the presence of a problem id implies that this is a report view page, not a problem creation page %] - var problem_id = "[% problem.id %]"; - - var dummy_busy = false; - var fms_username = "[% c.user.email | replace('\@.*', '') %]"; - var timeout_id = 0; - var can_refresh = true; // disable refresh - var refresh_period = 60000 * 3; // refresh messages every three minutes - var has_archive_message = false; - - function sanitise_id(css_id) { - return css_id.replace(/\D/g, ""); - } - - // call this to push the auto-refresh timeout off so it's only triggered - // if there's no activity for a while - function reset_timeout() { - if (mm_url && refresh_period && can_refresh) { - if (timeout_id) { - clearTimeout(timeout_id); - } - timeout_id = setTimeout(mm_refresh_messages, refresh_period); - } - } - - var mm_refresh_messages = function() { - $('#mm-link-to-refresh').fadeOut(); - $('#available-submit').click(); - } - - var mm_populate_list = function(data) { - $('#mm-status-message-container').find('p').text("Accessed Message Manager as " + data['username']); - $('input[name=mm_text]').prop('checked', false); // uncheck all - $('#mm-link-to-refresh').delay(2000).fadeIn(); - reset_timeout(); - } - - var mm_selected_message = function(data) { - var msg_text = ""; - var service_id = ""; - $('li.msg-is-active', $mm_message_list).removeClass('msg-is-active'); - if (data['success']) { - // msg_text = $('#form_detail').val( $('input[name=mm_text]:checked').val() ); # == message data - msg_text = data['data']['Message']['message']; - service_id = data['data']['Message']['id']; - $('#msg-' + service_id).addClass('msg-is-active'); - } else { - $('input[name=mm_text]').prop('checked', false); // uncheck all - } - $('#form_detail').val(msg_text); - $('#external_source_id').val(service_id); - } - - var reply_cleanup = function(data) { - reset_timeout(); - $('#reply_text').val(''); - dummy_busy = false; - mm_refresh_messages(); - } - - var hide_cleanup = function(data) { - reset_timeout(); - $('#reason_text').val(''); - dummy_busy = false; - } - - var detach_cleanup = function(data) { - reset_timeout(); - dummy_busy = false; - mm_refresh_messages(); // refresh because detached message now appears in the list - } - - var custom_tooltips; - if (problem_id) { // this page is viewing, not creating - custom_tooltips = {tt_radio: "Select before clicking 'Copy to Update' to add this message as an update"}; - } - message_manager.config({ - url_root: mm_url, - tooltips: custom_tooltips, - want_nice_msgs: true - }); - message_manager.setup_click_listener({callback:mm_selected_message}); - - // problem form hidden input "external_source_id": pass the MM id into FMS, if used - var $problem_form = $('#problem_form').size()? $('#problem_form') : $('#form_update_form'); - $('<input type="hidden"/>').attr({ - 'id': 'external_source_id', - 'name': 'external_source_id', - }).appendTo($problem_form); - - $('#available-submit').click(function(e){ - e.preventDefault(); - reset_timeout(); - message_manager.get_available_messages({ - callback: mm_populate_list, - suggest_username: fms_username, - fms_id: problem_id, - anim_duration: 500 - }); - }); - $('#available-submit').click(); - - $mm_message_list.on('mouseover', 'li.mm-msg', function(e){ - e.stopPropagation(); // because replies are nested - $('.mm-msg-action', $mm_message_list).stop().fadeOut(200); - $(this).find('> .mm-msg-action').stop().show(); - }); - - $('#mm-message-list').on('click', '.mm-info', function(e){ - reset_timeout(); - message_manager.show_info(sanitise_id($(this).parent().attr('id'))); - }); - - $('#mm-hide-reasons').change(function(e){ - $('#reason_text').val($(this).val()); // load reason_text with boilerplate reason - }); - $('#mm-boilerplate-replies').change(function(e){ - var old_txt = $('#reply_text').val(); - var new_txt = $(this).val().replace(/(^\.\.\.|\.\.\.$)/, old_txt); - $('#reply_text').val(new_txt); // load reply_text with boilerplate reason - }); - - $('#reply-submit').click(function(e) { - e.preventDefault(); - // TODO: pending fancybox callbacks working, force dummy_busy here - // this is possibly overly cautious anyway - dummy_busy = false; - if (! dummy_busy) { - dummy_busy = true; - message_manager.reply( - $('#reply_to_msg_id').val(), - $('#reply_text').val(), - {callback:reply_cleanup}); - } - }); - - $('#hide-submit').click(function(e) { - e.preventDefault(); - reset_timeout(); - // TODO: pending fancybox callbacks working, force dummy_busy here - // this is possibly overly cautious anyway - dummy_busy = false; - if (! dummy_busy) { - dummy_busy = true; - message_manager.hide( - $('#hide_msg_id').val(), - $('#reason_text').val(), - {callback:hide_cleanup}); - } - }); - - $('#detach-submit').click(function(e) { - e.preventDefault(); - if (! dummy_busy) { - dummy_busy = true; - message_manager.mark_as_not_a_reply( - $('#detach_msg_id').val(), - {callback:detach_cleanup}); - } - }); - - $("a#reply").fancybox({onClosed: function(){dummy_busy=false;}}); - - // only show on problem display page - if (problem_id) { - $('<input type="button" value="Copy to update"/>').attr({ - 'id': 'copy_to_update', - 'name': 'copy_to_update', - 'class': 'green-btn', - 'title': "add the selected message's text as an update to this report" - }).appendTo($('#mm-container-for-report-btns')); - } - - $('#copy_to_update').click(function(e){ - reset_timeout(); - e.preventDefault(); - $('#mm-message-list input:checked').each( function(index) { - var id = $(this).attr('id'); - id = id.replace('mm_text_',''); - $('#external_source_id').val(id); - $('#form_update').val( $(this).val() ); - $('#form_update_form').on('submit', function(e) { - message_manager.assign_fms_id( $('#external_source_id').val(), problem_id, { 'is_async': false } ); - }); - }); - }); - - $('#show_messages').on('click', function(e) { - $('#message_manager').slideToggle(1000); - if ($('#show_messages').val() == 'Show Messages') { - $('#show_messages').val('Hide Messages'); - $('#copy_to_update').stop(true,true).fadeIn(); - } else { - $('#show_messages').val('Show Messages'); - $('#copy_to_update').stop(true,true).fadeOut(); - } - - }); - - $('#mm-link-to-refresh').on('click', function(e) { - e.preventDefault(); - mm_refresh_messages(); - }); - - // suppress fading control while archive messages are displayed, for now - $('#mm-link-to-toggle-archive').on('click', function(e) { - e.preventDefault(); - $('#mm-link-to-toggle-archive').fadeOut(); - if ($('.mm-current', $mm_message_list).is(':visible')) { - $('#copy_to_update').stop(true,true).fadeOut(); - $('#mm-link-to-refresh').stop(true,true).fadeOut(); - $('.mm-empty', $mm_message_list).stop(true,true).fadeOut(); - $('.mm-current', $mm_message_list).stop(true,true).slideUp(1000, function(){ - if($('.mm-archive', $mm_message_list).find('li').length == 0) { - message_manager.say_status("No messages found for this report,"); - } else { - message_manager.say_status("Messages for this report:"); - }; - $('.mm-archive', $mm_message_list).stop(true,true).slideDown(1000, function(){ - $('#mm-link-to-toggle-archive').html('show all available messages') - .attr('title', 'show all available messages (for adding updates)'); - $('#mm-link-to-toggle-archive').fadeIn(); - can_refresh = false; - }) - }); - } else { - $('.mm-archive', $mm_message_list).stop(true,true).slideUp(1000, function(){ - message_manager.say_status("Available messages:"); - $('.mm-current', $mm_message_list).stop(true,true).slideDown(1000, function(){ - $('#mm-link-to-toggle-archive').html("show message for <b>this</b> report") - .attr('title', 'show the original message(s) for this report'); - $('#copy_to_update').stop(true,true).fadeIn(); - $('#mm-link-to-toggle-archive').stop(true,true).fadeIn(); - $('#mm-link-to-refresh').stop(true,true).fadeIn(); - $('.mm-empty', $mm_message_list).stop(true,true).fadeIn(); - can_refresh = true; - reset_timeout(); - }) - }); - } - }); - - $("a#mm-link-to-help").fancybox(); - - message_manager.populate_boilerplate_strings('hide-reason'); - message_manager.populate_boilerplate_strings('reply'); -}); - -</script> - -[% global.want_fmb_hidden_dialogs = 1 %] -[% global.is_fmb_creation_page = problem.id? 0 : 1 %] - -[% END %] diff --git a/templates/web/fixmybarangay/report/new/councils_text.html b/templates/web/fixmybarangay/report/new/councils_text.html deleted file mode 100644 index 0001b0e68..000000000 --- a/templates/web/fixmybarangay/report/new/councils_text.html +++ /dev/null @@ -1,5 +0,0 @@ -<p> -The information provided here will be displayed publicly on the site as well as being sent to the -relevant authority (DPWH, DEPW, or DPS). -If you select a "bgy. will fix" category, then your report will be emailed to the barangay team. -</p> diff --git a/templates/web/fixmybarangay/report/new/fill_in_details_text.html b/templates/web/fixmybarangay/report/new/fill_in_details_text.html deleted file mode 100644 index 51dc1e3f1..000000000 --- a/templates/web/fixmybarangay/report/new/fill_in_details_text.html +++ /dev/null @@ -1,12 +0,0 @@ -[% - IF area_ids_to_list.size != 0; - loc('Please fill in details of the problem below. Leave as much detail as you can, -and if possible describe the exact location of -the problem (e.g. if there is a streetlight number or road name).'); - IF category_extras; - ' ' _ loc('Some categories may require additional information.'); - END; - ELSE; - loc('Please fill in details of the problem below.'); - END; -%] diff --git a/templates/web/fixmybarangay/report/new/notes.html b/templates/web/fixmybarangay/report/new/notes.html deleted file mode 100644 index c330816b9..000000000 --- a/templates/web/fixmybarangay/report/new/notes.html +++ /dev/null @@ -1,7 +0,0 @@ -<p>[% loc("Please note:") %]</p> - -<ul class="plain-list"> - <li>[% loc("Be sure to choose the right category, because we use that to determine to whom the report is sent.") %]</li> - <li>[% loc("Writing your message entirely in block capitals makes it hard to read, as does a lack of punctuation.") %]</li> - <li>[% loc("Remember that, for the pilot project, FixMyBarangay is only for reporting potholes and streetlights in bgy. Luz or Basak San Nicolas.") %]</li> -</ul> diff --git a/templates/web/fixmybarangay/reports/index.html b/templates/web/fixmybarangay/reports/index.html deleted file mode 100755 index 984e0d472..000000000 --- a/templates/web/fixmybarangay/reports/index.html +++ /dev/null @@ -1,42 +0,0 @@ -[% INCLUDE 'header.html', title = loc('Summary reports'), bodyclass => 'fullwidthpage' %] - -<h1>[% loc('All Reports') %]</h1> - -<div class="intro"> -<p> -[% loc('This is a summary of all reports on this site; select a particular barangay to see the reports sent there.') %] - -</p> -</div> - -<table cellpadding="3" cellspacing="1" border="0" class="nicetable"> -<thead> -<tr> -<th class="title">[% loc('Name') %]</th> -<th class="data">[% loc('New <br>problems') %]</th> -<th class="data">[% loc('Older <br>problems') %]</th> -<th class="data">[% loc('Old / unknown <br>problems') %]</th> -<th class="data">[% loc('Recently <br>fixed') %]</th> -<th class="data">[% loc('Older <br>fixed') %]</th> -</tr> -</thead> - -<tbody> -[% FOREACH body IN bodies %] -<tr align="center" -[%- IF ! (loop.count % 2) %] class="a" -[%- END %]> -<td class="title"><a href="[% body.url(c) %]">[% body.name %]</a></td> -<td class="data">[% open.${body.id}.new or 0 %]</td> -<td class="data">[% open.${body.id}.older or 0 %]</td> -<td class="data">[% open.${body.id}.unknown or 0 %]</td> -<td class="data">[% fixed.${body.id}.new or 0 %]</td> -<td class="data">[% fixed.${body.id}.old or 0 %]</td> -</tr> -[% TRY %][% PROCESS "reports/_extras.html" %][% CATCH file %][% END %] -[% END %] -</tbody> -</table> - - -[% INCLUDE 'footer.html', pagefooter = 'yes' %] diff --git a/templates/web/fixmybarangay/site-name.html b/templates/web/fixmybarangay/site-name.html deleted file mode 100644 index 075d881b5..000000000 --- a/templates/web/fixmybarangay/site-name.html +++ /dev/null @@ -1 +0,0 @@ -FixMyBarangay diff --git a/templates/web/fixmystreet/about/fun.html b/templates/web/fixmystreet.com/about/fun.html index 03d977d44..03d977d44 100644 --- a/templates/web/fixmystreet/about/fun.html +++ b/templates/web/fixmystreet.com/about/fun.html diff --git a/templates/web/fixmystreet/alert/updates.html b/templates/web/fixmystreet/alert/updates.html deleted file mode 100644 index 2240844e4..000000000 --- a/templates/web/fixmystreet/alert/updates.html +++ /dev/null @@ -1,32 +0,0 @@ -[% title = loc('Local RSS feeds and email alerts') %] - -[% INCLUDE 'header.html', title => title %] - - -[% INCLUDE 'errors.html' %] - -<p><a href="[% c.uri_for( '/rss', problem_id ) %]"> - <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="float:right"> - </a> -</p> - -<p> -[% loc('Receive email when updates are left on this problem.') %] -</p> - -<form action="/alert/subscribe" method="post"> - <fieldset> - <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label> - - <div class="form-txt-submit-box"> - <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" placeholder="[% loc('Your email') %]"> - <input class="green-btn" type="submit" value="[% loc('Subscribe') %]"> - </div> - - <input type="hidden" name="id" value="[% problem_id | html %]"> - <input type="hidden" name="type" value="updates"> - </fieldset> -</form> - - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/fixmystreet/around/_main.html b/templates/web/fixmystreet/around/_main.html deleted file mode 100644 index 900dcb6aa..000000000 --- a/templates/web/fixmystreet/around/_main.html +++ /dev/null @@ -1,3 +0,0 @@ -<div class="tablewrapper"> - [% INCLUDE 'around/_error_multiple.html' %] -</div> diff --git a/templates/web/fixmystreet/around/_updates.html b/templates/web/fixmystreet/around/_updates.html deleted file mode 100755 index 458983e8f..000000000 --- a/templates/web/fixmystreet/around/_updates.html +++ /dev/null @@ -1,5 +0,0 @@ -<div class="shadow-wrap"> - <ul id="key-tools" class="singleton"> - <li><a class="feed" id="key-tool-around-updates" href="[% email_url | html %]">[% loc("Get updates") %]</a></li> - </ul> -</div> diff --git a/templates/web/fixmystreet/footer.html b/templates/web/fixmystreet/footer.html deleted file mode 100644 index 7626736a0..000000000 --- a/templates/web/fixmystreet/footer.html +++ /dev/null @@ -1,53 +0,0 @@ - [% IF pagefooter %] - <footer role="contentinfo"> - [% INCLUDE 'front/footer-marketing.html' %] - </footer> - [% END %] - </div><!-- .content role=main --> - </div><!-- .container --> - [% IF c.cobrand.moniker == 'fixmystreet' AND bodyclass != 'mappage' %] - [% INCLUDE 'footer-nav.html' %] - [% END %] - </div><!-- .table-cell --> - - <div class="nav-wrapper"> - <div class="nav-wrapper-2"> - <div id="main-nav" role="navigation"> - <ul class="nav-menu nav-menu--mysoc"> - <li><a id="mysoc-logo" href="https://www.mysociety.org/">mySociety</a></li> - </ul> -[% - SET base = ""; - SET base = c.cobrand.base_url IF admin; -%] - <ul class="nav-menu nav-menu--main"> - <li><[% IF c.req.uri.path == '/' - %]span[% ELSE %]a href="[% base %]/"[% END %] class="report-a-problem-btn" - >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/my' - %]span[% ELSE %]a href="[% base %]/my"[% END - %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/reports' - %]span[% ELSE %]a href="[% base %]/reports"[% END - %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/alert' - %]span[% ELSE %]a href="[% base %]/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END - %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/faq' - %]span[% ELSE %]a href="[% base %]/faq"[% END - %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>[% - %]<li class="nav-menu__item--privacy"><[% IF c.req.uri.path == '/privacy' - %]span[% ELSE %]a href="[% base %]/privacy"[% END - %]>[% loc("Privacy") %]</[% c.req.uri.path == '/privacy' ? 'span' : 'a' %]></li> - </ul> - </div> - </div> - </div> - -<!-- [% INCLUDE 'debug_footer.html' %] --> - </div> <!-- .wrapper --> - - [% TRY %][% PROCESS 'footer_extra.html' %][% CATCH file %][% END %] - -</body> -</html> diff --git a/templates/web/fixmystreet/header.html b/templates/web/fixmystreet/header.html deleted file mode 100644 index bc9e16af8..000000000 --- a/templates/web/fixmystreet/header.html +++ /dev/null @@ -1,74 +0,0 @@ -[% - SET html_att = ' lang="' _ lang_code _ '"'; - # For a right-to-left language, use the following line in your own header: - # SET html_att = html_att _ ' dir="rtl"'; --%] -<!doctype html> -<!--[if lt IE 7]><html class="no-js ie6 iel8"[% html_att %]><![endif]--> -<!--[if IE 7]> <html class="no-js ie7 iel8"[% html_att %]><![endif]--> -<!--[if IE 8]> <html class="no-js ie8 iel8"[% html_att %]><![endif]--> -<!--[if IE 9]> <html class="no-js ie9"[% html_att %]><![endif]--> -<!--[if gt IE 9]><!--><html class="no-js"[% html_att %]><!--<![endif]--> - <head> - <meta name="viewport" content="initial-scale=1.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> - <meta name="HandHeldFriendly" content="true"> - <meta name="mobileoptimized" content="0"> - - [% INCLUDE 'header_opengraph.html' %] - [% SET start = c.config.ADMIN_BASE_URL IF admin; - - # For clarity, the 'fixmystreet' moniker (for fixmystreet.com) puts - # it stylesheets under fixmystreet.com - IF c.cobrand.moniker == 'fixmystreet'; - SET css_dir = 'fixmystreet.com'; - ELSE; - SET css_dir = c.cobrand.moniker; - END %] - <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ css_dir _ '/base.css') %]"> - <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ css_dir _ '/layout.css') %]" media="(min-width:48em)"> - [% extra_css %] - <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ css_dir _ '/layout.css') %]"> - <![endif]--> - - <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> - <script src="[% start %][% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] - [% extra_js %] - - [% IF c.req.uri.host == 'osm.fixmystreet.com' %] - <link rel="canonical" href="https://www.fixmystreet.com[% c.req.uri.path_query %]"> - [% END %] - - [% TRY %][% PROCESS 'header_extra.html' %][% CATCH file %][% END %] - - </head> - [% TRY %][% PROCESS 'set_body_class.html' %][% CATCH file %][% END %] - <body class="[% bodyclass | html IF bodyclass %]"> - - <div class="wrapper"> - <div class="table-cell"> - <header id="site-header" role="banner"> - <div class="container"> - [% INCLUDE 'header_logo.html' %] - <a href="#main-nav" id="nav-link">Main Navigation</a> - </div> - </header> - - [% IF c.user_exists %] - <div id="user-meta"> - <p> - [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] - <a href="/auth/sign_out">[% loc('sign out') %]</a> - </p> - </div> - [% END %] - - [% pre_container_extra %] - - <div class="container"> - <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> - - <!-- [% INCLUDE 'debug_header.html' %] --> diff --git a/templates/web/fixmystreet/header_logo.html b/templates/web/fixmystreet/header_logo.html deleted file mode 100644 index 66378235a..000000000 --- a/templates/web/fixmystreet/header_logo.html +++ /dev/null @@ -1,2 +0,0 @@ - <a href="[% c.cobrand.base_url IF admin %]/" id="site-logo">[% site_name %]</a> - <a href="[% c.cobrand.base_url IF admin %]/" id="report-cta" title="[%- loc('Report a problem') -%]">[%- loc('Report') -%]</a> diff --git a/templates/web/fixmystreet/reports/_rss.html b/templates/web/fixmystreet/reports/_rss.html deleted file mode 100644 index f2d164bfa..000000000 --- a/templates/web/fixmystreet/reports/_rss.html +++ /dev/null @@ -1,19 +0,0 @@ -<div class="shadow-wrap"> - <ul id="key-tools"[% IF NOT children.size %] class="singleton"[% END %]> - <li><a rel="nofollow" id="key-tool-updates-area" class="feed" href="[% rss_url %]">[% - IF c.cobrand.moniker == 'bromley' AND thing == 'council'; - 'Get updates of reports in Bromley'; - ELSIF c.cobrand.moniker == 'bromley'; - 'Get updates of reports in this ward'; - ELSIF c.cobrand.is_council; - tprintf(loc('Get updates of %s problems'), thing); - ELSE; - tprintf(loc('Get updates of problems in this %s'), thing); - END - %]</a></li> - [% IF children.size %] - <li><a href="#council_wards" id="key-tool-wards" class="chevron">[% ward_text %]</a></li> - [% END %] - </ul> -</div> - diff --git a/templates/web/fixmystreet/reports/_ward-list.html b/templates/web/fixmystreet/reports/_ward-list.html deleted file mode 100755 index b7e19ffc2..000000000 --- a/templates/web/fixmystreet/reports/_ward-list.html +++ /dev/null @@ -1,14 +0,0 @@ -[% IF location == 'after' AND children.size %] -<section id="council_wards" class="hidden-js"> -<h2>[% ward_text %]</h2> - <p>[% loc('Follow a ward link to view only reports within that ward.') %]</p> - <ul class="item-list item-list--wards full-width"> - [% FOR child IN children.values.sort('name') %] - <li class="item-list__item item-list--wards__item"> - <a href="[% child.url %]">[% child.name %]</a> - </li> - [% END %] - </ul> -</section> -[% END %] - diff --git a/templates/web/harrogate/header.html b/templates/web/harrogate/header.html index bd319e250..451832dda 100644 --- a/templates/web/harrogate/header.html +++ b/templates/web/harrogate/header.html @@ -24,7 +24,7 @@ <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> <script src="[% start %][% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + [% INCLUDE 'common_header_tags.html' %] [% extra_js %] [% IF c.req.uri.host == 'osm.fixmystreet.com' %] diff --git a/templates/web/hart/header.html b/templates/web/hart/header.html index b7b4fefcc..6337aad64 100644 --- a/templates/web/hart/header.html +++ b/templates/web/hart/header.html @@ -25,7 +25,7 @@ <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> <script src="[% start %][% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + [% INCLUDE 'common_header_tags.html' %] [% extra_js %] <script type="text/javascript"> $(function(){ diff --git a/templates/web/oxfordshire/header.html b/templates/web/oxfordshire/header.html index b4244a51b..e69757dad 100644 --- a/templates/web/oxfordshire/header.html +++ b/templates/web/oxfordshire/header.html @@ -22,7 +22,7 @@ <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> <script src="[% start %][% version('/cobrands/oxfordshire/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + [% INCLUDE 'common_header_tags.html' %] [% extra_js %] [% INCLUDE 'tracking_code.html' %] diff --git a/templates/web/oxfordshire/report/_main.html b/templates/web/oxfordshire/report/_main.html index 3bb786141..a4cb3e20b 100644 --- a/templates/web/oxfordshire/report/_main.html +++ b/templates/web/oxfordshire/report/_main.html @@ -54,7 +54,7 @@ <p class="report_meta_info"> [% problem.meta_line(c) | html %] - [%- IF !problem.used_map AND c.cobrand.moniker != 'emptyhomes' %]; <strong>([% loc('there is no pin shown as the user did not use the map') %])</strong>[% END %] + [%- IF !problem.used_map %]; <strong>([% loc('there is no pin shown as the user did not use the map') %])</strong>[% END %] </p> [% IF problem.whensent %] <p class="council_sent_info">[% problem.duration_string(c) %]</p> diff --git a/templates/web/stevenage/header.html b/templates/web/stevenage/header.html index 87fb0d90d..11e362612 100644 --- a/templates/web/stevenage/header.html +++ b/templates/web/stevenage/header.html @@ -20,7 +20,7 @@ <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> <script src="[% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + [% INCLUDE 'common_header_tags.html' %] [% extra_js %] [% INCLUDE 'tracking_code.html' %] diff --git a/templates/web/warwickshire/header.html b/templates/web/warwickshire/header.html index 35baeacd7..c6d2bc048 100644 --- a/templates/web/warwickshire/header.html +++ b/templates/web/warwickshire/header.html @@ -29,7 +29,7 @@ <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> <script src="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + [% INCLUDE 'common_header_tags.html' %] [% extra_js %] [% PROCESS 'header_extra.html' %] diff --git a/templates/web/zerotb/about/faq-en-gb.html b/templates/web/zerotb/about/faq-en-gb.html deleted file mode 100644 index b2607f769..000000000 --- a/templates/web/zerotb/about/faq-en-gb.html +++ /dev/null @@ -1,124 +0,0 @@ -[% INCLUDE 'header.html', title => loc('Frequently Asked Questions') %] - -<h1>Frequently Asked Questions</h1> - <dl> - <dt>What is this website?</dt> - <dd>This site was created to help people report anti-tuberculosis drug stockouts in Delhi. It was created in response to the ongoing stockouts reported in India last year (see here). The information will be used to encourage the government to address stockouts as they arise.</dd> - <dt>What is FixMyStreet?</dt> - <dd>FixMyStreet is a site to help people report, view, or discuss local problems they’ve found by simply locating them on a map. It launched in early February 2007.</dd> - <dt>How do I get in touch with FixMyStreet?</dt> - <dd>Here’s our <a href="[% c.uri_for( '/contact' ) %]">contact page</a>.</dd> - <dt>What sort of problems should I report with this site?</dt> - <dd>This site is primarily for reporting barriers to TB treatment clinics such as drug stockouts.</dd> - <dt>How do I use the site?</dt> - <dd>You can either enter a location in Delhi or choose a specific clinic name. If you enter a location, you will be presented with a map of that area. You can then search for a TB clinic in that area to report a stockout.</dd> - <dt>How are the problems solved?</dt> - <dd>They are anonymously reported to the District TB Officer by email. They are also shared with local activists and media to generate awareness of the issue and encourage the government to take action. We respect your privacy: your name and email will NOT be given to any of these groups without your written permission.</dd> - <dt>Is it free?</dt> - <dd>The site is free to use, yes. FixMyStreet is run -by a registered charity, though, so if you want to make a contribution, <a -href="https://secure.mysociety.org/donate/">please do</a>.</dd> - - <dt>Can I use the site on my mobile?</dt> - <dd> - <p>The website will already work on your mobile phone, adapting to - the size of your screen automatically. - </dd> - </dl> - - <h2>Practical Questions</h2> - <dl> - <dt>I work with a TB clinic, where do you send the reports?</dt> - <dd>You can contact us to find out where reports go at the moment. Also contact us to update the address or addresses we use.</dd> - <dt>Do you remove silly or illegal content?</dt> - <dd>FixMyStreet is not responsible for the content and accuracy -of material submitted by its users. We reserve the right to edit or remove any -problems or updates which we consider to be inappropriate upon being informed -by a user of the site.</dd> - - <dt>Why can’t I zoom out more on the reporting map?</dt> - <dd>We want to keep the site locally focused, so restrict the ability to - move radically between areas.</dd> - - <dt>This site is great – why aren’t you better publicised?</dt> - <dd>As a tiny charity we simply don’t have a publicity budget, and we - rely on word of mouth to advertise the site. We have a whole <a - href="posters/">array of posters, flyers and badges</a> if you’d like - to publicise us on the web or in your local area, and why not write to your - local paper to let them know about us?</dd> </dl> - - <h2><a name="privacy"></a>Privacy Questions</h2> - <dl> - <dt>Who gets to see my name and email address?</dt> - <dd> - Due to the sensitive nature of the stockout situation, if you submit a report, we will NOT share your name or email with anyone unless you give us permission. We may, however, send other information from your report (such as the clinic name and any description you write about the stockouts) to the TB officers with the government or activists in order to raise awareness issue. - The only people who will be able to see your name and email address will be the FixMyStreet administrators and team members, and they will never use it for anything other than to help administer FixMyStreet. We will never give or sell your email address to anyone else, unless we are obliged to by law. Your name, given in the name field, will not be published anywhere unless you specifically give us permission to. - </dd> - <dt>Will you send nasty, brutish spam to my email address?</dt> - <dd>Never. We will email you if someone leaves an update on a -problem you’ve reported, and send you a questionnaire email four weeks -after you submit a problem, asking for a status update; we’ll only ever -send you emails in relation to your problem.</dd> - </dl> - <h2>Organisation Questions</h2> - <dl> - <dt>Who built FixMyStreet?</dt> - <dd>This site was built by <a href="http://www.mysociety.org/">mySociety</a>, - in conjunction with the <a href="http://www.youngfoundation.org.uk/">Young Foundation</a>. -mySociety is the project of a registered charity which has grown out of the community of -volunteers who built sites like <a href="http://www.theyworkforyou.com/">TheyWorkForYou.com</a>. -mySociety’s primary mission is to build Internet projects which give people simple, tangible -benefits in the civic and community aspects of their lives. Our first project -was <a href="http://www.writetothem.com/">WriteToThem</a>, where you can write to any of your -elected representatives, for free. The charity is called UK Citizens Online Democracy and is charity number 1076346. mySociety -can be contacted by email at <a href="mailto:hello@mysociety.org">hello@mysociety.org</a>, -or by post at mySociety, 483 Green Lanes, London, N13 4BS, UK.</dd> - <dt><img src="/i/moj.png" align="right" alt="Ministry of Justice" hspace="10">Who pays for it?</dt> - <dd>FixMyStreet was originally paid for via the Department for - Constitutional Affairs Innovations Fund. It is now funded by a variety of means, from commercial - work to <a href="http://www.mysociety.org/donate/">donations</a>.</dd> - <dt>Do you need any help with the project?</dt> - <dd>Yes, we can use help in all sorts of ways, technical or -non-technical. Please see our <a -href="http://www.mysociety.org/helpus/">Get Involved page</a>.</dd> - <dt>I’d like a site like this for my own location/ where’s the "source code" to this site?</dt> - <dd> -The software behind this site is open source, and available -to you mainly under the GNU Affero GPL software license. You can <a -href="http://github.com/mysociety/fixmystreet">download the -source code</a> and help us develop it. -You’re welcome to use it in your own projects, although you must also -make available the source code to any such projects. -<a href="http://www.fiksgatami.no/">Fiksgatami</a> is an example of our code -being used in a Norwegian version of this site. -</dd> -<dt>I’d prefer code in a different language?</dt> -<dd> -VisibleGovernment.ca wrote their own code for -<a href="http://www.fixmystreet.ca/">http://www.fixmystreet.ca/</a>, which is -written in GeoDjango and available under an MIT licence at <a -href="http://github.com/visiblegovernment/django-fixmystreet/tree/master">github</a>. -Or <a href="http://www.fixmystreet.org.nz/">FixMyStreet.org.nz</a> is written in -Drupal. -</p> -</dd> - <dt>People build things, not organisations. Who <em>actually</em> built it?</dt> - <dd>Matthew Somerville and Francis Irving wrote the site, -Chris Lightfoot wrote the tileserver and map cutter, Richard Pope created -our pins, Deborah Kerr keeps things up-to-date and does user support, -Ayesha Garrett designed our posters, and Tom Steinberg managed it all. - -Thanks also to -<a href="http://www.ordnancesurvey.co.uk">Ordnance Survey</a> (for the maps, -UK postcodes, and UK addresses – data © Crown copyright, all -rights reserved, Ministry of Justice 100037819 2008), -Yahoo! for their BSD-licensed JavaScript libraries, the entire free software -community (this particular project was brought to you by Perl, PostgreSQL, -and the number 161.290) and <a -href="http://www.bytemark.co.uk/">Bytemark</a> (who kindly host all -our servers). - -Let us know if we’ve missed anyone.</dd> - </dl> - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/zerotb/around/_updates.html b/templates/web/zerotb/around/_updates.html deleted file mode 100644 index e69de29bb..000000000 --- a/templates/web/zerotb/around/_updates.html +++ /dev/null diff --git a/templates/web/zerotb/around/intro.html b/templates/web/zerotb/around/intro.html deleted file mode 100644 index 07d018f57..000000000 --- a/templates/web/zerotb/around/intro.html +++ /dev/null @@ -1 +0,0 @@ -<h2>[% loc('If a hospital, clinic or other health facility near you is experiencing <b>stockouts of tuberculosis drugs</b> you can use this form to report it') %]</h2> diff --git a/templates/web/zerotb/around/location_error.html b/templates/web/zerotb/around/location_error.html deleted file mode 100644 index 45428e723..000000000 --- a/templates/web/zerotb/around/location_error.html +++ /dev/null @@ -1,8 +0,0 @@ -<p class="form-error"> -[% IF location_error_no_areas %] - [% loc('This location seems to be outside the Dehli area.') %] -[% ELSE %] - [% location_error %] -[% END %] -</p> - diff --git a/templates/web/zerotb/around/on_map_list_items.html b/templates/web/zerotb/around/on_map_list_items.html deleted file mode 100644 index 5c7822b48..000000000 --- a/templates/web/zerotb/around/on_map_list_items.html +++ /dev/null @@ -1,14 +0,0 @@ -[% all_reports = on_map.merge(around_map) %] -[% IF all_reports.size %] - [% FOREACH problem IN all_reports %] - [% UNLESS problem.title; - dist = tprintf("%.1f", (problem.distance || 0) ); - problem = problem.problem; - END %] - [% INCLUDE 'report/_item.html' %] - [% END %] -[% ELSE %] - <li class="item-list__item item-list__item--empty"> - <p>[% loc('No clinics found.') %]</p> - </li> -[% END %] diff --git a/templates/web/zerotb/around/postcode_form.html b/templates/web/zerotb/around/postcode_form.html deleted file mode 100644 index 484f41c5c..000000000 --- a/templates/web/zerotb/around/postcode_form.html +++ /dev/null @@ -1,36 +0,0 @@ -<div id="front-main"> - <div id="front-main-container"> - [% INCLUDE 'around/intro.html' %] - - [% - question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area'); - %] - - <div id="postcodeForm"> - <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm"> - <label for="pc">[% question %]:</label> - <div> - <input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]"> - <input type="submit" value="[% loc('Go') %]" id="sub"> - </div> - - [% IF partial_token %] - <input type="hidden" name="partial" value="[% partial_token.token %]"> - [% END %] - - </form> - <form action="[% c.uri_for( '/report' ) %]/" method="get" name="clinicForm"> - <label for="clinic">[% loc('... or select a clinic by name' ) %]</label> - <div> - <select id="clinic" name="clinic"> - [% FOR clinic IN c.cobrand.get_clinic_list %] - <option value="[% clinic.id %]">[% clinic.title %]</option> - [% END %] - </select> - <input class="green-btn" type="submit" value="[% loc('Go') %]" id="show_report"> - </div> - </form> - </div> - - </div> -</div> diff --git a/templates/web/zerotb/around/tabbed_lists.html b/templates/web/zerotb/around/tabbed_lists.html deleted file mode 100644 index 090f03be0..000000000 --- a/templates/web/zerotb/around/tabbed_lists.html +++ /dev/null @@ -1,3 +0,0 @@ -<ul id="current" class="item-list item-list--reports tab"> - [% INCLUDE "around/on_map_list_items.html" %] -</ul> diff --git a/templates/web/zerotb/footer.html b/templates/web/zerotb/footer.html deleted file mode 100644 index cef009484..000000000 --- a/templates/web/zerotb/footer.html +++ /dev/null @@ -1,22 +0,0 @@ - - </div><!-- .content role=main --> - </div><!-- .container --> - </div><!-- .table-cell --> - - <div class="nav-wrapper"> - <div class="nav-wrapper-2"> - <div id="main-nav" role="navigation"> - <ul class="nav-menu nav-menu--main"> - <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn" - >[% loc("Report a Stockout") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END - %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li> - </ul> - </div> - </div> - </div> - -<!-- [% INCLUDE 'debug_footer.html' %] --> - </div> <!-- .wrapper --> -</body> -</html> diff --git a/templates/web/zerotb/header_extra.html b/templates/web/zerotb/header_extra.html deleted file mode 100644 index 23f061799..000000000 --- a/templates/web/zerotb/header_extra.html +++ /dev/null @@ -1,18 +0,0 @@ -<link rel="stylesheet" href="[% start %][% version('/js/select2/select2.css') %]" /> -<script type="text/javascript" src="[% start %][% version('/js/select2/select2.min.js') %]"></script> - -<script> -$(document).ready(function() { - $("#clinic").select2({ - placeholder: '[% loc('Enter a clinic name') %]', - allowClear: true, - }); - $('#show_report').click( - function() { - var report = $('#clinic').select2('val'); - document.location = '[% c.uri_for( '/report' ) %]/' + report; - return false; - } - ); -}); -</script> diff --git a/templates/web/zerotb/header_logo.html b/templates/web/zerotb/header_logo.html deleted file mode 100644 index bcc690d97..000000000 --- a/templates/web/zerotb/header_logo.html +++ /dev/null @@ -1,6 +0,0 @@ - <div id="site-logo"> - <p><a href="/">[% loc('<span class="orange">Report</span> Delhi TB drug <b>stockouts</b>') %]</a></p> - [% IF c.req.uri.path == '/' %] - <p id="brought-to-you">Brought to you by <a href="http://www.fixmystreet.org" id="fms-logo-small">FixMyStreet</a></p> - [% END %] - </div> diff --git a/templates/web/zerotb/header_opengraph.html b/templates/web/zerotb/header_opengraph.html deleted file mode 100644 index e69de29bb..000000000 --- a/templates/web/zerotb/header_opengraph.html +++ /dev/null diff --git a/templates/web/zerotb/header_rss.html b/templates/web/zerotb/header_rss.html deleted file mode 100644 index e69de29bb..000000000 --- a/templates/web/zerotb/header_rss.html +++ /dev/null diff --git a/templates/web/zerotb/index-steps.html b/templates/web/zerotb/index-steps.html deleted file mode 100644 index 2d49b8f28..000000000 --- a/templates/web/zerotb/index-steps.html +++ /dev/null @@ -1,8 +0,0 @@ -<h2>[% loc('How to report a stockout') %]</h2> - -<ol class="big-numbers"> - <li>[% loc('Enter a Delhi chest clinic or street name and area') %]</li> - <li>[% loc('Locate the clinic on a map of the area') %]</li> - <li>[% loc('Enter details of the problem (optional)') %]</li> - <li>[% loc('We will send your stockout report to the district TB officer and to local activists to ensure action is taken') %]</li> -</ol> diff --git a/templates/web/zerotb/index.html b/templates/web/zerotb/index.html deleted file mode 100644 index 4d0d6555c..000000000 --- a/templates/web/zerotb/index.html +++ /dev/null @@ -1,45 +0,0 @@ -[%# Assumes fixmystreet cobrand is using FMS map template - for bonus points preload all the right map elements. %] -[% map_js = BLOCK %] -<script> -yepnope.addPrefix( 'preload', function ( resource ) { - resource.noexec = true; - return resource; -}); -Modernizr.load({ - load: [ - "preload![% version('/js/OpenLayers.fixmystreet.js') %]", - "preload![% version('/js/map-OpenLayers.js') %]", - "preload![% version('/js/map-OpenStreetMap.js') %]", - "preload![% version('/js/jquery.ba-hashchange.min.js') %]" - ] -}); -</script> -[% END %] - -[% pre_container_extra = PROCESS 'around/postcode_form.html' %] -[% INCLUDE 'header.html', title = '', bodyclass = 'frontpage fullwidthpage' %] - -[% IF error %] - <p class="form-error">[% error %]</p> -[% END %] - -<div class="tablewrapper"> - <div id="front-howto"> - [% INCLUDE 'index-steps.html' %] - </div> - - <div id="front-recently"> - <h2> - [% loc('About stockouts') %] - </h2> - - <section class="full-width"> - <p> - [% loc('In 2013 India faced stockouts of anti-tuberculosis medicines, threatening to leave many patients across the country without access to life-saving treatment. Some government officials have denied that these drug stockouts exist. There is no simple mechanism for gathering drug shortage data, making accountability and transparency impossible. We aim to change this by enabling anyone in Delhi to report stockouts through this website.') %] - </p> - </section> - - </div> -</div> - -[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/zerotb/report/_item.html b/templates/web/zerotb/report/_item.html deleted file mode 100644 index 8562fe607..000000000 --- a/templates/web/zerotb/report/_item.html +++ /dev/null @@ -1,5 +0,0 @@ -<li class="item-list__item item-list--reports__item"> -<a href="[% c.uri_for('/report', problem.id ) %]"> - <h3 class="item-list__heading">[% problem.title | html %]</h3> -</a> -</li> diff --git a/templates/web/zerotb/report/_main.html b/templates/web/zerotb/report/_main.html deleted file mode 100644 index 189b4eeb5..000000000 --- a/templates/web/zerotb/report/_main.html +++ /dev/null @@ -1,6 +0,0 @@ -<div class="problem-header cf"> - <h1>[% problem.title | html %]</h1> - - [% add_links( problem.detail ) | html_para %] - -</div> diff --git a/templates/web/zerotb/report/display.html b/templates/web/zerotb/report/display.html deleted file mode 100644 index 9848c89db..000000000 --- a/templates/web/zerotb/report/display.html +++ /dev/null @@ -1,28 +0,0 @@ -[% - PROCESS "report/photo-js.html"; - PROCESS "maps/${map.type}.html"; - - problem_title = problem.title_safe _ ' - ' _ loc('Viewing a Clinic'); - INCLUDE 'header.html' - title = problem_title - robots = 'index, nofollow' - bodyclass = 'mappage'; -%] - -[% map_html %] - -</div> - -[% INCLUDE 'report/banner.html' %] - -[% INCLUDE 'report/_main.html' %] - -<div class="shadow-wrap"> - <ul id="key-tools"> - <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Clinics nearby' ) %]</a></li> - </ul> - -</div> - -[% INCLUDE 'report/update-form.html' %] -[% INCLUDE 'footer.html' %] diff --git a/templates/web/zerotb/report/update-form.html b/templates/web/zerotb/report/update-form.html deleted file mode 100644 index cb8ba24e4..000000000 --- a/templates/web/zerotb/report/update-form.html +++ /dev/null @@ -1,64 +0,0 @@ -<div id="update_form"> - <h2>[% loc( 'Report a stockout') %]</h2> - - <div class="general-notes"> - [% INCLUDE 'report/updates-sidebar-notes.html' %] - </div> - - [% INCLUDE 'errors.html' %] - - <form method="post" action="[% c.uri_for( '/report/update' ) %]" id="form_update_form" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> - <fieldset> - <input type="hidden" name="submit_update" value="1"> - <input type="hidden" name="id" value="[% problem.id | html %]"> - - <label for="form_update">[% loc( 'Details' ) %]</label> - [% IF field_errors.update %] - <div class='form-error'>[% field_errors.update %]</div> - [% END %] - <textarea rows="7" cols="30" name="update" id="form_update" placeholder="[% loc('Please write your update here') %]" required>[% update.text | html %]</textarea> - - [% IF c.user_exists %] - - [% INCLUDE name %] - - <input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]"> - - - [% ELSE %] - - <label for="form_rznvy">[% loc('Email' ) %]</label> - - <div class="general-notes"> - <p>[% loc('We never show your email or name') %]</p> - </div> - - [% IF field_errors.email %] - <p class='form-error'>[% field_errors.email %]</p> - [% END %] - <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required> - - <div id="form_sign_in"> - <div id="form_sign_in_no"> - [% INCLUDE name %] - - <div class="form-txt-submit-box"> - <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]"> - </div> - </div> - </div> - - [% END %] - </fieldset> - </form> -</div> - -[% BLOCK name %] - [% INCLUDE 'report/new/extra_name.html' %] - <label for="form_name">[% loc('Name') %]</label> - [% IF field_errors.name %] - <p class='form-error'>[% field_errors.name %]</p> - [% END %] - <input type="text" [% IF problem.bodies_str == '2482' %]class="validName" [% END %]name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]"> - -[% END %] diff --git a/templates/web/zerotb/report/updates-sidebar-notes.html b/templates/web/zerotb/report/updates-sidebar-notes.html deleted file mode 100644 index 28de7d4fa..000000000 --- a/templates/web/zerotb/report/updates-sidebar-notes.html +++ /dev/null @@ -1,3 +0,0 @@ - <p> - [% loc( 'Please note that reports are sent to the clinic.' ) %] - [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]</p> diff --git a/templates/web/zerotb/site-name.html b/templates/web/zerotb/site-name.html deleted file mode 100644 index b2c01ff85..000000000 --- a/templates/web/zerotb/site-name.html +++ /dev/null @@ -1 +0,0 @@ -ZeroTB diff --git a/templates/web/zurich/header.html b/templates/web/zurich/header.html index 7e88f3f0f..ee00b851c 100644 --- a/templates/web/zurich/header.html +++ b/templates/web/zurich/header.html @@ -24,7 +24,7 @@ <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> <script src="[% start %][% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + [% INCLUDE 'common_header_tags.html' %] [% extra_js %] <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js" charset="utf-8"></script> diff --git a/web/cobrands/barnet/_colours.scss b/web/cobrands/barnet/_colours.scss deleted file mode 100644 index d723003b5..000000000 --- a/web/cobrands/barnet/_colours.scss +++ /dev/null @@ -1,22 +0,0 @@ -/* COLOURS */ - -$menu-image: 'menu-black'; - -$primary: #E9E9EA; -$primary_b: #000000; -$primary_text: #3E3D44; - -/* Unused here */ -$base_bg: #fff; -$base_fg: #1a1a1a; -$map_nav_bg: #222; -$nav_fg: #fff; -$nav_fg_hover: #444; - -$col_big_numbers: #C0E8E8; - -$col_click_map: #E1E3E4; -$col_click_map_dark: darken(#E1E3E4, 10%); - -$col_fixed_label: #00BD08; -$col_fixed_label_dark: #4B8304; diff --git a/web/cobrands/barnet/barnet.scss b/web/cobrands/barnet/barnet.scss deleted file mode 100644 index a6feb018f..000000000 --- a/web/cobrands/barnet/barnet.scss +++ /dev/null @@ -1,115 +0,0 @@ -/* Parts of barnet's main CSS needed for its header/footer and adjusted (see - * bottom) to not be affected by main FixMyStreet CSS. Not very sustainable; - * perhaps we should wrap all council CSS within a SCSS #council ID? Hmm. - */ - -@import "compass"; - -#column_nav li { list-style: none ;} - -#content ol.big-numbers li { - padding: 0 0 0 2.5em; -} - -#barnet-wrapper { - width: 100%; - display: table; - caption-side: bottom; -} - -#barnet-powered-by { - clear: both; -} - -body {font-size: 75%; font-family: Arial, Helvetica, sans-serif; color: #3e3d44; padding: 0; margin: 0; line-height: 1.5; background: #e9e9ea;} -body > html {font-size: 12px;} - -#barnet-wrapper {padding: 0; margin: 20px auto; width: 960px; background: #fff;} -#ie_wrapper {display: block; padding: 20px 25px 25px;} -#page {float: left; width: 100%;} - -#mast {clear: both;} - -#mast .pseudoH1 {margin: 0 0 0 -3px; padding: 0; background: url(img/barnet-logo.gif) no-repeat top left; width: 240px; height: 38px; float: left;} -#mast .pseudoH1 a, #mast .pseudoH1 a:link, #mast .pseudoH1 a:visited, #mast .pseudoH1 a:hover, #mast .pseudoH1 a:active {display: block; width: 240px; height: 38px; padding: 0; background: url(img/barnet-logo.gif) no-repeat top left;} -#mast .pseudoH1 span {position: absolute; margin-top: -13000px; top: -13000px;} - -#mast .mast_links {float: right; display: inline; margin: 0; padding: 10px 0 0; list-style: none; overflow: hidden;} - -#mast #search {clear: both; float: right; margin: 8px 0 0; background: #e1e3e4; border-top: 6px solid #bddadc; border-bottom: 2px solid #c8cacb; width: 100%; padding: 3px 0 2px; height: 21px;} - -/* ############################################################## */ - -#content {margin: 0; width: 910px; overflow: hidden; min-height: 350px;} -#content.withWidth {margin: 0 0 0 232px; width: 446px; overflow: hidden; float: left; display: inline;} -#content.fullWidth {width: 678px;} -#content.home {margin-top: 18px;} - -.mappage { - #content.withWidth {margin: 0 0 0 0px; width: auto; overflow: hidden; float: left; display: inline;} - #content.fullWidth {width: 900px;} -} - -/* IE6 ignore the second #foo.bar rule so we have to fudge it another way */ -.ie6 { - .mappage { - #content { - margin: 0 0 0 0px; - overflow: hidden; - float: left; - display: inline; - width: 900px; - } - } -} - -#breadcrumb {font-size: .9em; color: #5c6267; padding: 6px 0; margin: 0 0 0 232px;} -#breadcrumb.full {margin: 0;} -#breadcrumb ul {margin: 0; padding: 0; list-style: none;} -#breadcrumb ul li {margin: 0; padding: 0 4px 0 0; display: inline;} -#breadcrumb ul li a:link, #breadcrumb ul li a:visited, #breadcrumb ul li a:hover, #breadcrumb ul li a:active {color: #5c6267; background: url(img/bcArrow.gif) no-repeat right center; padding: 0 10px 0 0; font-weight: normal;} -#breadcrumb ul li span {font-weight: normal; color: #5c6267;} - -/* ############################################################## */ - -#column_nav {width: 214px; float: left; display: inline; padding: 0; margin: -35px 0 0 -910px; border-right: 3px solid #fff;} - -.ie6 #column_nav { - float: none; - position: absolute; - top: 85px; - margin: 0 0 0 0px; -} - -body.mappage #column_nav { display: none; } - -#content h1 {margin: 0 0 20px; font-size: 1.8em; border-bottom: 6px solid #bed9dd; font-family: Georgia, Times, 'Times New Roman', serif; color: #5d6167;} -#content h1 span {padding: 6px 7px 3px; border: 1px solid #eff1f2; border-bottom: 0 none; display: block;} -#content h1#reports_heading span { display: none; } - -#column_nav .navigation {background: #fff; margin: 0 0 4px;} -#column_nav h2 {font-size: 1.2em; padding: 0; height: 29px; margin: 0; border-radius: 0 0 3px 3px; background: url(img/nav-bg-active.gif) left bottom repeat-x; border-top: 6px solid #bddadc;} -#column_nav #nav1 h2 {border-radius: 0 0 0 3px;} -#column_nav h2 a {color: #fff; padding: 3px 10px 0 26px; display: block; background: url(img/nav-arrow.gif) 8px 7px no-repeat;} -#column_nav .active h2 a {background: url(img/nav-arrow-active.gif) 8px 8px no-repeat;} -#column_nav ul {margin: 0 0 0 4px; padding: 8px 7px 4px; border-width: 0 1px 1px; border-color: #e1e1e1; border-style: solid; border-radius: 3px; list-style: none; background: #fff; background: -moz-linear-gradient(top, #ffffff 0%, #f7f9f8 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f7f9f8)); background: -webkit-linear-gradient(top, #ffffff 0%,#f7f9f8 100%); background: -o-linear-gradient(top, #ffffff 0%,#f7f9f8 100%); background: -ms-linear-gradient(top, #ffffff 0%,#f7f9f8 100%); background: linear-gradient(top, #ffffff 0%,#f7f9f8 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f7f9f8',GradientType=0);} -#column_nav ul li {margin: 0; padding: 2px 4px; border-bottom: 1px solid #bfc0c1; color: #333; font-size: .9em;} -#column_nav ul li.lastItem {border-bottom: none;} -#column_nav ul li a:link, #column_nav ul li a:visited, #column_nav ul li a:hover, #column_nav ul li a:active {display: block; color: #333; font-weight: normal;} -#column_nav ul li a:hover, #column_nav ul li a:active {text-decoration: none; color: #0090a2;} - -/* ############################################################## */ - -#footer {clear: both; margin: 10px 0 0; padding: 15px 0 0; text-align: left;} -#footer p {border-top: 1px solid #dadadb; border-bottom: 1px solid #dadadb; margin: 0 0 5px; color: #5d6167; float: left; display: inline; height: 24px; padding: 8px 0 2px; width: 551px;} -#footer p a {color: #5d6167; font-weight: normal; padding: 0 2px;} -#footer p.assocLinks {float: right; display: inline; padding: 5px 0; width: 359px;} -#footer p.assocLinks a {float: left; display: inline; margin: 0 0 0 8px; padding: 0; background-position: center top; background-repeat: no-repeat; width: 24px; height: 24px;} -#footer p.assocLinks a:active, #footer p.assocLinks a:hover, #footer p.assocLinks a:focus {background-position: center bottom;} -#footer a#goto_browsealoud {background-image: url(img/browsealoud.gif); width: 95px; height: 25px; margin-top: 1px;} -#footer a#goto_directgov {background-image: url(img/directgov.gif); width: 90px; margin: 0 0 0 22px;} -#footer a#share_facebook {background-image: url(img/social1-facebook.gif); margin: 0 0 0 24px;} -#footer a#share_twitter {background-image: url(img/social2-twitter.gif);} -#footer a#share_youtube {background-image: url(img/social3-youtube.gif);} -#footer a#share_flickr {background-image: url(img/social4-flickr.gif);} -#bottomBar {background: url(img/barnet-footer-logo.gif) 771px 12px no-repeat #21aaaa; display: block; width: 100%; height: 56px; border-top: 6px solid #bddadc;} diff --git a/web/cobrands/barnet/base.scss b/web/cobrands/barnet/base.scss deleted file mode 100644 index 73d5708c7..000000000 --- a/web/cobrands/barnet/base.scss +++ /dev/null @@ -1,37 +0,0 @@ -@import "../sass/h5bp"; -@import "./_colours"; -@import "../sass/mixins"; -@import "compass"; - -@import "../sass/base"; - -#mast, -#breadcrumb, -#page-title, -#column_nav, -#footer, -#bottomBar -{ display: none } - -#site-header{ - @include background(none); - background-color: white; -} -#site-logo { - width: 240px; - background: url('/cobrands/barnet/img/barnet-logo.gif') 0 0 no-repeat; - top: 0.6em; - left: 0.5em; -} - -#front-main #postcodeForm div input#sub, -.green-btn, -button.green-btn, -input.green-btn, -.red-btn, -button.red-btn, -input.red-btn{ - @include button-reset; - background: #5D6167; - color: white; -} diff --git a/web/cobrands/barnet/config.rb b/web/cobrands/barnet/config.rb deleted file mode 100644 index cab97b18f..000000000 --- a/web/cobrands/barnet/config.rb +++ /dev/null @@ -1,25 +0,0 @@ -# Require any additional compass plugins here. - -# Set this to the root of your project when deployed: -http_path = "/" -css_dir = "" -sass_dir = "" -images_dir = "" -javascripts_dir = "" - -# You can select your preferred output style here (can be overridden via the command line): -# output_style = :expanded or :nested or :compact or :compressed - -# To enable relative paths to assets via compass helper functions. Uncomment: -# relative_assets = true - -# To disable debugging comments that display the original location of your selectors. Uncomment: -# line_comments = false - -# If you prefer the indented syntax, you might want to regenerate this -# project again passing --syntax sass, or you can uncomment this: -# preferred_syntax = :sass -# and then run: -# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass - -line_comments = false # by Compass.app diff --git a/web/cobrands/barnet/css/layout.css b/web/cobrands/barnet/css/layout.css deleted file mode 100644 index cad46b039..000000000 --- a/web/cobrands/barnet/css/layout.css +++ /dev/null @@ -1,143 +0,0 @@ -/* FixMyStreet additions */
-/* Smaller map */
-#mysociety #map_box {
- width: 380px;
- margin-bottom: 8px;
-}
-#mysociety #map, #mysociety #drag {
- width: 378px;
- height: 378px;
-}
-
-#mysociety p#fixed, #mysociety p#unknown {
- margin-right: 400px;
- width: auto;
-}
-
-#mysociety textarea {
- border: 1px solid #999999;
-}
-
-/* fix (for the reports page) */
-#content #mysociety h1 span {
- display: inline;
- border: none;
- padding: 0;
-}
-
-#mysociety #postcodeForm {
- background-color: #E9E9EA;
-}
-#mysociety #postcodeForm label {
- width: 100%;
-}
-/*=========FROM CUSTOM=========*/
-.cl {clear: both;}
-
-br.cl, div.cl {
- height: 0;
- font-size: 0.1px;
- line-height: .0;
- }
-
-.rm {position: absolute; left: -999em;}
-
-a.rm:active, a.rm:focus {
- top: 15px;
- left: 230px;
- outline:none;
- padding: 7px 10px;
- font-weight:bold;
- border: 1px solid #fff;
- font-size: 1.2em;
- background-color: #fff;
- color: #008184;
- }
-
-#iewrap {min-width: 775px; max-width: 1382px;}
-
-/*=== Content Page Layout ===*/
-#wrap {
- float: right;
- width: 100%;
- margin: 5px 0 0 -270px;
- padding: 0;
- }
-
-#content{
- margin: 0 35px 0 275px;
- padding: 0 5px 0 5px;
- position: relative;
- }
-
-#left-column {
- float:left;
- width: 270px;
- line-height: 1.3em;
- margin: 5px 0 0 0;
- padding: 0;
- }
-
-/*=== Content Page Elements===*/
-
-#iewrap #print-logo {display:none}
-
-h1 {margin:0}
-/*
-h3, h4, h5, p, ol, ul, table, dl, address, form {margin-right: 5px; margin-left:5px}
-h1, h2 {padding-left: 5px}
-*/
-
-
-/*=== Quotes =====*/
-#content blockquote {margin:10px; min-height: 90px; padding-bottom: 10px}
-
-/*=== Tables =====*/
-
-table.data {width:95%;}
-table.data th {text-align:left; font-size:1.24em}
-caption {text-align:left; font-weight:bold; font-style:italic}
-
-table.data td, table.data th {padding:6px 6px 6px 10px}
-table.data {border-spacing:1px;}
-
-/*==== General styles for alignment of elements within the content area ==*/
-
-.image-left, img.alignleft {position: relative;float: left;}
-.image-inline, img.inline {display:block;}
-.image-right, img.alignright {float:right;clear: right;}
-
-.alignleft {float: left; margin: 5px 10px 10px 0;}
-.alignright {float: right; margin: 5px 0 10px 10px;}
-.centered {display: block; margin: 10px auto; padding: 10px 0; text-align:center;}
-
-.two-col1 {float: left; width: 48%;}
-.two-col2 {float: right; width: 48%;}
-
-/*======== form styles ========*/
-
-.form-info {font-style: italic; font-weight: bold; padding: 5px 0 0 0}
-
-form {margin-top:0}
-
-fieldset {
- margin: 0;
- padding: 0;
- border:none;
- }
-
-legend {
- padding: 0;
- margin: 0;
- font-size:1.308em;
- font-weight:bold
- }
-
-
-
-/*======= wide rows ======= */
-#content textarea {padding: 5px;}
-
-
-
-
diff --git a/web/cobrands/barnet/img/barnet-footer-logo.gif b/web/cobrands/barnet/img/barnet-footer-logo.gif Binary files differdeleted file mode 100644 index afba1cca2..000000000 --- a/web/cobrands/barnet/img/barnet-footer-logo.gif +++ /dev/null diff --git a/web/cobrands/barnet/img/barnet-logo.gif b/web/cobrands/barnet/img/barnet-logo.gif Binary files differdeleted file mode 100644 index 86e0f4ee8..000000000 --- a/web/cobrands/barnet/img/barnet-logo.gif +++ /dev/null diff --git a/web/cobrands/barnet/img/barnet-skipnav.png b/web/cobrands/barnet/img/barnet-skipnav.png Binary files differdeleted file mode 100644 index 21efe0f67..000000000 --- a/web/cobrands/barnet/img/barnet-skipnav.png +++ /dev/null diff --git a/web/cobrands/barnet/img/bcArrow.gif b/web/cobrands/barnet/img/bcArrow.gif Binary files differdeleted file mode 100644 index 4e7c1848e..000000000 --- a/web/cobrands/barnet/img/bcArrow.gif +++ /dev/null diff --git a/web/cobrands/barnet/img/blank.gif b/web/cobrands/barnet/img/blank.gif Binary files differdeleted file mode 100644 index 4bcc753a1..000000000 --- a/web/cobrands/barnet/img/blank.gif +++ /dev/null diff --git a/web/cobrands/barnet/img/browsealoud.gif b/web/cobrands/barnet/img/browsealoud.gif Binary files differdeleted file mode 100644 index 4fbb3eded..000000000 --- a/web/cobrands/barnet/img/browsealoud.gif +++ /dev/null diff --git a/web/cobrands/barnet/img/directgov.gif b/web/cobrands/barnet/img/directgov.gif Binary files differdeleted file mode 100644 index 1c9dd22e2..000000000 --- a/web/cobrands/barnet/img/directgov.gif +++ /dev/null diff --git a/web/cobrands/barnet/img/favicon.ico b/web/cobrands/barnet/img/favicon.ico Binary files differdeleted file mode 100644 index 03553e500..000000000 --- a/web/cobrands/barnet/img/favicon.ico +++ /dev/null diff --git a/web/cobrands/barnet/img/fms-logo.png b/web/cobrands/barnet/img/fms-logo.png Binary files differdeleted file mode 100644 index 23bea6b0f..000000000 --- a/web/cobrands/barnet/img/fms-logo.png +++ /dev/null diff --git a/web/cobrands/barnet/img/nav-arrow-active.gif b/web/cobrands/barnet/img/nav-arrow-active.gif Binary files differdeleted file mode 100644 index 89ff9d0b3..000000000 --- a/web/cobrands/barnet/img/nav-arrow-active.gif +++ /dev/null diff --git a/web/cobrands/barnet/img/nav-bg-active.gif b/web/cobrands/barnet/img/nav-bg-active.gif Binary files differdeleted file mode 100644 index 0d2ec9873..000000000 --- a/web/cobrands/barnet/img/nav-bg-active.gif +++ /dev/null diff --git a/web/cobrands/barnet/img/social1-facebook.gif b/web/cobrands/barnet/img/social1-facebook.gif Binary files differdeleted file mode 100644 index 41b404df0..000000000 --- a/web/cobrands/barnet/img/social1-facebook.gif +++ /dev/null diff --git a/web/cobrands/barnet/img/social2-twitter.gif b/web/cobrands/barnet/img/social2-twitter.gif Binary files differdeleted file mode 100644 index 17f368536..000000000 --- a/web/cobrands/barnet/img/social2-twitter.gif +++ /dev/null diff --git a/web/cobrands/barnet/img/social3-youtube.gif b/web/cobrands/barnet/img/social3-youtube.gif Binary files differdeleted file mode 100644 index eeb6ba356..000000000 --- a/web/cobrands/barnet/img/social3-youtube.gif +++ /dev/null diff --git a/web/cobrands/barnet/img/social4-flickr.gif b/web/cobrands/barnet/img/social4-flickr.gif Binary files differdeleted file mode 100644 index 300e75da0..000000000 --- a/web/cobrands/barnet/img/social4-flickr.gif +++ /dev/null diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss deleted file mode 100644 index 0ec085354..000000000 --- a/web/cobrands/barnet/layout.scss +++ /dev/null @@ -1,247 +0,0 @@ -@import "_colours"; -@import "../sass/layout"; - -#mast, -#breadcrumb, -#page-title, -#column_nav, -#footer, -#bottomBar { - display: block; -} - -// So that map appears underneath the header -.wrapper { - position: relative; -} -.ie6, .ie7 { - .wrapper { - padding-top: 1em; - } -} - -#front-main { - @include border-radius(1em 1em 0 0); - margin-bottom: 1em; - padding-top: 0; - width: 678px; - // layout sets this because base has it slightly lighter - #front-main-container { - padding: 1em; - } -} - -#front_intro { - float: left; - margin-right: 3em; -} - -#front_recent { - margin-left: 3em; -} - -body.fullwidthpage { - .content { - width: 52em; - } -} -.ie6 { - body.fullwidthpage { - #front-main { - margin-top: -4em; - } - #front-howto, - #front-recently { - width: 26em; - } - .container { - padding: 0; - } - .content { - margin-left: 0px; - width: 55em; - } - div.img { - margin-top: -3.3em; - } - } -} - -.content { - @include box-shadow(none); -} - -body.twothirdswidthpage { - .content { - width: 640px; - margin-top: 0; - .sticky-sidebar { - display: none; - aside { - top: 25em; - } - } - } -} - -.nav-wrapper { - display: none; -} - -.mappage { - #breadcrumb { - margin-left: 0px; - } -} - -.frontpage .content { - margin: 0; -} -.iel8 { - .frontpage .content { - border: none; - } -} - -#content .container h1 { - border-bottom: none; - font-size: 2em; - margin-bottom: 0.5em; -} - -.shadow-wrap { - position: static; - padding-top: 0; - margin-bottom: 1em; - ul#key-tools { - border-top: none; - border-bottom: 1px solid $primary; - li { - a.chevron { - background-position: right -3230px; - } - a.feed { - background-position: right -3080px; - } - a.abuse { - background-position: right -2940px; - } - } - } - ul#key-tools.singleton { - li a { - padding-right: 4em; - } - } -} - -#content h1.big-green-banner { - font-size: 1.4em; - margin-left: -2em; - background: #e1e3e4 url(/cobrands/fixmystreet/images/sprite.png) right -2192px no-repeat -} - -body.frontpage { - #user-meta { - p { - top: 1em; - color: $primary_text; - a { - background: none; - } - } - } -} -#user-meta { - float: right; - p { - @include box-shadow(none); - color: $primary_text; - position: relative; - background: none; - a { - color: $primary_text; - background: none; - } - a:hover { - background: $primary; - } - } -} -.ie6 { - #user-meta { - float: none; - p { - position: absolute; - margin-top: 35px; - margin-right: 20px; - right: 0px; - left: auto; - } - - } - .mappage { - #user-meta { - p { - margin-right: -100px; - } - } - } -} - -/* barnet styles */ - -.clear { - clear: both; -} - -#site-header, -#site-logo { - display: none !important; -} - - -#report-a-problem-sidebar { - left: 29em; - top: 4em; - width: 17em; - .sidebar-tips, - .sidebar-notes { - font-size: 0.9em; - } -} -.ie6 { - #report-a-problem-sidebar { - margin-top: -4em; - left: 29em; - .sidebar-notes { - padding-bottom: 0.5em; - } - p { - margin-bottom: 0.4em; - } - } -} - - -.general-notes { - font-size: 1em; -} - -#front-howto #front_stats div big { - color: #C0E8E8; -} - -.banner { - p { - top: -2em; - } - p#fixed { - padding-top: 4em; - } -} - - -#map_box { - border: 1px solid #999; -} diff --git a/web/cobrands/barnet/position_map.js b/web/cobrands/barnet/position_map.js deleted file mode 100644 index b2b7bf05a..000000000 --- a/web/cobrands/barnet/position_map.js +++ /dev/null @@ -1,25 +0,0 @@ -function position_map_box() { - var map_pos = 'absolute', map_height = $('.wrapper').height(); - // on the all reports page the height of the wrapper leads to a very - // large map so we set a maximum size - if ( map_height > 600 ) { - map_height = 600; - } - $('#map_box').prependTo('.wrapper').css({ - zIndex: 0, position: map_pos, - top: 1, left: $('.wrapper').left, - right: 0, bottom: $('.wrapper').bottom + 1, - width: '896px', height: map_height, - margin: 0 - }); -} - -function map_fix() { - var height = $('.wrapper').height() - 3; - if ( height > 600 ) { - height = 600; - } - $('#map_box').height(height); -} - -var slide_wards_down = 1; diff --git a/web/cobrands/bellavistaenaccion/_colours.scss b/web/cobrands/bellavistaenaccion/_colours.scss deleted file mode 100644 index cfe698046..000000000 --- a/web/cobrands/bellavistaenaccion/_colours.scss +++ /dev/null @@ -1,21 +0,0 @@ -/* COLOURS */ - -$orange: #ff9900; -$bluey: #ff8888; - -$primary: #ffffee; -$primary_b: #000000; -$primary_text: #222222; - -$base_bg: $bluey; -$base_fg: #000; - -$map_nav_bg: $bluey; -$nav_fg: #000; -$nav_fg_hover: $primary; - -$col_click_map: $bluey; -$col_click_map_dark: darken($bluey, 10%); - -$col_fixed_label: #00BD08; -$col_fixed_label_dark: #4B8304; diff --git a/web/cobrands/bellavistaenaccion/base.scss b/web/cobrands/bellavistaenaccion/base.scss deleted file mode 100644 index 9fccf92db..000000000 --- a/web/cobrands/bellavistaenaccion/base.scss +++ /dev/null @@ -1,7 +0,0 @@ -@import "../sass/h5bp"; -@import "./_colours"; -@import "../sass/mixins"; -@import "compass"; - -@import "../sass/base"; - diff --git a/web/cobrands/bellavistaenaccion/config.rb b/web/cobrands/bellavistaenaccion/config.rb deleted file mode 100644 index cab97b18f..000000000 --- a/web/cobrands/bellavistaenaccion/config.rb +++ /dev/null @@ -1,25 +0,0 @@ -# Require any additional compass plugins here. - -# Set this to the root of your project when deployed: -http_path = "/" -css_dir = "" -sass_dir = "" -images_dir = "" -javascripts_dir = "" - -# You can select your preferred output style here (can be overridden via the command line): -# output_style = :expanded or :nested or :compact or :compressed - -# To enable relative paths to assets via compass helper functions. Uncomment: -# relative_assets = true - -# To disable debugging comments that display the original location of your selectors. Uncomment: -# line_comments = false - -# If you prefer the indented syntax, you might want to regenerate this -# project again passing --syntax sass, or you can uncomment this: -# preferred_syntax = :sass -# and then run: -# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass - -line_comments = false # by Compass.app diff --git a/web/cobrands/bellavistaenaccion/layout.scss b/web/cobrands/bellavistaenaccion/layout.scss deleted file mode 100644 index 69e455aa5..000000000 --- a/web/cobrands/bellavistaenaccion/layout.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import "_colours"; -@import "../sass/layout"; diff --git a/web/cobrands/emptyhomes/SEHPlogo-bwS.png b/web/cobrands/emptyhomes/SEHPlogo-bwS.png Binary files differdeleted file mode 100644 index 496d43115..000000000 --- a/web/cobrands/emptyhomes/SEHPlogo-bwS.png +++ /dev/null diff --git a/web/cobrands/emptyhomes/Sheltercymru47.gif b/web/cobrands/emptyhomes/Sheltercymru47.gif Binary files differdeleted file mode 100644 index b7eb2c4ff..000000000 --- a/web/cobrands/emptyhomes/Sheltercymru47.gif +++ /dev/null diff --git a/web/cobrands/emptyhomes/Sheltercymru47s.png b/web/cobrands/emptyhomes/Sheltercymru47s.png Binary files differdeleted file mode 100644 index 5547be1e0..000000000 --- a/web/cobrands/emptyhomes/Sheltercymru47s.png +++ /dev/null diff --git a/web/cobrands/emptyhomes/app.png b/web/cobrands/emptyhomes/app.png Binary files differdeleted file mode 100644 index 8f422b08d..000000000 --- a/web/cobrands/emptyhomes/app.png +++ /dev/null diff --git a/web/cobrands/emptyhomes/c4logo.png b/web/cobrands/emptyhomes/c4logo.png Binary files differdeleted file mode 100644 index 783385e30..000000000 --- a/web/cobrands/emptyhomes/c4logo.png +++ /dev/null diff --git a/web/cobrands/emptyhomes/css/css.css b/web/cobrands/emptyhomes/css/css.css deleted file mode 100644 index 829986f59..000000000 --- a/web/cobrands/emptyhomes/css/css.css +++ /dev/null @@ -1,318 +0,0 @@ -/* Smaller map */ -/* -#map_box { - width: 380px; -} -#map, #drag { - width: 378px; - height: 378px; -} - -p#fixed, p#unknown { - margin-right: 400px; - width: auto; -} -*/ - -/* Generics */ - -body { - font-family: Geneva, Helvetica, Arial, sans-serif; - margin: 0; - padding: 0; - /* color: #a9aeb0; */ -} - -h1 { - margin: 0; - font-size: 165%; - padding: 3px; - color: #FFFFFF; - background-color: #9999CC; - background-color: #30517A; - -} -h2 { - font-size: 140%; - background-color: #B1BECF; - color: #30517A; - padding: 3px; -} - -h3 { - color: #30517A; -} - -a:link { - color: #30517A; -} -a:visited { - color: #354664; -} -a:hover, a:active { - background-color: #B1BECF; -} - -#mysociety blockquote { - border-left: solid 4px #013B63; -} - -#mysociety .a { - color: #000000; - background-color: #DCDCED; /* #427499; */ - background-color: #B1BECF; -} - -/* Site layout */ - -#header { - margin: 0; - padding: 5px 0; - float: left; -} - -#header img { - margin-left: 0.5em; -} - -#header #eha-logo { - float: left; - margin-right: 1em; -} - -#header div { - float: left; - margin-top: 0.5em; -} - -#mysociety { - width: 100%; /* Must specify a width or IE goes crazy wrong! */ - position: relative; - margin: 0 auto; - max-width: 60em; -} - -/* Can't put the margin in #mysociety because of above IE craziness */ -#wrapper { - clear: both; - margin: 0 2em 2em; - padding-top: 2em; -} - -#navigation { - float: right; - padding: 0; - margin: 0; - list-style-type: none; - font-size: 83%; -} -#navigation ul { - padding: 0; - margin: 0; -} -#navigation li { - display: inline; - padding: 0; - margin: 0; -} - -#navigation a { - display: -moz-inline-box; - display: inline-block; - padding: 0.5em 0.5em; -} -#navigation a:link, #navigation a:visited { - color: #30517A; -} -#navigation a:hover, #navigation a:active { - background-color: #DCDCED; - background-color: #9999CC; - background-color: #B1BECF; - - color: #ffffff; - color: #30517A; -} - -#nav_new a { - background-image: url("/i/new.png"); - background-repeat: no-repeat; - background-position: 100% 0; -} - -#meta { - clear: right; - float: right; - list-style-type: none; - margin: 0.25em 0.5em 0 1em; - padding: 0; - font-size: 83%; -} -#meta li { - display: inline; - margin: 0; - padding: 0 0 0 0.25em; - border-left: solid 1px #B1BECF; -} -#meta li:first-child { - border-left: none; -} - -#logo { - border: none; - position: absolute; - top: 4em; - right: 10px; -} - -#emptyhomes-footer { - clear: both; - font-size: 83%; - border-top: solid 2em #ffffff; - background-color: #B1BECF; - color: #000; - margin: 2em 0 1em 0; - padding: 20px; - overflow: auto; -} - -.ie6 #emptyhomes-footer { - zoom: 1; -} - -#emptyhomes-footer div { - float: left; - margin-right: 2em; -} - -#emptyhomes-footer a { - color: #000; -} - -#mysociety #postcodeForm { - background-color: #fe6500; - color: #000000; - font-size: 130%; -} - -#mysociety #postcodeForm a, #mysociety #postcodeForm a:hover { - color: #000000; - background-color: inherit; -} - -#mysociety #front_stats { - display: block; -} -#mysociety #front_stats div { - vertical-align: middle; - background-color: #fe6500; - color: #000000; - padding: 0.5em; - width: auto; - display: block; - margin-bottom: 0.5em; -} -#mysociety #front_stats div a { - color: #000000; - background-color: inherit; -} -#mysociety #front_stats div big { - display: inline; -} - -#mysociety #front_stats div#eha-app-link { - padding-top: 16px; - padding-left: 120px; - color: #fe6500; - background-color: #fff; - background-image: url("/cobrands/emptyhomes/app.png"); - background-repeat: no-repeat; -} -#mysociety #front_stats div#eha-app-link a { - color: #fe6500; - background-color: #000; -} - -#mysociety #problem_form { - clear: both; -} - -#mysociety #alert_links_area { - margin-top: 1px; -} - -#mysociety #eha_advert { - clear: both; - width: 55%; - margin: 0 auto; - padding: 0.5em; - text-align: center; - background-color: #ffeecc; - border: solid 1px #ff9900; -} - -#mysociety #front_intro { - margin-bottom: 1em; -} - -.video { - float: right; - margin-left: 35px; -} - -.channel4 { - font-size: 125%; -} -.channel4 > li:first-child + li { - margin-bottom: 1em; -} - -/* Front page how to report big */ - -#eha_steps { - background-image: url("/cobrands/emptyhomes/street-r.jpeg"); - background-repeat: no-repeat; - padding: 0.5em 2% 0.5em 8%; -} -#eha_steps h2 { - color: #000; - background-color: #fe6500; - margin-top: 0; - margin-bottom: 0.4em; -} -#eha_steps ol { - list-style-position: inside; - padding: 0 0 0 40%; - margin: 0; -} -#eha_steps li { - color: #fff; - background-color: #000; - padding: 0.25em; - margin-bottom: 0.5em; -} - -.bl { - color: #fff; - background-color: #000; -} - -/* Noddy half grid */ - -.grid-50 { - float: right; - width: 48%; - margin-right: 2%; -} -.grid-50:first-child { - margin-right: 0; -} -.grid-50 > h2:first-child { - margin-top: 0; -} -@media all and (max-width: 50em) { - #mysociety .grid-50 { - float: none; - width: auto; - } -} - diff --git a/web/cobrands/emptyhomes/eha-logo.jpeg b/web/cobrands/emptyhomes/eha-logo.jpeg Binary files differdeleted file mode 100644 index 250be8502..000000000 --- a/web/cobrands/emptyhomes/eha-logo.jpeg +++ /dev/null diff --git a/web/cobrands/emptyhomes/eha-logo.png b/web/cobrands/emptyhomes/eha-logo.png Binary files differdeleted file mode 100644 index 5cc912521..000000000 --- a/web/cobrands/emptyhomes/eha-logo.png +++ /dev/null diff --git a/web/cobrands/emptyhomes/eha.jpg b/web/cobrands/emptyhomes/eha.jpg Binary files differdeleted file mode 100644 index 56e767b86..000000000 --- a/web/cobrands/emptyhomes/eha.jpg +++ /dev/null diff --git a/web/cobrands/emptyhomes/eha.png b/web/cobrands/emptyhomes/eha.png Binary files differdeleted file mode 100644 index 8c17db486..000000000 --- a/web/cobrands/emptyhomes/eha.png +++ /dev/null diff --git a/web/cobrands/emptyhomes/street-r.jpeg b/web/cobrands/emptyhomes/street-r.jpeg Binary files differdeleted file mode 100644 index 722738de8..000000000 --- a/web/cobrands/emptyhomes/street-r.jpeg +++ /dev/null diff --git a/web/cobrands/emptyhomes/tiger-aspect.png b/web/cobrands/emptyhomes/tiger-aspect.png Binary files differdeleted file mode 100644 index 53e8d5311..000000000 --- a/web/cobrands/emptyhomes/tiger-aspect.png +++ /dev/null diff --git a/web/cobrands/fixmybarangay/_colours.scss b/web/cobrands/fixmybarangay/_colours.scss deleted file mode 100644 index d5544ff07..000000000 --- a/web/cobrands/fixmybarangay/_colours.scss +++ /dev/null @@ -1,21 +0,0 @@ -/* COLOURS */ - -$primary: #fff; //E6DBD6 -$primary_b: #000000; -$primary_text: #222222; - -$base_bg: #C7B299 url(images/pat3.png); -$base_fg: $primary_text; - -$map_nav_bg: url('images/fmb-header.png') 30% 0% repeat-x; -$nav_fg: #fff; -$nav_fg_hover: rgba(0,0,0,0.8); - -$col_click_map: #00BD08; -$col_click_map_dark: #4B8304; -$col_fixed_label: #00BD08; -$col_fixed_label_dark: #4B8304; - -$fmb_base_blue: #046AAA; -$fmb_dark_blue: #084E7A; -$fmb_tab_yellow: #FFD000; diff --git a/web/cobrands/fixmybarangay/base.scss b/web/cobrands/fixmybarangay/base.scss deleted file mode 100644 index 2f3fddaf3..000000000 --- a/web/cobrands/fixmybarangay/base.scss +++ /dev/null @@ -1,69 +0,0 @@ -@import "../sass/h5bp"; -@import "./_colours"; -@import "../sass/mixins"; -@import "compass"; - -$image-sprite: 'images/sprite.png'; - -@import "../sass/base"; - -#site-logo{ - width: 225px !important; - background: url($image-sprite) -3px -3px no-repeat; -} - -#barangay_buttons { - padding: 1em; -} - -.yellow-btn, -a.yellow-btn, -button.yellow-btn, -input.yellow-btn{ - @include button-reset(#FFD000, #cc9000, #aa7000, #300, #FFD000, #cc9000, #aa7000, #300); - &:visited, &:hover { - color:#300; - } -} - -.nav-menu--main a.report-a-problem-btn:hover { - background: #fff; -} - -.ie6 #site-logo { - background-image: url('images/ie_logo.png'); -} - -// #site-header creates grey bar in mobile -// .nav-wrapper-2 is used on desktop -#site-header{ - border-top: 0.25em solid $fmb_tab_yellow; - @include background(linear-gradient($fmb_dark_blue, $fmb_base_blue 10%, $fmb_base_blue 90%, $fmb_dark_blue)); -} - -ul#promo-list { - margin: 0.5em; - li { - list-style:none; - } -} -.promo-big, .promo-bigger { - font-size: 130%; - font-weight: bold; - padding: 0 0.2em; -} -.promo-bigger { - font-size: 150%; -} -.promo-example { - font-size: 90%; - font-style: italic; - border: 1px solid #aaa; - background-color:#f0ebe8; // pale tone of background image - padding: 0.666em; - margin: 1em 1em 1em 0; - div { - font-style: normal; - font-family: monospace; - } -} diff --git a/web/cobrands/fixmybarangay/config.rb b/web/cobrands/fixmybarangay/config.rb deleted file mode 100644 index cab97b18f..000000000 --- a/web/cobrands/fixmybarangay/config.rb +++ /dev/null @@ -1,25 +0,0 @@ -# Require any additional compass plugins here. - -# Set this to the root of your project when deployed: -http_path = "/" -css_dir = "" -sass_dir = "" -images_dir = "" -javascripts_dir = "" - -# You can select your preferred output style here (can be overridden via the command line): -# output_style = :expanded or :nested or :compact or :compressed - -# To enable relative paths to assets via compass helper functions. Uncomment: -# relative_assets = true - -# To disable debugging comments that display the original location of your selectors. Uncomment: -# line_comments = false - -# If you prefer the indented syntax, you might want to regenerate this -# project again passing --syntax sass, or you can uncomment this: -# preferred_syntax = :sass -# and then run: -# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass - -line_comments = false # by Compass.app diff --git a/web/cobrands/fixmybarangay/images/fmb-header.png b/web/cobrands/fixmybarangay/images/fmb-header.png Binary files differdeleted file mode 100644 index c3c45e009..000000000 --- a/web/cobrands/fixmybarangay/images/fmb-header.png +++ /dev/null diff --git a/web/cobrands/fixmybarangay/images/fmb-spinner-16x16.gif b/web/cobrands/fixmybarangay/images/fmb-spinner-16x16.gif Binary files differdeleted file mode 100644 index da5ea679a..000000000 --- a/web/cobrands/fixmybarangay/images/fmb-spinner-16x16.gif +++ /dev/null diff --git a/web/cobrands/fixmybarangay/images/ie_front_logo.gif b/web/cobrands/fixmybarangay/images/ie_front_logo.gif Binary files differdeleted file mode 100644 index 2eeda87ef..000000000 --- a/web/cobrands/fixmybarangay/images/ie_front_logo.gif +++ /dev/null diff --git a/web/cobrands/fixmybarangay/images/ie_logo.png b/web/cobrands/fixmybarangay/images/ie_logo.png Binary files differdeleted file mode 100644 index 454297104..000000000 --- a/web/cobrands/fixmybarangay/images/ie_logo.png +++ /dev/null diff --git a/web/cobrands/fixmybarangay/images/mobile-22x40.png b/web/cobrands/fixmybarangay/images/mobile-22x40.png Binary files differdeleted file mode 100644 index 6a85ab097..000000000 --- a/web/cobrands/fixmybarangay/images/mobile-22x40.png +++ /dev/null diff --git a/web/cobrands/fixmybarangay/images/pat3.png b/web/cobrands/fixmybarangay/images/pat3.png Binary files differdeleted file mode 100644 index a0f755de9..000000000 --- a/web/cobrands/fixmybarangay/images/pat3.png +++ /dev/null diff --git a/web/cobrands/fixmybarangay/images/sprite.png b/web/cobrands/fixmybarangay/images/sprite.png Binary files differdeleted file mode 100644 index cbde4ac7f..000000000 --- a/web/cobrands/fixmybarangay/images/sprite.png +++ /dev/null diff --git a/web/cobrands/fixmybarangay/layout.scss b/web/cobrands/fixmybarangay/layout.scss deleted file mode 100644 index defe1afd0..000000000 --- a/web/cobrands/fixmybarangay/layout.scss +++ /dev/null @@ -1,123 +0,0 @@ -@import "_colours"; - -$image-sprite: 'images/sprite.png'; - -@import "../sass/layout"; - -@mixin box_round($radius) { - -webkit-border-radius: $radius; /* Safari 3-4, iOS 1-3.2, Android ≤1.6 */ - border-radius: $radius; /* Opera 10.5, IE9+, Safari 5, Chrome, Firefox 4+, iOS 4, Android 2.1+ */ - - /* useful if you don't want a bg color from leaking outside the border: */ - -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; -} - -body { - .wrapper{ - background: url('images/fmb-header.png') 30% 0% repeat-x; - } - #site-logo { - left:8px; - } -} - - -body.frontpage { - #site-logo { - width: 370px !important; - height: 70px; - background: url('images/sprite.png') -3px -106px no-repeat; - top: 2em; - left: 1em; - } - - .wrapper { - background: url('images/fmb-header.png') 30% 0% repeat-x; - } -} - -.ie6 body.frontpage #site-logo { - background-image: url(images/ie_front_logo.gif); -} - -body.mappage .nav-wrapper div.nav-wrapper-2 { - border-bottom: 2px solid #333; -} - -#mysoc-logo { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIkAAAAyCAMAAABf9whNAAAA0lBMVEUAAABAQEBAQEBAQEBNTU1NTU1AQEBNTU1AQEBAQEBAQEBAQEBAQEBAQEBAQEBNTU1NTU1AQEBNTU1AQEBNTU1AQEBAQEBNTU2Mxj9NTU33kx5NTU1NTU1NTU3tHCRmLZEpq+JNTU2TJ4/tHCSTJ4/87iEpq+L3kx5NTU387iH87iHtHCSTJ4/3kx51K5CTJ49mLZGMxj/tHCSx0zVmLZH6wSBmLZFmLZFDdb/zYCFbuZGMxj/3kx5AQEBNTU0pq+LtHCSMxj/3kx787iFmLZGTJ49ns3BGAAAAPXRSTlMAQL+AQIAQECBwMGBQj98gn5/Pr+/vzzC/r79wYI9wv69QcK+vcICfv68QQBAwj0AwMBBggIBQr3BwgEBgSmaQCwAAAflJREFUeF7t1Ndy2zAQhtGfAAX2IpFUseSSOLGd3nt27bT3f6UsQHusRFcKmVxkcGa4wvCG34AQ8V/wPM/zPM8zSaOaxGBHtFpF+IfikqwYO0LmELfiHH/XlLokSBrsiurtPdGkMJJFWFWTSQUZC0RhWMFNRQWuvTw9RS/VOolNEBgAudYpkE5pHqRpEACIZQ4x4RkztxMWd6KWa2DDvFDUBeg9urr6cPAZMIqEDogCmDmJKdwtlbjXOCc1sIRnhyxj0vIMNbeQMUNun5DBOTo6/3oASMhUF6krka3IM1lkikqdGaICMVE2sKSNICkR1sxYyMag5TWQd7bFPH4G8eT8zcOUKIGwJUYuSE7hzoldlZAwM7Dkwg4GQjtmXMtvBZHNiZJ7P+5C3P/2oH9SXyKXo1yJq0sbmmLMkg23h7xCryR1W5L8WqKsmz1BSbqjfNSSiMUGMEB/Bp8ePwdeLF/ZAn1TEssFR1MJIZmyGLUENXNrI8pCK6IMx99fn50tvyyBcuvEKuqKXDcuocgAQ/I7conMGgA5BfD23fvLy4/LT0Ba/v4vphRxR9dnlmIMU4ULO0IgsgPr/rya3H7F4JycoCf3sq0vW5ICiLXO3YtsMC4JqbG3uCFKMSb3nYuwNyLKMK6Q6wj7a7oMY4vwJwwG8TzP8zzP834CEcRJKkEhVogAAAAASUVORK5CYII="); -} -#front-main { - background: rgba(255,255,255,0.1); - margin-top: 70px; - - #postcodeForm { - margin-left: 0; - margin-right: 0; - } - - a { - text-decoration:none; - } - - p { - padding-bottom:4px; - } -} - -.nav-menu--mysoc { - padding: 1px 0.5em; -} -.nav-menu--main { - padding: 3px 0; -} - -body.mappage .nav-menu--main a, -body.mappage .nav-menu--main span, -.nav-menu--main a, -.nav-menu--main span -{ - color: #fff; - padding: 0.7em; - background-color: rgba(0,0,0,0); - background-image: none; - @include box_round(0.35em); - margin-left: 3px; - - &.report-a-problem-btn { - color: #fff; - padding: 0.7em; - background-color: rgba(0,0,0,0); - background-image: none; - margin: 0; - } - - &.fmb-bgy-btn { - color: #fcc921; - } - - &:hover { - background-color: rgba(0,0,0,0.75); - background-image: none; - } -} - - -#user-meta { - max-width: 96%; -} - - - -#front-howto { - #front_stats { - border-top: 0.25em solid #000; - div { - big { - color: #000; - } - } - } -} - -@import "message_manager"; diff --git a/web/cobrands/fixmybarangay/message_manager.scss b/web/cobrands/fixmybarangay/message_manager.scss deleted file mode 100644 index 9af6c80ee..000000000 --- a/web/cobrands/fixmybarangay/message_manager.scss +++ /dev/null @@ -1,266 +0,0 @@ -@import "_colours"; - -$mm_status_message_color: #a66; -$mm_border_color: #eee; - -$color_reply_bg: #cccccc; -$color_bg_reply_0: #E8E8E8; -$color_bg_reply_1: #DEDEDE; -$color_bg_reply_2: #D6D6D6; -$color_bg_reply_3: #D1D1D1; -$color_bg_reply_4: #C9C9C9; -$color_bg_reply_5: #BFBFBF; -$color_bg_reply_6: #B8B8B8; -$color_bg_mm_list: #F6F6F6; - -$color_bg_btn_hide: #ff0000; -$color_bg_btn_reply: #008000; -$color_bg_btn_info: #0000ff; -$color_bg_btn_detach: #FFA500; - -$weak_text_color: #666; - -p.mm-submitted-by-sms { - color: $weak_text_color; - font-style: italic; - font-size: 0.8125em; - img { - border: none; - margin-right: 0.5em; - width: 22px; - height: 40px; - vertical-align:middle; - display: inline; - } -} - -#message_manager { - margin-top: 0; - li#mm-admin-buttons { - margin: -0.5em 0 0 0; - text-align: right; - font-size:80%; - padding:4px 0; - a { - padding: 0.25em 0.5em; - border:1px solid $mm_border_color; - margin: 0 0.5em; - display: inline-block; - } - background-color: #fff; - &:hover { - background-color: #fff; - } - #mm-link-to-toggle-archive { - border-color: green; - } - } - #message-control { - background-color: #fff; - &:hover { - background-color: #fff; - } - #mm-username-container { - display: none; // hidden during dev - padding: 8px; - text-align: right; - color: $mm_status_message_color; - font-style: italic; - span { - color: #000; - font-style: normal; - } - } - #mm-status-message-container { - position: relative; - min-height: 1.4em; - margin: 0 0 8px 0.5em; - padding: 8px 4px 8px 24px; - color: $mm_status_message_color; - font-style: italic; - p { - margin:0; - padding:0; - } - #mm-spinner { - position: absolute; - left: 4px; - top: 10px; - display: none; - } - } - #mm-login-container { - display: none; // only shown on/after a 403 - border: 1px solid $mm_border_color; - padding: 0 1em; - margin: 1em; - input { - margin-bottom: 1em; - } - } - } - - #mm-message-list { - ul { - list-style-type: none; - padding: 0; - margin: 0; - li, ul.mm-reply-thread li { - position: relative; - clear: both; - margin: 4px 0 0 0; - padding: 0; - background-color: $color_bg_mm_list; - p { - background-color: inherit; - margin: 0.25em 0 0 0; - padding: 0.5em 1em; - &:hover { background-color: #efe;} - .msg-info-box { - font-style: italic; - font-size: 90%; - color: #666; - border-top: 1px dashed #666; - padding:4px 0 0 0; - margin: 4px 0 0 0; - display: none; - } - } - ul.mm-reply-thread { - li { - margin:0; - } - .mm-reply { - background-color: #ccc; - &:hover {background-color: #eef;} - } - .mm-reply-0 { margin-left: 0em; background-color: $color_bg_reply_0;} - .mm-reply-1 { margin-left: 1em; background-color: $color_bg_reply_1;} - .mm-reply-2 { margin-left: 2em; background-color: $color_bg_reply_2;} - .mm-reply-3 { margin-left: 3em; background-color: $color_bg_reply_3;} - .mm-reply-4 { margin-left: 4em; background-color: $color_bg_reply_4;} - .mm-reply-5 { margin-left: 5em; background-color: $color_bg_reply_5;} - .mm-reply-6 { margin-left: 6em; background-color: $color_bg_reply_6;} - } - &:hover { background-color: #efe;} - &.msg-is-locked { background-color: #fdd;} - &.msg-is-busy { background-color: #ffd;} - &.msg-is-owned { background-color: #dfd;} - &.msg-is-active { - background-color: $col_click_map; color:#fff; - p:hover { background-color: $col_click_map; color:#fff; } // fix for mouseover on p - p.mm-reply:hover {background-color: #eef; color:#000;} // fix for mouseover on p - } - span.msg-tag { - width: 3em; - float:left; - } - .mm-radio-filler, - input[type=radio] { - display: block; - float: left; - } - label, span.msg-text { - display: block; - font-weight: normal; - margin: 0.1em 0 0.1em 4.5em; - } - .mm-radio-filler { - margin:0; - padding:0; - } - .mm-msg-action { - display: none; - padding: 0.2em 0.4em; - color: white; - text-align: center; - position: absolute; - top: 4px; - &:hover { background-color: black;} - } - .mm-hide { - right:0px; - background-color: $color_bg_btn_hide; - cursor: pointer; - } - .mm-info { - right:1.5em; - background-color: $color_bg_btn_info; - cursor: pointer; - } - .mm-rep { - right:2.6em; - background-color: $color_bg_btn_reply; - cursor: pointer; - } - .mm-detach { - right:5.65em; - background-color: $color_bg_btn_detach; - cursor: pointer; - } - } - &.mm-archive { - display: none; // archive only shown on interaction - li label { - cursor: default; - } - } - } - } - p.mm-empty { - margin: 1em; - } -} -#show_messages, #copy_to_update, #reply-submit { - margin: 1em; -} -#copy_to_update { - display: none; // show on demand, not before -} -#show_messages { - width: 11em; // hack to stop adjacent button hopping when button message changes -} - -#detach-form-container, -#reply-form-container, -#hide-form-container { - p { - color: #000; - max-width: 25em; - margin: 1em; - } - #hide-form, - #reply-form{ - margin-top: 2em; - textarea { - min-height: 3em; - margin-bottom: 0.5em; - } - } - #mm-boilerplate-replies-box, #mm-boilerplate-hide-reasons-box { - overflow: hidden; - display: none; - } - select { - width: 100%; - max-width: 25em; - } -} -#mm-help { - .demo_hide_btn, .demo_reply_btn, .demo_info_btn, .demo_detach_btn { - color: #fff; - font-weight: bold; - padding: 0.2em 0.4em; - } - .demo_hide_btn { background-color: $color_bg_btn_hide; } - .demo_reply_btn { background-color: $color_bg_btn_reply; } - .demo_info_btn { background-color: $color_bg_btn_info; } - .demo_detach_btn{ background-color: $color_bg_btn_detach; } - h3 { - border-top: 1px solid $color_reply_bg; - padding-top: 0.8em; - } - p { - margin: 1em; - } -} diff --git a/web/cobrands/fixmybarangay/message_manager_client.js b/web/cobrands/fixmybarangay/message_manager_client.js deleted file mode 100644 index 06ea7a909..000000000 --- a/web/cobrands/fixmybarangay/message_manager_client.js +++ /dev/null @@ -1,850 +0,0 @@ -/* - * creates a message_manage object that uses the Message Manager API: - * include this file, then initialise the object when the page is loaded with - * message_manager.config(settings) - * - * i.e., you *must* do something like: - * - * $(document).ready(function() { - * message_manager.config({url_root:'http://yourdomain.com/messages'}) - * } - * - * You'll need to set the url_root, but you can leave everything else to default - * provided your HTML ids and classes are the same as ours (which they might be: - * see the Message Manager's dummy client (at /client) to see the HTML we use). - * - * The (optional) single parameter for .config() is a hash of name-value pairs: - * - * url_root accepts the root URL to the message manager. - * - * want_unique_locks normally MM clients should relinquish all other locks - * when claiming a new one so want_unique_locks defaults - * to true; but you can set it explicitly here. - * - * mm_name name of Message Manager (used in error messages shown - * to user, e.g., "please log in to Message Manager") - * - * msg_prefix all message <li> items have this as their ID prefix - * - * want_nice_msgs don't use language like "lock granted" - * - * tooltips hash of tooltips: override the items you want, keys are: - * tt_hide, tt_info, tt_reply, tt_radio - * - * want_radio_btns normally MM clients show a radio button, but for archive - * messages this might be unneccessary: default is true, but - * pass in false to suppress this. - * - * *_selector these are the jQuery selects that will be used to find - * the respective elements: - * - * message_list_selector: list of messages - * status_selector: status message display - * login_selector: login form - * - * - * Summary of all methods: - * message_manager.config([options]) - * message_manager.setup_click_listener([options]) - * message_manager.get_available_messages([options]) - * message_manager.request_lock(msg_id, [options]) (default use: client code doesn't need to call this explicitly) - * message_manager.assign_fms_id(msg_id, fms_id, [options]) - * message_manager.hide(msg_id, reason_text, [options]) - * message_manager.reply(msg_id, reply_text, [options]) - * message_manager.show_info(msg_id) - * message_manager.sign_out() - * - * Note: options are {name:value, ...} hashes and often include "callback" which is a function that is executed on success - * but see the docs (request_lock executes callback if the call is successful even if the lock was denied, for example). - * Some methods take 'callback' as the only option, but you still need to pass it as a named option. -*/ - -var message_manager = (function() { - - // default/config values: to be overridden using "config({name:value, ...})" - - var _url_root = 'http://www.example.com/message_manager/'; - var _want_unique_locks = true; - var _msg_prefix = "msg-"; - var _username; - var _mm_name = "Message Manager"; - var _use_fancybox = true; // note: currently *must* have fancybox! - var _want_nice_msgs = false; - var _want_radio_btns = true; - - var _tooltips = { - tt_hide : "Hide message", - tt_info : "Get info", - tt_reply : "Send SMS reply", - tt_radio : "Select message before clicking on map to create report", - tt_detach: "Detach this message because it is not a reply" - }; - - // cached jQuery elements, populated by the (mandatory) call to config() - var $message_list_element; - var $status_element; - var $login_element; - var $htauth_username; - var $htauth_password; - var $hide_reasons; - var $boilerplate_replies; - - var msg_no_config_err = "Config error: no Message Manager URL has been specified"; - - // set _want_nice_msgs to avoid using the term "lock" - var msg_trying_for_lock = ["Trying for lock...", "Checking message..." ]; - var msg_checking_lock = ["Checking lock...", "Checking message..." ]; - var msg_claiming_lock = ["Claiming lock...", "Checking message..." ]; - var msg_lock_granted_ok = ["Lock granted OK", "Checking message... OK"]; - var msg_lock_denied = ["", "Someone is working with that message right now!"]; - - function get_msg(msg) { - return msg[_want_nice_msgs? 1 : 0]; - } - - var config = function(settings) { - var selectors = { - message_list_selector: '#mm-message-list', - status_selector: '#mm-status-message-container', - login_selector: '#mm-login-container', - username_selector: '#mm-received-username', - htauth_username_selector: '#mm-htauth-username', - htauth_password_selector: '#mm-htauth-password', - boilerplate_hide_reasons: '#mm-boilerplate-hide-reasons-box', - boilerplate_replies: '#mm-boilerplate-replies-box' - }; - if (settings) { - if (typeof settings.url_root === 'string') { - _url_root = settings.url_root; - if (_url_root.length > 0 && _url_root.charAt(_url_root.length-1) !== "/") { - _url_root+="/"; - } - } - if (typeof settings.want_unique_locks !== 'undefined') { - _want_unique_locks = settings.want_unique_locks; - } - if (typeof settings.msg_prefix === 'string') { - _msg_prefix = settings.msg_prefix; - } - for (var sel in selectors) { - if (typeof settings[sel] === 'string') { - selectors[sel] = settings[sel]; - } - } - if (typeof settings.mm_name === 'string') { - _mm_name = settings.mm_name; - } - if (typeof settings.want_nice_msgs !== 'undefined') { - _want_nice_msgs = settings.want_nice_msgs; - } - if (typeof settings.want_radio_btns !== 'undefined') { - _want_radio_btns = settings.want_radio_btns; - } - if (settings.tooltips) { - for (var key in settings.tooltips) { - if (settings.tooltips.hasOwnProperty(key)) { - _tooltips[key]=settings.tooltips[key]; - } - } - } - } - $message_list_element = $(selectors.message_list_selector); - $status_element = $(selectors.status_selector); - $login_element = $(selectors.login_selector); - $htauth_username = $(selectors.htauth_username_selector); - $htauth_password = $(selectors.htauth_password_selector); - $hide_reasons = $(selectors.boilerplate_hide_reasons); - $boilerplate_replies = $(selectors.boilerplate_replies); - if (typeof settings.url_root === 'string' && _url_root.length===0) { - say_status(msg_no_config_err); - } - }; - - var make_base_auth = function(user, password) { - var tok = user + ':' + password; - var hash = encodeBase64(tok); // window.btoa(tok) doesn't work on all browers - return "Basic " + hash; - }; - - function encodeBase64(input) { - var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', - INVALID_CHARACTER_ERR = (function () { - // fabricate a suitable error object - try { - document.createElement('$'); - } catch (error) { - return error; - } - }()), - block, charCode, idx, map, output; - // encoder (with wee change by mhl Mark to satisfy jslint) - // [https://gist.github.com/999166] by [https://github.com/nignag] - for (idx = 0, map = chars, output = ''; - input.charAt(idx | 0) || ((map = '=') && (idx % 1)); - output += map.charAt(63 & block >> 8 - idx % 1 * 8)) { - charCode = input.charCodeAt(idx += 3/4); - if (charCode > 0xFF) { - throw INVALID_CHARACTER_ERR; - } - block = block << 8 | charCode; - } - return output; - } - - var get_current_auth_credentials = function() { - var base_auth = ""; - var htauth_un = ""; - var htauth_pw = ""; - if ($htauth_username.size()) { - htauth_un = $htauth_username.val(); - htauth_pw = $htauth_password.val(); - } - if (htauth_un.length === 0 && Modernizr.sessionstorage && sessionStorage.getItem('mm_auth')) { - base_auth = sessionStorage.getItem('mm_auth'); - } else { - base_auth = make_base_auth(htauth_un, htauth_pw); - if (Modernizr.sessionstorage) { - sessionStorage.mm_auth = base_auth; - } - } - return base_auth; - }; - - var sign_out = function() { // clear_current_auth_credentials - if (Modernizr.sessionstorage) { - sessionStorage.removeItem('mm_auth'); - } - if ($htauth_password) { - $htauth_password.val(''); - } - }; - - var show_login_form = function(suggest_username) { - $('.mm-msg', $message_list_element).remove(); // remove (old) messages - if ($htauth_username.size() && ! $htauth_username.val()) { - $htauth_username.val(suggest_username); - } - $login_element.stop(true,true).slideDown(); - }; - - var say_status = function (msg, show_spinner, allow_html) { - if ($status_element) { - if (show_spinner) { - // slow fade in so that spinner only appears if there's a long delay - $status_element.find('#mm-spinner').stop(true,true).fadeIn(1200); - } else { - $status_element.find('#mm-spinner').stop(true,true).hide(); - } - $status_element.stop(true,true).show(); - if (allow_html) { - $status_element.find('p').html(msg); - } else { - $status_element.find('p').text(msg); - } - } - }; - - var extract_replies = function(replies, depth, is_archive) { - var $ul = ""; - if (replies && replies.length > 0) { - $ul = $('<ul class="mm-reply-thread"/>'); - for (var i=0; i<replies.length; i++) { - $ul.append(get_message_li(replies[i], depth, is_archive)); - } - } - return $ul; - }; - - var get_message_li = function(message_root, depth, is_archive) { - var msg = message_root.Message; // or use label value - var lockkeeper = message_root.Lockkeeper.username; - var escaped_text = $('<div/>').text(msg.message).html(); - var $p = $('<p/>'); - var $hide_button = $('<a class="mm-msg-action mm-hide" id="mm-hide-' + msg.id + '" href="#hide-form-container" title="' + _tooltips.tt_hide + '">X</a>'); - var $info_button = $('<span class="mm-msg-action mm-info" id="mm-info-' + msg.id + '" title="' + _tooltips.tt_info + '">i</span>'); - var $reply_button = $('<a class="mm-msg-action mm-rep" id="mm-rep-' + msg.id + '" href="#reply-form-container" title="' + _tooltips.tt_reply + '">reply</a>'); - var $detach_button = $('<a class="mm-msg-action mm-detach" id="mm-rep-' + msg.id + '" href="#detach-form-container" title="' + _tooltips.tt_detach + '">detach</a>'); - var is_radio_btn = _want_radio_btns && depth === 0 && ! is_archive; - if (_use_fancybox) { - $reply_button.fancybox(); - $hide_button.fancybox(); - $detach_button.fancybox(); - } - if (depth === 0) { - var tag = (!msg.tag || msg.tag === 'null')? ' ' : msg.tag; - tag = $('<span class="msg-tag"/>').html(tag); - var radio = null; - if (is_radio_btn) { - radio = $('<input type="radio"/>').attr({ - 'id': 'mm_text_' + msg.id, - 'name': 'mm_text', - 'value': escaped_text, - 'title': is_radio_btn? _tooltips.tt_radio : "" - }).wrap('<p/>').parent().html(); - } else { - radio = $("<p>–</p>").addClass('mm-radio-filler'); - } - var label = $('<label />').attr({ - 'class': 'msg-text', - 'for': 'mm_text_' + msg.id, - 'title': is_radio_btn? _tooltips.tt_radio : "" - }).text(escaped_text).wrap('<p/>').parent().html(); - $p.append(tag).append(radio).append(label); - } else { - $p.text(escaped_text).addClass('mm-reply mm-reply-' + depth); - } - var $litem = $('<li id="' + _msg_prefix + msg.id + '" class="mm-msg">').append($p).append($hide_button).append($info_button); - if (depth > 0 && depth % 2 === 0) { // only even-numbered depths are incoming replies that can be detached - $litem.append($detach_button); - } - if (msg.is_outbound != 1) { - $litem.append($reply_button); - } - if (lockkeeper) { - $litem.addClass(lockkeeper == _username? 'msg-is-owned' : 'msg-is-locked'); - } - var info_text = ""; - if (msg.is_outbound == 1) { - info_text = 'sent on ' + msg.created + ' by ' + msg.sender_token; - } else { - info_text = 'received on ' + msg.created + ' from ' + '<abbr title="'+ msg.sender_token + '">user</abbr>'; - } - $p.append('<div class="msg-info-box" id="msg-info-box-' + msg.id + '">' + info_text + '</div>'); - if (message_root.children) { - $litem.append(extract_replies(message_root.children, depth+1, is_archive)); - } - return $litem; - }; - - var show_available_messages = function(data, anim_duration) { - var messages = data.messages; - _username = data.username; - var $output = $message_list_element; - if (anim_duration > 0) { - $output.stop(true,true).fadeOut(anim_duration, function(){ - render_available_messages(data, anim_duration); - }); - } else { - render_available_messages(data, anim_duration); - } - }; - - // render allows animation (if required) to hide messages before repainting and then revealing them - var render_available_messages = function(data, anim_duration) { - var $output = $message_list_element; - $output.empty(); - var archive = data.messages_for_this_report; - var $archive = ""; - var i, litem; - if (archive instanceof Array) { - var $arch_ul = $('<ul class="mm-root mm-archive"/>'); - for(i=0; i< archive.length; i++) { - litem = get_message_li(archive[i], 0, true); - $arch_ul.append(litem); - } - $output.append($arch_ul); - } - var messages = data.messages; - _username = data.username; - if (messages instanceof Array) { - var $ul = $('<ul class="mm-root mm-current"/>'); - if (messages.length === 0) { - $output.append('<p class="mm-empty">No messages available.</p>'); - } else { - for(i=0; i< messages.length; i++) { - litem = get_message_li(messages[i], 0, false); - $ul.append(litem); - } - } - $output.append($ul); - } else { - $output.html('<p>No messages (server did not send a list).</p>'); - } - if (anim_duration > 0) { - $output.slideDown(anim_duration); - } - }; - - // accept an element (e.g., message_list) and add the click event to the *radio button* within it - // A bit specific to expect li's perhaps. - // options are passed through to the lock - var setup_click_listener = function(options) { - $message_list_element.on('click', 'input[type=radio]', function(event) { - var $li = $(this).closest('li'); - var id = $li.attr('id').replace(_msg_prefix, ''); - if ($li.hasClass('msg-is-locked')) { - say_status(get_msg(msg_trying_for_lock), true); - } else if ($li.hasClass('msg-is-owned')) { - say_status(get_msg(msg_checking_lock), true); - } else { - say_status(get_msg(msg_claiming_lock), true); - } - request_lock(id, options); - }); - // clicking the reply button loads the id into the (modal/fancybox) reply form - $message_list_element.on('click', '.mm-rep', function(event) { - $('#reply_to_msg_id').val($(this).closest('li').attr('id').replace(_msg_prefix, '')); - }); - // clicking the hide button loads the id into the (modal/fancybox) hide form - $message_list_element.on('click', '.mm-hide', function(event) { - $('#hide_msg_id').val($(this).closest('li').attr('id').replace(_msg_prefix, '')); - // $('#hide-form-message-text').val(TODO); - }); - // clicking the detach button loads the id into the (modal/fancybox) detach form - $message_list_element.on('click', '.mm-detach', function(event) { - $('#detach_msg_id').val($(this).closest('li').attr('id').replace(_msg_prefix, '')); - }); - }; - - // gets messages or else requests login - // options: suggest_username, if provided, is preloaded into the login form if provided - // anim_duration: duration of fade/reveal (0, by defaut, does no animation) - // fms_id: if provided, display an archive of messages for this username - var get_available_messages = function(options) { - var base_auth = get_current_auth_credentials(); - var suggest_username = ""; - var anim_duration = 0; - var callback = null; - var fms_id = null; - if (options) { - if (typeof(options.callback) === 'function') { - callback = options.callback; - } - if (typeof options.suggest_username === 'string') { - suggest_username = options.suggest_username; - } - if (typeof options.anim_duration === 'string' || typeof options.anim_duration === 'number') { - anim_duration = parseInt(options.anim_duration, 10); - if (isNaN(anim_duration)) { - anim_duration = 0; - } - } - if (typeof options.fms_id === 'string' || typeof options.fms_id === 'number') { - fms_id = parseInt(options.fms_id, 10); - if (isNaN(fms_id)) { - fms_id = 0; - } - } - } - if (base_auth === "") { - show_login_form(suggest_username); - return; - } - $login_element.stop(true,true).hide(); - if (_url_root.length === 0) { - say_status(msg_no_config_err); - } else { - var ajax_url = _url_root +"messages/available.json"; - if (fms_id) { - ajax_url += "?fms_id=" + fms_id; - } - say_status("Fetching messages...", true); - $.ajax({ - dataType: "json", - type: "get", - url: ajax_url, - beforeSend: function (xhr){ - xhr.setRequestHeader('Authorization', get_current_auth_credentials()); - xhr.withCredentials = true; - }, - success: function(data, textStatus) { - show_available_messages(data, anim_duration); - say_status("Fetching messages... done, OK", false); // loaded OK - if (typeof(callback) === "function") { - callback.call($(this), data); // execute callback - } - }, - error: function(jqXHR, textStatus, errorThrown) { - var st = jqXHR.status; - var msg_is_html = false; - if (st == 401 || st == 403) { - var msg = (st == 401 ? "Invalid username or password for" : "Access denied: please log in to") + " " + _mm_name; - say_status(msg); - show_login_form(suggest_username); - } else { - var err_msg = "Unable to load messages: "; - if (st === 0 && textStatus === 'error') { // x-domain hard to detect, sometimes intermittent? - if (_url_root.indexOf('https')===0 && ! location.protocol != 'https:') { - var surl = location.href.replace(/^http:/, 'https:'); - err_msg += 'this is an insecure URL.<br/><a href="' + surl + '">Try from HTTPS instead?</a>'; - msg_is_html = true; - } else { - err_msg += "maybe try refreshing page?"; - } - } else { - err_msg += textStatus + " (" + st + ")"; - } - say_status(err_msg, false, msg_is_html); - } - } - }); - } - }; - - var request_lock = function(msg_id, options) { - var $li = $('#' + _msg_prefix + msg_id); - var lock_unique = _want_unique_locks; - var callback = null; - if (options) { - if (typeof(options.callback) === 'function') { - callback = options.callback; - } - if (typeof(options.lock_unique) !== undefined && options.lock_unique !== undefined) { - lock_unique = options.lock_unique; - } - } - $li.addClass('msg-is-busy'); - $.ajax({ - dataType:"json", - type:"post", - url: _url_root +"messages/" + - (lock_unique? "lock_unique" : "lock") + - "/" + msg_id + ".json", - beforeSend: function (xhr){ - xhr.setRequestHeader('Authorization', get_current_auth_credentials()); - xhr.withCredentials = true; - }, - success:function(data, textStatus) { - if (data.success) { - if (lock_unique) { - $('.msg-is-owned', $message_list_element).removeClass('msg-is-owned'); - } - $li.removeClass('msg-is-busy msg-is-locked').addClass('msg-is-owned'); - say_status(get_msg(msg_lock_granted_ok)); // to data['data']['Lockkeeper']['username']? - } else { - $li.removeClass('msg-is-busy').addClass('msg-is-locked'); - say_status(get_msg(msg_lock_denied) || ("lock failed: " + data.error)); - } - if (typeof(callback) === "function") { // note callbacks must check data['success'] - callback.call($(this), data); // returned data['data'] is 'Message', 'Source', 'Lockkeeper' for success - } - }, - error: function(jqXHR, textStatus, errorThrown) { - $li.removeClass('msg-is-busy'); - say_status("error: " + textStatus + ": " + errorThrown); - } - }); - }; - - var assign_fms_id = function(msg_id, fms_id, options) { - var check_li_exists = false; - var is_async = true; - var callback = null; - if (options) { - if (typeof(options.callback) === 'function') { - callback = options.callback; - } - if (typeof(options.check_li_exists) !== undefined && options.check_li_exists !== undefined) { - check_li_exists = true; // MM dummy - } - if (typeof(options.is_async) !== undefined && options.is_async !== undefined) { - is_async = options.is_async; - } - } - var $li = $('#' + _msg_prefix + msg_id); - if (check_li_exists) { - if ($li.size() === 0) { - say_status("Couldn't find message with ID " + msg_id); - return; - } - } - if (isNaN(parseInt(fms_id,10))) { - say_status("missing FMS id"); - return; - } - $li.addClass('msg-is-busy'); - $.ajax({ - async:is_async, - dataType:"json", - type:"post", - data: {fms_id: fms_id}, - url: _url_root +"messages/assign_fms_id/" + msg_id + ".json", - beforeSend: function (xhr){ - xhr.setRequestHeader('Authorization', get_current_auth_credentials()); - xhr.withCredentials = true; - }, - success:function(data, textStatus) { - if (data.success) { - $li.removeClass('msg-is-busy msg-is-locked').addClass('msg-is-owned').fadeOut('slow'); // no longer available - say_status("OK: report ID was assigned to message."); - if (typeof(callback) === "function") { - callback.call($(this), data.data); // returned data['data'] is 'Message', 'Source', 'Lockkeeper' for success - } - } else { - $li.removeClass('msg-is-busy').addClass('msg-is-locked'); - say_status("failed: " + data.error); - } - }, - error: function(jqXHR, textStatus, errorThrown) { - say_status("error: " + textStatus + ": " + errorThrown); - $li.removeClass('msg-is-busy'); - } - }); - }; - - var reply = function(msg_id, reply_text, options) { - if (_use_fancybox){ - $.fancybox.close(); - } - var callback = null; - var check_li_exists = false; - if (options) { - if (typeof(options.callback) === 'function') { - callback = options.callback; - } - if (typeof(options.check_li_exists) !== undefined && options.check_li_exists !== undefined) { - check_li_exists = true; // MM dummy - } - } - var $li = $('#' + _msg_prefix + msg_id); - if (check_li_exists) { - if ($li.size() === 0) { - say_status("Couldn't find message with ID " + msg_id); - return; - } - } - reply_text = $.trim(reply_text); - if (reply_text === '') { - say_status("No reply sent: message was empty!"); - return; - } - $li.addClass('msg-is-busy'); - $.ajax({ - dataType:"json", - type:"post", - data: {reply_text: reply_text}, - url: _url_root +"messages/reply/" + msg_id + ".json", - beforeSend: function (xhr){ - xhr.setRequestHeader('Authorization', get_current_auth_credentials()); - xhr.withCredentials = true; - }, - success:function(data, textStatus) { - if (data.success) { - $li.removeClass('msg-is-busy msg-is-locked').addClass('msg-is-owned'); // no longer available - say_status("Reply sent OK"); - if (typeof(callback) === "function") { - callback.call($(this), data.data); // returned data['data'] is null but may change in future - } - } else { - $li.removeClass('msg-is-busy').addClass('msg-is-locked'); - say_status("Reply failed: " + data.error); - } - }, - error: function(jqXHR, textStatus, errorThrown) { - say_status("Reply error: " + textStatus + ": " + errorThrown); - $li.removeClass('msg-is-busy'); - } - }); - }; - - var hide = function(msg_id, reason_text, options) { - if (_use_fancybox){ - $.fancybox.close(); - } - var callback = null; - var check_li_exists = false; - if (options) { - if (typeof(options.callback) === 'function') { - callback = options.callback; - } - if (typeof(options.check_li_exists) !== undefined && options.check_li_exists !== undefined) { - check_li_exists = true; // MM dummy - } - } - var $li = $('#' + _msg_prefix + msg_id); - if (check_li_exists) { - if ($li.size() === 0) { - say_status("Couldn't find message with ID " + msg_id); - return; - } - } - reason_text = $.trim(reason_text); - $li.addClass('msg-is-busy'); - $.ajax({ - dataType:"json", - type:"post", - data: {reason_text: reason_text}, - url: _url_root +"messages/hide/" + msg_id + ".json", - beforeSend: function (xhr){ - xhr.setRequestHeader('Authorization', get_current_auth_credentials()); - xhr.withCredentials = true; - }, - success:function(data, textStatus) { - if (data.success) { - $li.removeClass('msg-is-busy msg-is-locked').addClass('msg-is-owned').fadeOut('slow'); // no longer available - say_status("Message hidden"); - if (typeof(callback) === "function") { - callback.call($(this), data.data); - } - } else { - $li.removeClass('msg-is-busy').addClass('msg-is-locked'); - say_status("Hide failed: " + data.error); - } - }, - error: function(jqXHR, textStatus, errorThrown) { - say_status("Hide error: " + textStatus + ": " + errorThrown); - $li.removeClass('msg-is-busy'); - } - }); - }; - - var show_info = function(msg_id) { - var $info = $("#msg-info-box-" + msg_id); - if ($info.size()==1) { - if ($info.is(':hidden')) { - $info.slideDown(); - } else { - $info.slideUp(); - } - } - }; - - var mark_as_not_a_reply = function(msg_id, options) { - if (_use_fancybox){ - $.fancybox.close(); - } - var callback = null; - var check_li_exists = false; - if (options) { - if (typeof(options.callback) === 'function') { - callback = options.callback; - } - if (typeof(options.check_li_exists) !== undefined && options.check_li_exists !== undefined) { - check_li_exists = true; // MM dummy - } - } - var $li = $('#' + _msg_prefix + msg_id); - if (check_li_exists) { - if ($li.size() === 0) { - say_status("Couldn't find message with ID " + msg_id); - return; - } - } - $li.addClass('msg-is-busy'); - $.ajax({ - dataType:"json", - type:"post", - data: {}, - url: _url_root +"messages/mark_as_not_a_reply/" + msg_id + ".json", - beforeSend: function (xhr){ - xhr.setRequestHeader('Authorization', get_current_auth_credentials()); - xhr.withCredentials = true; - }, - success:function(data, textStatus) { - if (data.success) { - $li.removeClass('msg-is-busy msg-is-locked').addClass('msg-is-owned').fadeOut('slow'); // no longer available - say_status("Message no longer marked as a reply"); - if (typeof(callback) === "function") { - callback.call($(this), data.data); - } - } else { - $li.removeClass('msg-is-busy').addClass('msg-is-locked'); - say_status("Hide failed: " + data.error); - } - }, - error: function(jqXHR, textStatus, errorThrown) { - say_status("Detach error: " + textStatus + ": " + errorThrown); - $li.removeClass('msg-is-busy'); - } - }); - }; - - // if boilerplate is not already in local storage, make ajax call and load them - // otherwise, populate the boilerplate select lists: these are currently the - // reasons for hiding a message, and pre-loaded replies.message-manager.dev.mysociety.org - // NB no auth required on this call - var populate_boilerplate_strings = function(boilerplate_type, options) { - if (Modernizr.sessionstorage && sessionStorage.getItem('boilerplate_' + boilerplate_type)) { - populate_boilerplate(boilerplate_type, sessionStorage.getItem('boilerplate_' + boilerplate_type)); - return; - } - var callback = null; - if (options) { - if (typeof(options.callback) === 'function') { - callback = options.callback; - } - } - $.ajax({ - dataType:"json", - type:"get", - url: _url_root +"boilerplate_strings/index/" + boilerplate_type + ".json", - success:function(data, textStatus) { - if (data.success) { - var raw_data = data.data; - var select_html = get_select_tag_html(data.data, boilerplate_type); - if (Modernizr.sessionstorage) { - sessionStorage.setItem('boilerplate_' + boilerplate_type, select_html); - } - populate_boilerplate(boilerplate_type, select_html); - if (typeof(callback) === "function") { - callback.call($(this), data.data); - } - } else { - // console.log("failed to load boilerplate"); - } - }, - error: function(jqXHR, textStatus, errorThrown) { - // console.log("boilerplate error: " + textStatus + ": " + errorThrown); - } - }); - }; - - // TODO flatten all HTML in boilerplate text - var get_select_tag_html = function(boilerplate_data, boilerplate_type) { - var html = "<option value=''>--none--</option>\n"; - var qty_langs = 0; - var qty_strings = 0; - if (boilerplate_data.langs) { - for (var i=0; i< boilerplate_data.langs.length; i++) { - var lang = boilerplate_data.langs[i]; - var options = ""; - for (var j in boilerplate_data[lang]) { - if (boilerplate_data[lang].hasOwnProperty(j)) { - options += "<option>" + boilerplate_data[lang][j] + "</option>\n"; - qty_strings++; - } - } - if (boilerplate_data.langs.length > 1) { // really need pretty name for language - options = '<optgroup label="' + lang + '">\n' + options + '</optgroup>\n'; - } - html += options; - } - } - if (qty_strings === 0) { - html = ''; - } - return html; - }; - - // actually load the select tag - var populate_boilerplate = function(boilerplate_type, html) { - var $target = null; - switch(boilerplate_type) { - case 'hide-reason': $target = $hide_reasons; break; - case 'reply': $target = $boilerplate_replies; break; - } - if ($target) { - if (html) { - $target.show().find('select').html(html); - } else { - $target.hide(); - } - } - }; - - // revealed public methods: - return { - config: config, - setup_click_listener: setup_click_listener, - get_available_messages: get_available_messages, - request_lock: request_lock, - assign_fms_id: assign_fms_id, - reply: reply, - hide: hide, - show_info: show_info, - sign_out: sign_out, - populate_boilerplate_strings: populate_boilerplate_strings, - say_status: say_status, - mark_as_not_a_reply: mark_as_not_a_reply - }; -})(); diff --git a/web/cobrands/fixmybarangay/messages.js b/web/cobrands/fixmybarangay/messages.js deleted file mode 100644 index aebf35156..000000000 --- a/web/cobrands/fixmybarangay/messages.js +++ /dev/null @@ -1,26 +0,0 @@ -$(function(){ - - var mm = $('#message_manager'); - - $.getJSON('/cobrands/fixmybarangay/test-texts.json', function(data) { - var items = []; - $.each(data, function(k, v) { - var item = $('<input type="radio"/>').attr({ - 'id': 'mm_text_' + v.id, - 'name': 'mm_text', - 'value': v.text - }).wrap('<p/>').parent().html(); - var label = $('<label/>', { - 'class': 'inline', - 'for': 'mm_text_' + v.id - }).text(v.text).wrap('<p/>').parent().html(); - item = '<li><p>' + item + ' ' + label + '</p></li>'; - items.push(item); - }); - mm.html(items.join('')); - mm.find('input').click(function(){ - $('#form_detail').val( $('input[name=mm_text]:checked').val() ); - }); - }); - -}); diff --git a/web/cobrands/fixmybarangay/position_map.js b/web/cobrands/fixmybarangay/position_map.js deleted file mode 100644 index 753b5f854..000000000 --- a/web/cobrands/fixmybarangay/position_map.js +++ /dev/null @@ -1,22 +0,0 @@ -function position_map_box() { - var $html = $('html'); - if ($html.hasClass('ie6')) { - $('#map_box').prependTo('.wrapper').css({ - zIndex: 0, position: 'absolute', - top: 0, left: 0, right: 0, bottom: 0, - width: '100%', height: $(window).height(), - margin: 0 - }); - } else { - $('#map_box').prependTo('.wrapper').css({ - zIndex: 0, position: 'fixed', - top: 0, left: 0, right: 0, bottom: 0, - width: '100%', height: '100%', - margin: 0 - }); - } -} - -function map_fix() {} -var slide_wards_down = 0; - diff --git a/web/cobrands/fixmybarangay/test-texts.json b/web/cobrands/fixmybarangay/test-texts.json deleted file mode 100644 index 7acde1e32..000000000 --- a/web/cobrands/fixmybarangay/test-texts.json +++ /dev/null @@ -1,17 +0,0 @@ -[ - { - "id" : 1, - "number" : "032-9999999", - "text" : "Pothole on corner of G. De Vera and T. Padilla" - }, - { - "id" : 2, - "number" : "032-1234567", - "text" : "Broken street light on Rahmann Street" - }, - { - "id" : 3, - "number" : "+63 917 0000000", - "text" : "F. Manalo giant pothole" - } -] diff --git a/web/cobrands/zerotb/_colours.scss b/web/cobrands/zerotb/_colours.scss deleted file mode 100644 index a5eb83b71..000000000 --- a/web/cobrands/zerotb/_colours.scss +++ /dev/null @@ -1,24 +0,0 @@ -/* COLOURS */ - -$white: #ffffff; -$black: #000000; - -$primary: $black; -$primary_b: $black; -$primary_text: $white; - -$base_bg: $white; -$base_fg: #000; - -$map_nav_bg: $black; -$nav_fg: #ffffff; -$nav_fg_hover: #000; - -$col_click_map: $black; -$col_click_map_dark: darken($black, 10%); - -$col_fixed_label: #00BD08; -$col_fixed_label_dark: #4B8304; - -$button-color: #FF5308; -$alt-background: #f5f5f5; diff --git a/web/cobrands/zerotb/base.scss b/web/cobrands/zerotb/base.scss deleted file mode 100644 index db612094d..000000000 --- a/web/cobrands/zerotb/base.scss +++ /dev/null @@ -1,120 +0,0 @@ -@import "../sass/h5bp"; -@import "./_colours"; -@import "../sass/mixins"; -@import "compass"; - -@import url(http://fonts.googleapis.com/css?family=Lato:300,700); - -$body-font: 'Lato', sans-serif !default; -$meta-font: 'Lato', sans-serif !default; -$heading-font: 'Lato', sans-serif !default; - -@import "../sass/base"; - -body { - font-weight: 300; -} - -input { - background-color: $alt-background; -} - -#front-main { - h2 { - font-weight: 300; - } - - #postcodeForm { - div { - border: 0px; - background: $primary_b; - select#clinic, - input#pc { - background-color: $alt-background; - } - select#clinic { - border: 0; - border-radius: 0px; - display: table-cell; - line-height: 1.5em; - padding: 0.25em 2%; - } - .select2-container, - select#clinic, - input#pc { - border: 0px; - border-radius: 0px; - box-shadow: none; - width: 80%; - } - input#sub { - background-color: $button-color; - border: 1px solid $alt-background; - border-radius: 5px; - color: white; - margin-left: 5px; - } - input#show_report { - width: 14%; - margin-left: 5px; - } - .select2-container { - display: inline-block; - text-align: left; - a { - line-height: 1.5em; - padding: 0.25em 2%; - } - } - .select2-display-none { - display: none; - } - } - } -} - -#site-logo { - background: none; - text-indent: 0px; - text-transform: uppercase; - width: auto; - margin-right: 80px; - @media( min-width: 350px ) { - margin-top: 0.5em; - } - a { - color: white; - &:hover { - text-decoration: none; - } - } - p { - font-weight: 300; - margin-bottom: 0em; - } - .orange { - color: $button-color; - font-weight: bold; - } - #brought-to-you { - display: none; - } -} - -button.green-btn, -input.green-btn, -.green-btn { - background: none; - background-color: $button-color; - border: 1px solid $alt-background; - border-radius: 5px; - color: white; -} - -button.green-btn:hover, -input.green-btn:hover, -.green-btn:hover { - background: none; - background-color: darken( $button-color, 10% ); - border: 1px solid $alt-background; -} diff --git a/web/cobrands/zerotb/config.rb b/web/cobrands/zerotb/config.rb deleted file mode 100644 index cab97b18f..000000000 --- a/web/cobrands/zerotb/config.rb +++ /dev/null @@ -1,25 +0,0 @@ -# Require any additional compass plugins here. - -# Set this to the root of your project when deployed: -http_path = "/" -css_dir = "" -sass_dir = "" -images_dir = "" -javascripts_dir = "" - -# You can select your preferred output style here (can be overridden via the command line): -# output_style = :expanded or :nested or :compact or :compressed - -# To enable relative paths to assets via compass helper functions. Uncomment: -# relative_assets = true - -# To disable debugging comments that display the original location of your selectors. Uncomment: -# line_comments = false - -# If you prefer the indented syntax, you might want to regenerate this -# project again passing --syntax sass, or you can uncomment this: -# preferred_syntax = :sass -# and then run: -# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass - -line_comments = false # by Compass.app diff --git a/web/cobrands/zerotb/images/pin-clinic-big.png b/web/cobrands/zerotb/images/pin-clinic-big.png Binary files differdeleted file mode 100644 index c1e359828..000000000 --- a/web/cobrands/zerotb/images/pin-clinic-big.png +++ /dev/null diff --git a/web/cobrands/zerotb/images/pin-clinic.png b/web/cobrands/zerotb/images/pin-clinic.png Binary files differdeleted file mode 100644 index 5cc0828fd..000000000 --- a/web/cobrands/zerotb/images/pin-clinic.png +++ /dev/null diff --git a/web/cobrands/zerotb/images/pin-shadow-big.png b/web/cobrands/zerotb/images/pin-shadow-big.png Binary files differdeleted file mode 100644 index 113184b94..000000000 --- a/web/cobrands/zerotb/images/pin-shadow-big.png +++ /dev/null diff --git a/web/cobrands/zerotb/images/pin-shadow.png b/web/cobrands/zerotb/images/pin-shadow.png Binary files differdeleted file mode 100644 index 8b470592a..000000000 --- a/web/cobrands/zerotb/images/pin-shadow.png +++ /dev/null diff --git a/web/cobrands/zerotb/layout.scss b/web/cobrands/zerotb/layout.scss deleted file mode 100644 index c8afa3abc..000000000 --- a/web/cobrands/zerotb/layout.scss +++ /dev/null @@ -1,105 +0,0 @@ -@import "_colours"; -@import "../sass/layout"; - -body { - &.frontpage { - .nav-wrapper-2 { - background-color: $primary; - color: $primary_text; - height: auto; - } - - #site-header { - background-color: $base_bg; - } - - #site-logo { - background: none; - color: black; - width: auto; - a { - color: black; - } - p { - font-size: 2em; - font-weight: 300; - } - #brought-to-you { - display: block; - font-size: 0.75em; - } - } - } - &.mappage { - .nav-menu--main { - a, a.report-a-problem-btn, span { - padding: 0.25em; - margin: 0.5em; - } - } - .nav-wrapper-2 { - min-height: 4em; - } - } -} - -.nav-wrapper { - .nav-wrapper-2 { - border: none; - min-height: 0; - } -} - -.nav-menu--mysoc a { - color: $primary_text; -} -.nav-menu--main span { - color: $primary_text; -} - -#site-header { - background: $primary; - height: auto; -} - -.container { - padding: 0em 1em; -} - -#front-main { - #front-main-container { - max-width: 40em; - h2 { - text-align: left; - } - } - #postcodeForm { - div { - width: 30em; - .select2-container, - select#clinic, - input#pc { - max-width: none; - width: 27em; - } - input#show_report { - display: block; - float: right; - width: 3em; - } - } - } - - .select2-container { - a { - color: #444; - text-align: left; - text-decoration: none; - } - } -} - -.content { - background-color: $alt-background; - box-shadow: none; -} diff --git a/web/css/_main-import.scss b/web/css/_main-import.scss deleted file mode 100644 index 305a9e43e..000000000 --- a/web/css/_main-import.scss +++ /dev/null @@ -1,279 +0,0 @@ -// Generics - -/* Thanks to normalize.css - * 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units - * http://clagnut.com/blog/348/#c790 - * 3. Prevents iOS text size adjust after orientation change, without disabling user zoom - * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ - */ -html { - font-size: 100%; /* 1 */ - -webkit-text-size-adjust: 100%; /* 3 */ - -ms-text-size-adjust: 100%; /* 3 */ -} - -body { - font-family: "Gill Sans", "Gill Sans MT", Helvetica, Arial, sans-serif; - margin: 0; - padding: 0; - // color: #a9aeb0; -} - -h1 { - margin: 0; - font-size: 175%; -} -h2 { - font-size: 140%; -} - -select, input, textarea { - font-size: 99%; - max-width: 95%; -} - -#mysociety { - - a.unsuitable-report { - font-size: small; - } - - blockquote { - border-left: solid 4px $header_colour; - } - - .a { - color: #000000; - background-color: $header_back_lighter; - } - - #postcodeForm { - background-color: $header_back; - } - - #front_stats div { - background-color: $header_back; - } - -} - -// Site layout - -#header { - font-size: 200%; - font-weight: bold; - border-bottom: solid 2px $header_colour; - margin: 0; - padding: 0.15em 0.5em; - background-color: $header_back; - color: $header_colour; - - a:link, a:visited { - color: $header_colour; - background-color: $header_back; - text-decoration: none; - } - a:active, a:hover { - text-decoration: underline; - } -} - -#my { - color: $header_darker; - background-color: $header_back; -} - -#mysociety { - width: 100%; /* Must specify a width or IE goes crazy wrong! */ - position: relative; - margin: 0 auto; - max-width: 60em; - overflow: auto; -} - -/* Can't put the margin in #mysociety because of above IE craziness */ -#wrapper { - margin: 1em 2em; -} - -#meta { - list-style-type: none; - margin: 30px 0 0.5em 1em; /* (was 0.25em 0 0 1em) forced to drop below promo (fix before the freeze) image */ - padding: 0; - font-size: 0.875em; - li { - display: inline; - margin: 0; - padding: 0 0 0 0.25em; - border-left: solid 1px $header_colour; - } - li:first-child { - border-left: none; - } -} - -.v { - display: none; -} - -#navigation { - position: absolute; - top: 1em; - right: 1em; - padding: 0; - margin: 0; - list-style-type: none; - - li { - display: inline; - padding: 0; - margin: 0; - } - - a { - display: -moz-inline-box; - display: inline-block; - padding: 0.4em 1em; - } - a:link, a:visited { - color: $header_colour; - } - a:hover, a:active { - background-color: $header_colour; - color: $header_back; - -moz-border-radius-topleft: 0.5em; - -webkit-border-top-left-radius: 0.5em; - border-radius-top-left: 0.5em; - -moz-border-radius-topright: 0.5em; - -webkit-border-top-right-radius: 0.5em; - border-radius-top-right: 0.5em; - } -} - -#nav_new a { - background-image: url("/i/new.png"); - background-repeat: no-repeat; - background-position: 100% 0; -} - -#promo { - position: absolute; - top: 3.3em; - left: 10px; - a { - display: block; - padding:0; - border:2px solid white; - img { - margin:0px; - } - } - a:hover { - border:2px dotted #70CFE3; - } -} - -.promo-background { - margin-top:-4px; - background-image:url(/i/promo-icicles.gif); - background-repeat:repeat-x; - background-position:top left; - padding-top:3em; -} - -#logo { - border: none; - position: absolute; - top: 3.3em; - right: 10px; -} - -.ie6 #logo { - display: none; -} - -.ie6 #logoie { - width: 133px; - height: 26px; - filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/i/mysociety-dark.png',sizingMethod='scale'); - position: absolute; - top: 4em; - right: 10px; - cursor: pointer; -} - -#footer { - clear: both; - text-align: center; - border-top: solid 2px #ccc; - width: 50%; - margin: 1em auto 0; - padding: 0; - color: #333333; - - .l, .r { - margin-top: 0; - text-align: left; - width: 45%; - } - .l { - float: left; - } - .r { - float: right; - } -} - -@media all and (max-width: 50em) { - #logo { - display: none; - } - #promo { - position: static; - width: 116px; - top: none; - text-align: center; - margin: 0.25em auto; - display:block; - } - .promo-background img#logo { - border:2px solid #fff; - background-color: #fff; - } - #header { - font-size: 150%; - } - h1 { - font-size: 140%; - } - h2 { - font-size: 130%; - } - #navigation { - position: static; - border-top: solid 2px $header_colour; - border-bottom: solid 2px $header_colour; - margin: 1em 0; - padding: 0.15em 0.5em; - text-align: center; - background-color: $header_back; - color: $header_colour; - - a:hover, a:active { - background-color: $header_colour; - color: $header_back; - -moz-border-radius: 0.5em; - -webkit-border-radius: 0.5em; - border-radius: 0.5em; - } - } - #footer { - width: auto; - padding: 0 1em; - border-top: none; - } - #wrapper { - margin: 0em 1em; - } -} - diff --git a/web/css/cache-eha2.css b/web/css/cache-eha2.css deleted file mode 100644 index 2e98dc574..000000000 --- a/web/css/cache-eha2.css +++ /dev/null @@ -1,493 +0,0 @@ -body{
- text-align:center;
- background-color: #FFFFFF;
-}
-#header {
-text-align:left;
- margin: 0px;
- width: 760px;
-}
-#main {
-text-align:left;
- margin: 0px;
- width: 760px;
-}
-#footer {
-text-align:left;
- width: 760px;
- clear: both;
- background-color: #80AE7D;
- height: 110px;
- margin-top: 5px;
- margin-bottom: 5px;
-}
-#logo {
- margin: 0px;
- float: left;
- width: 400px;
-}
-#search {
- margin: 0px;
- float: right;
- width: 345px;
- height: 70px;
- background-color: #80AE7D;
- padding-top: 10px;
- padding-right: 15px;
- padding-bottom: 10px;
-}
-#bottombox ul {
- list-style-type: none;
- padding: 0px;
- margin: 0px;
-}
-#bottombox li {
- width: 170px;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- background-color: #B1BECF;
- margin-bottom: 1px;
-}
-
-#smallnav {
- width: 750px;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- text-align: right;
- font-weight: 400;
- color: #354664;
- padding-right: 10px;
- padding-bottom: 10px;
- padding-top: 10px;
-}
-#topbox ul {
- list-style-type: none;
- margin: 0px;
- padding: 0px;
-}
-#topbox li {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- width: 170px;
- background-color: #b1becf;
- margin-bottom: 1px;
-}
-#topbox a {
- text-decoration: none;
- color: #30517A;
- display: block;
-}
-#bottombox a:hover {
- background-color: #FFFFFF;
- width: 170px;
-}
-#topbox a:hover {
- background-color: #FFFFFF;
- width: 170px;
-}
-
-#bottombox a {
- color: #30517A;
- text-decoration: none;
- display: block;
-}
-
-
-
-#left {
- float: left;
- width: 120px;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- list-style: none;
-}
-#middle p {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- width: 420px;
- color: #30517A;
-}
-#pressnav {
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- border-top-style: solid;
- border-bottom-style: solid;
- border-top-color: #CCCCCC;
- border-right-color: #CCCCCC;
- border-bottom-color: #CCCCCC;
- border-left-color: #CCCCCC;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- padding: 3px;
-}
-#pressreleases {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- color: #30517A;
-}
-#pressreleases p {
- padding-bottom: 10px;
- background-color: #EBEEF3;
- padding-top: 10px;
- border: 1px dashed #CCCCCC;
-}
-#bulletin p {
- padding-bottom: 10px;
- background-color: #EBEEF3;
- padding-top: 10px;
- border: 1px dashed #CCCCCC;
-}
-
-#events p {
- border: 1px dashed #CCCCCC;
- padding-top: 10px;
- padding-bottom: 10px;
- background-color: #EBEEF3;
-}
-
-
-
-
-
-#right {
- width: 160px;
- float: right;
-}
-#left ul {
- list-style-type: none;
- padding: 0px;
- margin: 0px;
-}
-#left ol {
- list-style-type: none;
- display: inline;
- background-color: #B1BECF;
- width: 90px;
- margin-bottom: 1px;
-}
-#left ol a {
- background-color: #DCDCED;
- color: #30517A;
-}
-#left ol a:hover {
- background-color: #FFFFFF;
-}
-
-
-#left li {
- margin-bottom: 1px;
- display: block;
-}
-#smallnav a {
- text-decoration: none;
- color: #30517A;
-}
-#smallnav a:hover {
- background-color: #B1BECF;
-}
-
-#left a {
- display: block;
- width: 120px;
- font-weight: bold;
- padding: 10px;
- text-decoration: none;
- background-color: #9999CC;
- color: #FFFFFF;
-}
-#address2 a {
- color: #FFFFFF;
-}
-#address1 a {
- color: #FFFFFF;
-}
-
-
-#left a:hover {
- color: #30517A;
- background-color: #FFFFFF;
-}
-
-
-
-#middle {
- margin: 0 250px 0 155px:
- clear: right;
- width: 410px;
- float: left;
- left: 153px;
- margin: 0px;
- padding-right: 10px;
- padding-bottom: 10px;
- padding-left: 10px;
- top: 135px;
- background-color: #FFFFFF;
-}
-#address1 {
- float: left;
- width: 180px;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- margin-bottom: 20px;
- padding: 20px;
- color: #FFFFFF;
-}
-#address2 {
- float: left;
- width: 180px;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- margin-bottom: 20px;
- padding: 20px;
- color: #FFFFFF;
-}
-#toptitle {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-weight: bold;
- color: #FFFFFF;
- font-size: small;
- width: 160px;
- background-color: #30517A;
- padding: 5px;
-}
-#bottomtitle {
- width: 160px;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- font-weight: bold;
- background-color: #30517A;
- color: #FFFFFF;
- padding: 5px;
-}
-#middle h1 {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: large;
- width: 420px;
- background-color: #9999CC;
- color: #FFFFFF;
- padding: 3px;
- font-weight: 500;
-}
-#middle h2 {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- font-weight: bold;
- background-color: #B1BECF;
- display: block;
- color: #30517A;
-}
-#middle h3 {
- text-decoration: underline;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- font-weight: bold;
- color: #30517A;
-}
-
-#middle a:hover {
- background-color: #B1BECF;
-}
-#middle a {
- color: #30517A;
- text-decoration: underline;
-}
-#eventsnav {
- border-top-width: 1px;
- border-bottom-width: 1px;
- border-top-style: solid;
- border-bottom-style: solid;
- border-top-color: #CCCCCC;
- border-bottom-color: #CCCCCC;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- padding: 3px;
- text-align: center;
-}
-#lwoanav {
- padding-top: 5px;
- padding-bottom: 5px;
- border-top-width: 1px;
- border-bottom-width: 1px;
- border-top-style: solid;
- border-bottom-style: solid;
- border-top-color: #CCCCCC;
- border-bottom-color: #CCCCCC;
- text-align: center;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
-}
-#lwoa {
- border: 1px dotted #CCCCCC;
- width: 420px;
-}
-#nwoanav {
- padding-top: 5px;
- padding-bottom: 5px;
- border-top-width: 1px;
- border-bottom-width: 1px;
- border-top-style: solid;
- border-bottom-style: solid;
- border-top-color: #CCCCCC;
- border-bottom-color: #CCCCCC;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- text-align: center;
-}
-#nwoa {
- width: 420px;
- border: 1px dotted #CCCCCC;
-}
-#pubsubleft {
- float: left;
- width: 200px;
- border: 1px solid #CCCCCC;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- color: #30517a;
- font-size: x-small;
-}
-#pubsubright {
- float: right;
- width: 200px;
- border: 1px solid #CCCCCC;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- color: #30517a;
-}
-#pubtypeleft {
- float: left;
- width: 200px;
- border: 1px solid #CCCCCC;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- color: #30517a;
-}
-#pubtyperight {
- float: right;
- width: 200px;
- border: 1px solid #CCCCCC;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- color: #30517a;
-}
-#periodnavleft {
- margin: 0px;
- float: left;
- width: 200px;
- border: 1px solid #CCCCCC;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- color: #30517A;
-}
-#periodnavright {
- margin: 0px;
- float: right;
- width: 200px;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- color: #30517A;
- border: 1px dashed #CCCCCC;
-}
-#policynav {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- color: #30517a;
- margin: 0px;
- float: left;
- width: 400px;
- border: 1px solid #CCCCCC;
-}
-#casenav {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- color: #30517a;
-}
-#case p {
- padding-bottom: 10px;
- background-color: #EBEEF3;
- padding-top: 10px;
- border: 1px dashed #CCCCCC;
-}
-#grants p {
- padding-bottom: 10px;
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- color: #30517a;
- background-color: #EBEEF3;
- padding-top: 10px;
- border: 1px dashed #CCCCCC;
-}
-#listing {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- color: #30517a;
-}
-#suppliernav {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- margin: 0px;
- width: 425px;
- border: 1px solid #CCCCCC;
- text-align: center;
-}
-#publist {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- margin: 0px;
- width: 400px;
-}
-#publist p {
- padding-bottom: 10px;
- background-color: #EBEEF3;
- padding-top: 10px;
- border: 1px dashed #CCCCCC;
-}
-#contactnav {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- margin: 0px;
- width: 425px;
- border: 1px solid #CCCCCC;
- text-align: center;
-}
-#statsnav {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: small;
- color: #30517a;
- margin: 0px;
- float: left;
- width: 425px;
-}
-#buyingnav {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- color: #30517a;
- margin: 0px;
- float: left;
- width: 400px;
- border: 1px solid #CCCCCC;
-}
-#ownernav {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- color: #30517a;
- margin: 0px;
- float: left;
- width: 400px;
- border: 1px solid #CCCCCC;
-}
-#campnav {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- color: #30517a;
- margin: 0px;
- float: left;
- width: 400px;
- border: 1px solid #CCCCCC;
-}
-#sitenav {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: x-small;
- color: #30517a;
-}
diff --git a/web/css/core.scss b/web/css/core.scss deleted file mode 100644 index 897b2d095..000000000 --- a/web/css/core.scss +++ /dev/null @@ -1,751 +0,0 @@ -$map_width: 500px; - -// Generics - -#mysociety { - - blockquote { - border-left: solid 4px #666666; - padding-left: 0.5em; - h2, p { - margin: 0; - } - } - - dt { - font-weight: bold; - margin-top: 0.5em; - } - - .gone { - color: #666666; - background-color: #cccccc; - } - - p.dev-site-notice, p.error { - text-align: center; - color: #cc0000; - font-size: larger; - } - - ul { - padding: 0 0 0 1.5em; - margin: 0; - } - - ul.error { - color: #cc0000; - background-color: #ffeeee; - padding-right: 4px; - text-align: left; - font-size: larger; - } - - div.form-error { - color: #cc0000; - margin: 5px 1em 5px 1em; - padding: 2px 5px 2px 5px; - text-align: left; - } - - div.label-valid { - background-color: white; - } - - div.label-valid-hidden { - display: none; - visibility: hidden; - height: 0px; - width: 0px; - margin: 0px; - padding: 0px; - } - - div.form-field { - clear: both; - } - - // Front page - - p#expl { - text-align: center; - font-size: 150%; - margin: 0; - } - - p#expl small { - display: block; - } - - #postcodeForm { - display: table; /* Full width in IE6 and IE7 */ - text-align: center; - font-size: 150%; - margin: 1em auto; - padding: 1em; - -moz-border-radius: 1em; - -webkit-border-radius: 1em; - border-radius: 1em; - -moz-box-shadow: 2px 2px 4px #999; - -webkit-box-shadow: 2px 2px 4px #999; - box-shadow: 2px 2px 4px #999; - - label { - float: none; - padding-right: 0; - margin-top: 0; - } - - #sub { - font-size: 83%; - } - } - - #geolocate_link { - display: block; - border: none; - font-size: 70%; - margin: 2px 0 0 0; - text-align: right; - } - - #front_intro { - float: left; - width: 48%; - - p { - clear: both; - margin-top: 0; - } - } - - #front_stats { - margin: 0 auto; - display: table; /* IE6 is set to floats below */ - border-spacing: 2em 1em; - } - - #front_stats div { - text-align: center; - width: 5.5em; - -moz-border-radius: 0.5em; - -webkit-border-radius: 0.5em; - border-radius: 0.5em; - display: table-cell; - - big { - font-size: 150%; - display: block; - } - } - - #front_recent { - float: right; - width: 48%; - margin-bottom: 1em; - } - #front_recent img, #alert_recent img { - margin-right: 0.25em; - margin-bottom: 0.25em; - } - #front_recent > h2:first-child, #front_intro > h2:first-child { - margin-top: 0; - } - - #front_photos { - text-align: center; - } - - // Forms - - form { - margin: 0; - } - - label { - float: left; - text-align: right; - padding-right: 0.5em; - width: 6em; - } - - fieldset, .fieldset { - border: none; - margin: 0.5em; - div { - margin-top: 2px; - clear: left; - } - } - - legend { - display: none; - } - - .fieldset div.checkbox, #problem_submit { - padding-left: 5.5em; - } - .fieldset div.checkbox label, label.n { - float: none; - text-align: left; - padding-right: 0; - width: auto; - cursor: pointer; - cursor: hand; - } - - /* Lots of defaults to override small screen CSS */ - #questionnaire label, #alerts label { - float: none; - margin-top: 0; - display: inline; - } - - .confirmed { - background-color: #ccffcc; - border: solid 2px #009900; - padding: 5px; - text-align: center; - } - - #form_sign_in_yes { - float: left; - width: 47%; - padding-right: 1%; - border-right: solid 1px #999999; - margin-bottom: 1em; - } - - #form_sign_in_no, .fieldset #form_sign_in_no { - float: right; - width: 47%; - padding-left: 1%; - clear: none; - margin-bottom: 1em; - } - - #category_meta { - margin-bottom: 30px; - } - - #category_meta label { - width: 10em; - } - - // Map - - #map_box { - float: right; - width: $map_width + 2px; - position: relative; - padding-left: 20px; - background-color: #ffffff; - } - - p#copyright { - float: right; - text-align: right; - margin: 0 0 1em 0; - font-size: 78%; - } - - #map { - border: solid 1px #666666; - width: $map_width; // Twice a tile width - height: $map_width; - overflow: hidden; - position: relative; - background-color: #f1f1f1; - } - - /* Drag is only present in noscript form */ - #drag { - input, img { - position: absolute; - border: none; - } - input { - cursor: crosshair; - background-color: #cccccc; - } - img { - cursor: move; - } - img.pin { - z-index: 100; - background-color: inherit; - } - a img.pin { - cursor: pointer; - cursor: hand; - } - } - - form#mapForm #map { - cursor: pointer; - } - - form#mapForm .olTileImage { - cursor: crosshair; - } - - .banner { - margin: 0 $map_width + 30px 1em 0; - padding: 5px; - text-align: center; - position: relative; - } - - #text_map { - padding-left: 0.5em; - text-align: left; - margin-top: 0; - font-size: 110%; - background-color: #eeeeee; - -moz-border-radius-topleft: 1em; - -moz-border-radius-bottomleft: 1em; - -webkit-border-top-left-radius: 1em; - -webkit-border-bottom-left-radius: 1em; - border-top-left-radius: 1em; - border-bottom-left-radius: 1em; - } - #text_map_arrow { - display: block; - position: absolute; - top: 0; - right: -28px; - width: 0; - height: 0; - line-height: 0; - font-size: 0; - border-style: solid; - border-width: 26px 14px 26px 14px; - border-color: #fff #fff #fff #eee; - } - - #text_no_map { - margin-top: 0; - // background-color: #ffeecc; - // padding: 4px; - } - - #sub_map_links { - float: right; - clear: right; - margin-top: 0; - } - - // Problem pages - - #fixed { - background-color: #ccffcc; - border: solid 2px #009900; - } - - #unknown { - background-color: #ffcccc; - border: solid 2px #990000; - } - - #closed { - background-color: #ccccff; - border: solid 2px #000099; - } - - #progress { - background-color: #ffffcc; - border: solid 2px #999900; - } - - #updates { - div { - padding: 0 0 0.5em; - margin: 0 0 0.25em; - border-bottom: dotted 1px #5e552b; - - .problem-update, .update-text { - padding: 0; - margin: 0; - border-bottom: 0; - } - } - - p { - margin: 0; - } - } - - #nearby_lists h2 { - margin-top: 1em; - margin-bottom: 0; - } - - #nearby_lists li small { - color: #666666; - } - - #alert_links { - float: right; - } - #alert_links_area { - padding-left: 0.5em; - margin: 0; - color: #666; - font-size: smaller; - } - #rss_alert { - text-decoration: none; - span { - text-decoration: underline; - } - } - #email_alert { - } - #email_alert_box { - display:none; - position: absolute; - padding: 3px; - font-size:83%; - border:solid 1px #7399C3; - background-color: #eeeeff; - color: #000000; - } - #email_alert_box p { - margin: 0; - } - - .council_sent_info { - font-size: smaller; - } - - .update-img { - text-align: center; - } - .update-img span { - display: none; - } - #updates .update-img { - text-align: left; - } - - // RSS feed XSL - - #rss_items { - width:62%; - float:left; - } - #rss_rhs { - border-left:1px dashed #999; - width:36%; - float:right; - padding: 0 0 0 0.5em; - margin: 0 0 1em 0.5em; - } - #rss_box { - padding:10px; - border:1px solid #999999; - } - - // Alerts - #rss_feed { - list-style-type: none; - margin-bottom: 2em; - } - #rss_feed li { - margin-bottom: 1em; - } - #alert_or { - font-style: italic; - font-size: 125%; - margin: 0; - } - #rss_list { - float: left; - width: 47%; - } - #rss_list ul { - list-style-type: none; - } - #rss_buttons { - float: right; - width: 35%; - text-align: center; - margin-bottom: 2em; - } - #rss_local { - margin-left: 1.5em; - margin-bottom: 0; - } - #rss_local_alt { - margin: 0 0 2em 4em; - } - - #alert_photos { - text-align: center; - float: right; - width: 150px; - margin-left: 0.5em; - } - #alert_photos h2 { - font-size: 100%; - } - #alert_photos img { - margin-bottom: 0.25em; - } - - // Report page - - #col_problems, #col_fixed { - float: left; - width: 48%; - margin-right: 1em; - } - - // Contact page - .contact-details { - font-size: 80%; - margin-top: 2em; - } - - // File upload - // .progressContainer { - // margin: 5px; - // padding: 4px; - // width: 357px; - // border: solid 1px #E8E8E8; - // background-color: #F7F7F7; - // overflow: hidden; - // } - // .red { border: solid 1px #B50000; background-color: #FFEBEB; } - // .green { border: solid 1px #DDF0DD; background-color: #EBFFEB; } - // .blue { border: solid 1px #CEE2F2; background-color: #F0F5FF; } - - // .progressName { - // font-size: 8pt; - // font-weight: bold; - // color: #555555; - // width: 323px; - // height: 14px; - // text-align: left; - // white-space: nowrap; - // overflow: hidden; - // } - // .progressBarInProgress, .progressBarComplete, .progressBarError { - // font-size: 0px; - // width: 0%; - // height: 2px; - // background-color: blue; - // margin-top: 2px; - // } - // .progressBarComplete { - // width: 100%; - // background-color: green; - // visibility: hidden; - // } - // .progressBarError { - // width: 100%; - // background-color: red; - // visibility: hidden; - // } - // .progressBarStatus { - // margin-top: 2px; - // width: 337px; - // font-size: 7pt; - // font-family: Verdana; - // text-align: left; - // white-space: nowrap; - // } - -} - -.olControlAttribution { - bottom: 3px !important; - left: 3px; - color: #222222; -} -.olControlPermalink { - bottom: 3px !important; - right: 3px; -} - -.ie6, .ie7 { - #mysociety { - #front_stats div { - float: left; - margin: 0 1em 1em; - } - } -} - -// Printing, SCSS doesn't handle @media nesting - -@media print { - #mysociety { - #map_box { float: none; margin: 0 auto; } - #mysociety { max-width: none; } - #side { margin-right: 0; } - } -} - -@media all and (max-width: 50em) { - #mysociety { - p#expl { - font-size: 120%; - } - - p#expl small { - display: inline; - } - - #postcodeForm { - font-size: 100%; - span { - display: block; - font-size: 150%; - } - #sub { - font-size: 100%; - } - } - - #geolocate_link { - font-size: 100%; - } - - #front_intro { - float: none; - width: auto; - } - #front_recent { - margin-top: 1em; - float: none; - width: auto; - clear: both; - } - #front_photos { - white-space: nowrap; - overflow: hidden; - } - #front_stats { - border-spacing: 0.5em 1em; - } - - #form_sign_in_yes { - float: none; - width: auto; - padding-right: 0; - border-right: none; - margin-bottom: 1em; - } - - #form_sign_in_no, .fieldset #form_sign_in_no { - float: none; - width: auto; - padding-left: 0; - clear: none; - margin-bottom: 1em; - } - - fieldset, .fieldset { - margin: 1em; - } - - label { - margin-top: 1em; - display: block; - float: none; - text-align: left; - padding-right: 0; - width: auto; - } - .fieldset div.checkbox, #problem_submit { - padding-left: 0; - } - .fieldset div.checkbox label, label.n { - display: inline; - } - - #rss_list { - float: none; - width: auto; - } - #rss_buttons { - float: none; - width: auto; - text-align: left; - } - } -} - -@media all and (max-width: 750px) { - $map_width: 365px; - #mysociety { - #map_box { - padding-left: 10px; - width: $map_width + 2px; - } - #map { - width: $map_width; - height: $map_width; - } - .banner { - margin-right: $map_width + 20px; - } - #text_map_arrow { - right: -18px; - border-width: 16px 9px; - } - } -} - -@media all and (max-width: 580px) { - $map_width: 235px; - #mysociety { - #map_box { - width: $map_width + 2px; - } - #map { - width: $map_width; - height: $map_width; - } - .banner { - margin-right: $map_width + 20px; - } - } -} - -@media all and (max-width: 320px) { - #mysociety { - #map_box { - padding-left: 0; - float: none; - width: 100%; - } - #map { - width: 99%; - } - - .banner { - margin-right: 0; - clear: both; - margin-top: 1em; - } - #text_map { - padding: 0.25em 0.5em; - font-size: 100%; - -moz-border-radius-topleft: 0; - -moz-border-radius-bottomleft: 1em; - -moz-border-radius-bottomright: 1em; - -webkit-border-top-left-radius: 0; - -webkit-border-bottom-left-radius: 1em; - -webkit-border-bottom-right-radius: 1em; - border-top-left-radius: 0; - border-bottom-left-radius: 1em; - border-bottom-right-radius: 1em; - } - #text_map_arrow { - display: none; - } - } -} - diff --git a/web/css/main.scss b/web/css/main.scss deleted file mode 100644 index 1106b8a78..000000000 --- a/web/css/main.scss +++ /dev/null @@ -1,14 +0,0 @@ -// Generics - -$header_back: #e3d595; -$header_back_lighter: #f3e5a5; -$header_colour: #5e552b; -$header_darker: #4e451b; - -a { - &:link { color: #0000ff; } - &:visited { color: #000099; } - &:hover, &:active { color: #ff0000; } -} - -@import "main-import"; diff --git a/web/js/fixmystreet-admin.js b/web/js/fixmystreet-admin.js index 5e0d873c5..1b6624b9b 100644 --- a/web/js/fixmystreet-admin.js +++ b/web/js/fixmystreet-admin.js @@ -9,7 +9,7 @@ $(function(){ var show_open311 = false; if ($('#endpoint').val()) { show_open311 = true; // always show the form if there is an endpoint value - } else if (send_method && !send_method.match(/^(email|emptyhomes|noop|refused)$/i)) { + } else if (send_method && !send_method.match(/^(email|noop|refused)$/i)) { show_open311 = true; } if (show_open311) { diff --git a/web/js/fixmystreet-old-box.js b/web/js/fixmystreet-old-box.js deleted file mode 100644 index 72eeafb4d..000000000 --- a/web/js/fixmystreet-old-box.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * fixmystreet-old-box.js - * Create the 'email me updates' pop up box on old-style report display pages. - */ - -$(function(){ - - if (!$('#email_alert_box').length) { - return; - } - - var timer; - function email_alert_close() { - $('#email_alert_box').hide('fast'); - } - - $('#email_alert').click(function(e) { - e.preventDefault(); - if ($('#email_alert_box').is(':visible')) { - email_alert_close(); - } else { - var pos = $(this).position(); - $('#email_alert_box').css( { 'left': ( pos.left - 20 ) + 'px', 'top': ( pos.top + 20 ) + 'px' } ); - $('#email_alert_box').show('fast'); - $('#alert_rznvy').focus(); - } - }).hover(function() { - window.clearTimeout(timer); - }, function() { - timer = window.setTimeout(email_alert_close, 2000); - }); - - $('#email_alert_box').hover(function() { - window.clearTimeout(timer); - }, function() { - timer = window.setTimeout(email_alert_close, 2000); - }); - -}); |