aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md4
-rwxr-xr-xbin/open311-populate-service-list4
-rwxr-xr-xbin/send-comments2
-rw-r--r--locale/de_CH.UTF-8/LC_MESSAGES/FixMyStreet.po9
-rw-r--r--perllib/FixMyStreet/App.pm1
-rw-r--r--perllib/FixMyStreet/App/Controller/Around.pm4
-rw-r--r--perllib/FixMyStreet/App/Controller/Open311.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Photo.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm4
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Rss.pm7
-rw-r--r--perllib/FixMyStreet/App/Engine.pm68
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm3
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm105
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm20
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm59
-rw-r--r--perllib/FixMyStreet/Roles/PhotoSet.pm34
-rw-r--r--perllib/FixMyStreet/Script/Reports.pm2
-rw-r--r--perllib/FixMyStreet/SendReport.pm6
-rw-r--r--perllib/Open311/PopulateServiceList.pm3
-rw-r--r--t/app/controller/rss.t60
-rw-r--r--t/app/engine.t9
-rw-r--r--t/cobrand/bromley.t2
-rw-r--r--t/cobrand/zurich.t34
-rw-r--r--templates/email/fixmystreet.com/update-confirm-donotsend.txt2
-rw-r--r--templates/email/zurich/problem-confirm.txt2
-rw-r--r--templates/web/base/admin/report_edit.html4
-rw-r--r--templates/web/base/around/on_map_list_items.html6
-rw-r--r--templates/web/base/open311/index.html4
-rw-r--r--templates/web/base/report/photo.html14
-rw-r--r--templates/web/borsetshire/front/footer-marketing.html4
-rw-r--r--templates/web/borsetshire/header_site.html11
-rw-r--r--templates/web/bromley/front/footer-marketing.html2
-rw-r--r--templates/web/eastherts/footer.html2
-rw-r--r--templates/web/fixmystreet-uk-councils/report/updates-sidebar-notes.html6
-rw-r--r--templates/web/fixmystreet.com/about/council-dashboard.html6
-rwxr-xr-xtemplates/web/fixmystreet.com/about/faq-en-gb.html6
-rw-r--r--templates/web/fixmystreet.com/contact/blurb.html2
-rw-r--r--templates/web/fixmystreet.com/footer_extra.html2
-rw-r--r--templates/web/fixmystreet.com/front/footer-marketing.html4
-rw-r--r--templates/web/fixmystreet.com/report/_report_meta_info.html2
-rw-r--r--templates/web/fixmystreet.com/report/updates-sidebar-notes.html2
-rw-r--r--templates/web/fixmystreet.com/reports/summary.html4
-rw-r--r--templates/web/greenwich/front/footer-marketing.html2
-rw-r--r--templates/web/hart/footer.html2
-rw-r--r--templates/web/oxfordshire/footer.html2
-rw-r--r--templates/web/oxfordshire/header.html6
-rw-r--r--templates/web/oxfordshire/tracking_code.html17
-rw-r--r--templates/web/stevenage/footer.html2
-rw-r--r--templates/web/warwickshire/around/intro.html2
-rw-r--r--templates/web/warwickshire/footer.html2
-rw-r--r--templates/web/warwickshire/warwickshire_masthead.html72
-rw-r--r--templates/web/zurich/admin/report_edit-sdm.html2
-rw-r--r--templates/web/zurich/admin/report_edit.html8
-rw-r--r--templates/web/zurich/report/_item.html6
-rw-r--r--templates/web/zurich/report/_main.html4
-rwxr-xr-xtemplates/web/zurich/reports/index.html2
-rw-r--r--web/cobrands/borsetshire/_council-header.scss2
-rw-r--r--web/cobrands/borsetshire/_mysoc-header.scss62
-rw-r--r--web/cobrands/borsetshire/base.scss2
-rw-r--r--web/cobrands/fixmystreet.com/base.scss1
-rw-r--r--web/cobrands/fixmystreet/offline.js10
-rw-r--r--web/cobrands/oxfordshire/base.scss1
-rw-r--r--web/cobrands/sass/_base.scss1
-rw-r--r--web/cobrands/warwickshire/vendor/gamma/print.css4
-rw-r--r--web/cobrands/warwickshire/vendor/gamma/style.css20
-rw-r--r--web/js/map-OpenLayers.js5
67 files changed, 409 insertions, 359 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a731eaba2..680d4b412 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,8 @@
* Unreleased
- Front end improvements:
- - Include "SameSite=Lax" with all cookies.
+ - Zoom out as much as necessary on body map page, even on mobile. #1958
+ - Show loading message on initial /around map load #1976
- Bugfixes:
- Fix bug specifying category in URL on /around. #1950
- Fix bug with multiple select-multiples on a page. #1951
@@ -82,6 +83,7 @@
- Development improvements:
- Add hook for pre-wrapper content.
- Include JSON representation of extra fields in category_extras output
+ - send-reports will never skip failed reports when using --debug
- UK:
- Use SVG logo, inlined on front page. #1887
- Inline critical CSS on front page. #1893
diff --git a/bin/open311-populate-service-list b/bin/open311-populate-service-list
index 8cb41a47b..9c05055c6 100755
--- a/bin/open311-populate-service-list
+++ b/bin/open311-populate-service-list
@@ -23,8 +23,8 @@ my ($opt, $usage) = describe_options(
print($usage->text), exit if $opt->help;
my $bodies = FixMyStreet::DB->resultset('Body')->search( {
- # Until Oxfordshire does, and Bristol stops erroring
- name => { -not_in => [ 'Oxfordshire County Council', 'Bristol City Council' ] },
+ # Until Oxfordshire does
+ name => { -not_in => [ 'Oxfordshire County Council' ] },
send_method => 'Open311'
} );
my $verbose = 0;
diff --git a/bin/send-comments b/bin/send-comments
index 7363d7a0d..aecedcb08 100755
--- a/bin/send-comments
+++ b/bin/send-comments
@@ -49,7 +49,7 @@ my $bodies = FixMyStreet::DB->resultset('Body')->search( {
while ( my $body = $bodies->next ) {
- # XXX Cobrand specific
+ # XXX Cobrand specific - see also list in Problem->updates_sent_to_body
if ($site eq 'fixmystreet.com') {
# Oxfordshire (OCC) is special:
# we do *receive* service_request_updates (aka comments) for OCC, but we never *send* them, so skip this pass
diff --git a/locale/de_CH.UTF-8/LC_MESSAGES/FixMyStreet.po b/locale/de_CH.UTF-8/LC_MESSAGES/FixMyStreet.po
index 7914c8335..770793149 100644
--- a/locale/de_CH.UTF-8/LC_MESSAGES/FixMyStreet.po
+++ b/locale/de_CH.UTF-8/LC_MESSAGES/FixMyStreet.po
@@ -191,9 +191,8 @@ msgstr ""
#. ("The first %s is a dropdown of all/fixed/etc, the second is a dropdown of categories")
#: templates/web/base/reports/_list-filters.html:56
-#, fuzzy
msgid "<label for=\"statuses\">Show</label> %s reports <label for=\"filter_categories\">about</label> %s"
-msgstr "<label for=\"statuses\">Zeige</label> %s <label for=\"filter_categories\">&uuml;ber</label> %s"
+msgstr "<label for=\"statuses\">Zeige</label> %s Meldungen <label for=\"filter_categories\">&uuml;ber</label> %s"
#: templates/web/base/js/translation_strings.html:78
msgid "<span>%s</span> saved."
@@ -4578,9 +4577,8 @@ msgstr ""
#: templates/web/base/alert/choose.html:6
#: templates/web/base/around/_error_multiple.html:6
-#, fuzzy
msgid "We found more than one match for that location."
-msgstr "Diese Adresse wurde nicht gefunden."
+msgstr "Ihre Anfrage ergab mehr als eine m&ouml;gliche Adresse."
#: templates/web/base/around/lookup_by_ref.html:6
msgid "We found more than one match for that problem reference:"
@@ -4606,9 +4604,8 @@ msgstr ""
#: templates/web/base/alert/choose.html:12
#: templates/web/base/around/_error_multiple.html:12
-#, fuzzy
msgid "We show up to ten matches, please try a different search if yours is not here."
-msgstr "Ihre Anfrage ergab mehr als eine m&ouml;gliche Adresse. Die ersten zehn Treffer werden unten aufgelistet."
+msgstr "Die ersten zehn Treffer werden unten aufgelistet."
#: templates/web/base/report/new/notes.html:4
#: templates/web/zurich/report/new/notes.html:4
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 390300093..e47336b7c 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -98,7 +98,6 @@ __PACKAGE__->config(
);
__PACKAGE__->response_class('FixMyStreet::App::Response');
-__PACKAGE__->engine_class('FixMyStreet::App::Engine');
# Start the application
__PACKAGE__->setup();
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm
index e4932ecd5..ae7d83f55 100644
--- a/perllib/FixMyStreet/App/Controller/Around.pm
+++ b/perllib/FixMyStreet/App/Controller/Around.pm
@@ -284,11 +284,11 @@ sub map_features : Private {
Handle the ajax calls that the map makes when it is dragged. The info returned
is used to update the pins on the map and the text descriptions on the side of
-the map.
+the map. Used via /around?ajax=1 but also available at /ajax for mobile app.
=cut
-sub ajax : Private {
+sub ajax : Path('/ajax') {
my ( $self, $c ) = @_;
my $ret = $c->forward('/location/determine_location_from_bbox');
diff --git a/perllib/FixMyStreet/App/Controller/Open311.pm b/perllib/FixMyStreet/App/Controller/Open311.pm
index 95b29d116..c7e4e5bee 100644
--- a/perllib/FixMyStreet/App/Controller/Open311.pm
+++ b/perllib/FixMyStreet/App/Controller/Open311.pm
@@ -284,7 +284,7 @@ sub output_requests : Private {
my $display_photos = $c->cobrand->allow_photo_display($problem);
if ($display_photos && $problem->photo) {
my $url = $c->cobrand->base_url();
- my $imgurl = $url . $problem->photos->[0]->{url_full};
+ my $imgurl = $url . $problem->photos->[$display_photos-1]->{url_full};
$request->{'media_url'} = $imgurl;
}
push(@problemlist, $request);
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm
index 2302322bf..f41702dcf 100644
--- a/perllib/FixMyStreet/App/Controller/Photo.pm
+++ b/perllib/FixMyStreet/App/Controller/Photo.pm
@@ -63,7 +63,7 @@ sub index :LocalRegex('^(c/)?([1-9]\d*)(?:\.(\d+))?(?:\.(full|tn|fp))?\.(?:jpeg|
$c->detach( 'no_photo' ) unless $item;
- $c->detach( 'no_photo' ) unless $c->cobrand->allow_photo_display($item); # Should only be for reports, not updates
+ $c->detach( 'no_photo' ) unless $c->cobrand->allow_photo_display($item, $photo_number); # Should only be for reports, not updates
my $photo;
$photo = $item->get_photoset
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index d74af5a84..166c0614d 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -957,7 +957,7 @@ sub contacts_to_bodies : Private {
my @contacts = grep { $_->category eq $category } @{$c->stash->{contacts}};
- if ($c->stash->{unresponsive}{$category} || $c->stash->{unresponsive}{ALL}) {
+ if ($c->stash->{unresponsive}{$category} || $c->stash->{unresponsive}{ALL} || !@contacts) {
[];
} else {
if ( $c->cobrand->call_hook('singleton_bodies_str') ) {
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index 8550b745b..7c3796c42 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -440,7 +440,7 @@ sub summary : Private {
# required to stop errors in generate_grouped_data
$c->stash->{q_state} = '';
- $c->stash->{ward} = $c->get_param('ward');
+ $c->stash->{ward} = $c->get_param('area');
$c->stash->{start_date} = $dtf->format_date($start_date);
$c->stash->{end_date} = $c->get_param('end_date');
@@ -494,7 +494,7 @@ sub export_summary_csv : Private {
'postcode',
'url',
],
- filename => 'fixmystreet-data.csv',
+ filename => 'fixmystreet-data',
};
$c->forward('/dashboard/generate_csv');
}
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm
index 7cf4783c0..e1da4445d 100755
--- a/perllib/FixMyStreet/App/Controller/Rss.pm
+++ b/perllib/FixMyStreet/App/Controller/Rss.pm
@@ -282,14 +282,15 @@ sub add_row : Private {
$item{pubDate} = $pubDate if $pubDate;
$item{category} = encode_entities($row->{category}) if $row->{category};
- if ($c->cobrand->allow_photo_display($row) && $row->{photo}) {
+ if ((my $photo_to_show = $c->cobrand->allow_photo_display($row)) && $row->{photo}) {
# Bit yucky as we don't have full objects here
my $photoset = FixMyStreet::App::Model::PhotoSet->new({ db_data => $row->{photo} });
- my $first_fn = $photoset->get_id(0);
+ my $idx = $photo_to_show - 1;
+ my $first_fn = $photoset->get_id($idx);
my ($hash, $format) = split /\./, $first_fn;
my $cachebust = substr($hash, 0, 8);
my $key = $alert_type->item_table eq 'comment' ? 'c/' : '';
- $item{description} .= encode_entities("\n<br><img src=\"". $base_url . "/photo/$key$row->{id}.0.$format?$cachebust\">");
+ $item{description} .= encode_entities("\n<br><img src=\"". $base_url . "/photo/$key$row->{id}.$idx.$format?$cachebust\">");
}
if ( $row->{used_map} ) {
diff --git a/perllib/FixMyStreet/App/Engine.pm b/perllib/FixMyStreet/App/Engine.pm
deleted file mode 100644
index b73701f49..000000000
--- a/perllib/FixMyStreet/App/Engine.pm
+++ /dev/null
@@ -1,68 +0,0 @@
-package FixMyStreet::App::Engine;
-
-use Moose;
-extends 'Catalyst::Engine';
-
-use CGI::Cookie;
-use utf8;
-
-use namespace::clean -except => 'meta';
-
-=head1 NAME
-
-FixMyStreet::App::Engine - Catalyst Engine wrapper
-
-=head1 SYNOPSIS
-
-See L<Catalyst::Engine>.
-
-=head1 METHODS
-
-=head2 $self->finalize_cookies($c)
-
-Create CGI::Cookie objects from C<< $c->res->cookies >>, and set them as
-response headers. Adds a C<samesite=lax> part.
-
-=cut
-
-sub finalize_cookies {
- my ( $self, $c ) = @_;
-
- my @cookies;
- my $response = $c->response;
-
- foreach my $name (keys %{ $response->cookies }) {
-
- my $val = $response->cookies->{$name};
-
- my $cookie = (
- blessed($val)
- ? $val
- : CGI::Cookie->new(
- -name => $name,
- -value => $val->{value},
- -expires => $val->{expires},
- -domain => $val->{domain},
- -path => $val->{path},
- -secure => $val->{secure} || 0,
- -httponly => $val->{httponly} || 0,
- -samesite => 'Lax',
- )
- );
- if (!defined $cookie) {
- $c->log->warn("undef passed in '$name' cookie value - not setting cookie")
- if $c->debug;
- next;
- }
-
- push @cookies, $cookie->as_string;
- }
-
- for my $cookie (@cookies) {
- $response->headers->push_header( 'Set-Cookie' => $cookie );
- }
-}
-
-__PACKAGE__->meta->make_immutable;
-
-1;
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 4c521eaaa..7888f8ccf 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -465,11 +465,12 @@ sub allow_photo_upload { return 1; }
=item allow_photo_display
Return a boolean indicating whether the cobrand allows photo display
+for the particular report and photo.
=cut
sub allow_photo_display {
- my ( $self, $r ) = @_;
+ my ( $self, $r, $num ) = @_;
return 1;
}
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index 4dc95b178..f0308d6d7 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -4,6 +4,7 @@ use base 'FixMyStreet::Cobrand::Default';
use DateTime;
use POSIX qw(strcoll);
use RABX;
+use List::Util qw(min);
use Scalar::Util 'blessed';
use DateTime::Format::Pg;
@@ -223,19 +224,30 @@ sub updates_as_hashref {
return $hashref;
}
+# If $num is undefined, we want to return the minimum photo number that can be
+# shown (1-indexed), or false for no display. If $num is defined, return
+# boolean whether that indexed photo can be shown.
sub allow_photo_display {
- my ( $self, $r ) = @_;
+ my ( $self, $r, $num ) = @_;
+ my $publish_photo;
if (blessed $r) {
- return $r->get_extra_metadata( 'publish_photo' );
+ $publish_photo = $r->get_extra_metadata('publish_photo');
+ } else {
+ # additional munging in case $r isn't an object, TODO see if we can remove this
+ my $extra = $r->{extra};
+ utf8::encode($extra) if utf8::is_utf8($extra);
+ my $h = new IO::String($extra);
+ $extra = RABX::wire_rd($h);
+ return unless ref $extra eq 'HASH';
+ $publish_photo = $extra->{publish_photo};
}
+ # Old style stored 1/0 integer, which can still be used if present.
+ return $publish_photo unless ref $publish_photo;
+ return $publish_photo->{$num} if defined $num;
- # additional munging in case $r isn't an object, TODO see if we can remove this
- my $extra = $r->{extra};
- utf8::encode($extra) if utf8::is_utf8($extra);
- my $h = new IO::String($extra);
- $extra = RABX::wire_rd($h);
- return unless ref $extra eq 'HASH';
- return $extra->{publish_photo};
+ # We return a 1-indexed number so that '0' can be taken as 'not allowed'
+ my $i = min grep { $publish_photo->{$_} } keys %$publish_photo;
+ return $i + 1;
}
sub show_unconfirmed_reports {
@@ -250,12 +262,27 @@ sub get_body_sender {
# Report overdue functions
my %public_holidays = map { $_ => 1 } (
- '2013-01-01', '2013-01-02', '2013-03-29', '2013-04-01',
- '2013-04-15', '2013-05-01', '2013-05-09', '2013-05-20',
- '2013-08-01', '2013-09-09', '2013-12-25', '2013-12-26',
- '2014-01-01', '2014-01-02', '2014-04-18', '2014-04-21',
- '2014-04-28', '2014-05-01', '2014-05-29', '2014-06-09',
- '2014-08-01', '2014-09-15', '2014-12-25', '2014-12-26',
+ # New Year's Day, Saint Berchtold, Good Friday, Easter Monday,
+ # Sechseläuten, Labour Day, Ascension Day, Whit Monday,
+ # Swiss National Holiday, Knabenschiessen, Christmas, St Stephen's Day
+ # Extra holidays
+
+ '2018-01-01', '2018-01-02', '2018-03-30', '2018-04-02',
+ '2018-04-16', '2018-05-01', '2018-05-10', '2018-05-21',
+ '2018-08-01', '2018-09-10', '2018-12-25', '2018-12-26',
+ '2018-03-29', '2018-05-11', '2018-12-27', '2018-12-28', '2018-12-31',
+
+ '2019-01-01', '2019-01-02', '2019-04-19', '2019-04-22',
+ '2019-04-08', '2019-05-01', '2019-05-30', '2019-06-10',
+ '2019-08-01', '2019-09-09', '2019-12-25', '2019-12-26',
+
+ '2020-01-01', '2020-01-02', '2020-04-10', '2020-04-13',
+ '2020-04-20', '2020-05-01', '2020-05-21', '2020-06-01',
+ '2020-09-14', '2020-12-25',
+
+ '2021-01-01', '2021-04-02', '2021-04-05',
+ '2021-04-19', '2021-05-13', '2021-05-24',
+ '2021-09-13',
);
sub is_public_holiday {
@@ -566,7 +593,19 @@ sub admin_report_edit {
# Problem updates upon submission
if ( ($type eq 'super' || $type eq 'dm') && $c->get_param('submit') ) {
- $problem->set_extra_metadata('publish_photo' => $c->get_param('publish_photo') || 0 );
+
+ my @keys = grep { /^publish_photo/ } keys %{ $c->req->params };
+ my %publish_photo;
+ foreach my $key (@keys) {
+ my ($index) = $key =~ /(\d+)$/;
+ $publish_photo{$index} = 1 if $c->get_param($key);
+ }
+
+ if (%publish_photo) {
+ $problem->set_extra_metadata('publish_photo' => \%publish_photo);
+ } else {
+ $problem->unset_extra_metadata('publish_photo');
+ }
$problem->set_extra_metadata('third_personal' => $c->get_param('third_personal') || 0 );
# Make sure we have a copy of the original detail field
@@ -1005,23 +1044,28 @@ sub _admin_send_email {
sub munge_sendreport_params {
my ($self, $row, $h, $params) = @_;
- if ($row->state =~ /^(closed|investigating)$/ && $row->get_extra_metadata('publish_photo')) {
+
+ if ($row->state =~ /^(closed|investigating)$/) {
# we attach images to reports sent to external bodies
my $photoset = $row->get_photoset();
my $num = $photoset->num_images
or return;
my $id = $row->id;
my @attachments = map {
- my $image = $photoset->get_raw_image($_);
- {
- body => $image->{data},
- attributes => {
- filename => "$id.$_." . $image->{extension},
- content_type => $image->{content_type},
- encoding => 'base64',
- # quoted-printable ends up with newlines corrupting binary data
- name => "$id.$_." . $image->{extension},
- },
+ if ($self->allow_photo_display($row, $_)) {
+ my $image = $photoset->get_raw_image($_);
+ {
+ body => $image->{data},
+ attributes => {
+ filename => "$id.$_." . $image->{extension},
+ content_type => $image->{content_type},
+ encoding => 'base64',
+ # quoted-printable ends up with newlines corrupting binary data
+ name => "$id.$_." . $image->{extension},
+ },
+ };
+ } else {
+ ();
}
} (0..$num-1);
$params->{_attachments_} = \@attachments;
@@ -1165,7 +1209,10 @@ sub admin_stats {
$public_response =~ s{\r?\n}{ <br/> }g if $public_response;
# Assemble photo URL, if report has a photo
- my $media_url = ( @{$report->photos} && $c->cobrand->allow_photo_display($report) ) ? ($c->cobrand->base_url . $report->photos->[0]->{url}) : '';
+ my $photo_to_display = $c->cobrand->allow_photo_display($report);
+ my $media_url = (@{$report->photos} && $photo_to_display)
+ ? $c->cobrand->base_url . $report->photos->[$photo_to_display-1]->{url}
+ : '';
my @columns = (
$report->id,
@@ -1231,7 +1278,7 @@ sub admin_stats {
# pictures taken
my $pictures_taken = $c->model('DB::Problem')->search( { photo => { '!=', undef }, %params } )->count;
# pictures published
- my $pictures_published = $c->model('DB::Problem')->search( { extra => { like => '%publish_photo,I1:1%' }, %params } )->count;
+ my $pictures_published = $c->model('DB::Problem')->search( { extra => { like => '%publish_photo%' }, %params } )->count;
# how many times was a telephone number provided
# XXX => How many users have a telephone number stored
# my $phone = $c->model('DB::User')->search( { phone => { '!=', undef } } )->count;
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index ce4fc216a..8a4dbe475 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -156,26 +156,6 @@ sub url {
return "/report/" . $self->problem_id . '#update_' . $self->id;
}
-sub photos {
- my $self = shift;
- my $photoset = $self->get_photoset;
- my $i = 0;
- my $id = $self->id;
- my @photos = map {
- my $cachebust = substr($_, 0, 8);
- my ($hash, $format) = split /\./, $_;
- {
- id => $hash,
- url_temp => "/photo/temp.$hash.$format",
- url_temp_full => "/photo/fulltemp.$hash.$format",
- url => "/photo/c/$id.$i.$format?$cachebust",
- url_full => "/photo/c/$id.$i.full.$format?$cachebust",
- idx => $i++,
- }
- } $photoset->all_ids;
- return \@photos;
-}
-
=head2 latest_moderation_log_entry
Return most recent ModerationLog object
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index 8625bf17a..c73f7efca 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -867,6 +867,33 @@ sub update_send_failed {
} );
}
+=head2 updates_sent_to_body
+
+Returns 1 if updates left on this report will be sent to any of the receiving
+bodies by some mechanism. Right now that mechanism is Open311.
+
+=cut
+
+sub updates_sent_to_body {
+ my $self = shift;
+ return unless $self->send_method_used && $self->send_method_used eq 'Open311';
+
+ # Some bodies only send updates *to* FMS, they don't receive updates.
+ # NB See also the list in bin/send-comments
+ my $excluded = qr{Lewisham|Oxfordshire};
+
+ my @bodies = values %{ $self->bodies };
+ my @updates_sent = grep {
+ $_->send_comments &&
+ (
+ $_->send_method eq 'Open311' ||
+ $_->send_method eq 'Noop' # Sending might be temporarily disabled
+ ) &&
+ !($_->name =~ /$excluded/)
+ } @bodies;
+ return scalar @updates_sent;
+}
+
sub add_send_method {
my $self = shift;
my $sender = shift;
@@ -919,38 +946,6 @@ sub latest_moderation_log_entry {
return $self->admin_log_entries->search({ action => 'moderation' }, { order_by => { -desc => 'id' } })->first;
}
-sub photos {
- my $self = shift;
- my $photoset = $self->get_photoset;
- my $i = 0;
- my $id = $self->id;
- my @photos = map {
- my $cachebust = substr($_, 0, 8);
- # Some Varnish configurations (e.g. on mySociety infra) strip cookies from
- # images, which means image requests will be redirected to the login page
- # if LOGIN_REQUIRED is set. To stop this happening, Varnish should be
- # configured to not strip cookies if the cookie_passthrough param is
- # present, which this line ensures will be if LOGIN_REQUIRED is set.
- my $extra = '';
- if (FixMyStreet->config('LOGIN_REQUIRED')) {
- $cachebust .= '&cookie_passthrough=1';
- $extra = '?cookie_passthrough=1';
- }
- my ($hash, $format) = split /\./, $_;
- {
- id => $hash,
- url_temp => "/photo/temp.$hash.$format$extra",
- url_temp_full => "/photo/fulltemp.$hash.$format$extra",
- url => "/photo/$id.$i.$format?$cachebust",
- url_full => "/photo/$id.$i.full.$format?$cachebust",
- url_tn => "/photo/$id.$i.tn.$format?$cachebust",
- url_fp => "/photo/$id.$i.fp.$format?$cachebust",
- idx => $i++,
- }
- } $photoset->all_ids;
- return \@photos;
-}
-
__PACKAGE__->has_many(
"admin_log_entries",
"FixMyStreet::DB::Result::AdminLog",
diff --git a/perllib/FixMyStreet/Roles/PhotoSet.pm b/perllib/FixMyStreet/Roles/PhotoSet.pm
index 9607b5049..2a6863cff 100644
--- a/perllib/FixMyStreet/Roles/PhotoSet.pm
+++ b/perllib/FixMyStreet/Roles/PhotoSet.pm
@@ -32,4 +32,38 @@ sub get_first_image_fp {
return $self->get_photoset->get_image_data( num => 0, size => 'fp' );
}
+sub photos {
+ my $self = shift;
+ my $photoset = $self->get_photoset;
+ my $i = 0;
+ my $id = $self->id;
+ my $typ = $self->result_source->name eq 'comment' ? 'c/' : '';
+
+ my @photos = map {
+ my $cachebust = substr($_, 0, 8);
+ # Some Varnish configurations (e.g. on mySociety infra) strip cookies from
+ # images, which means image requests will be redirected to the login page
+ # if LOGIN_REQUIRED is set. To stop this happening, Varnish should be
+ # configured to not strip cookies if the cookie_passthrough param is
+ # present, which this line ensures will be if LOGIN_REQUIRED is set.
+ my $extra = '';
+ if (FixMyStreet->config('LOGIN_REQUIRED')) {
+ $cachebust .= '&cookie_passthrough=1';
+ $extra = '?cookie_passthrough=1';
+ }
+ my ($hash, $format) = split /\./, $_;
+ {
+ id => $hash,
+ url_temp => "/photo/temp.$hash.$format$extra",
+ url_temp_full => "/photo/fulltemp.$hash.$format$extra",
+ url => "/photo/$typ$id.$i.$format?$cachebust",
+ url_full => "/photo/$typ$id.$i.full.$format?$cachebust",
+ url_tn => "/photo/$typ$id.$i.tn.$format?$cachebust",
+ url_fp => "/photo/$typ$id.$i.fp.$format?$cachebust",
+ idx => $i++,
+ }
+ } $photoset->all_ids;
+ return \@photos;
+}
+
1;
diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm
index aca894d03..7e14fbb1e 100644
--- a/perllib/FixMyStreet/Script/Reports.pm
+++ b/perllib/FixMyStreet/Script/Reports.pm
@@ -159,7 +159,7 @@ sub send(;$) {
}
}
- if ( $reporters{ $sender }->should_skip( $row ) ) {
+ if ( $reporters{ $sender }->should_skip( $row, $debug_mode ) ) {
$skip = 1;
debug_print("skipped by sender " . $sender_info->{method} . " (might be due to previous failed attempts?)", $row->id) if $debug_mode;
} else {
diff --git a/perllib/FixMyStreet/SendReport.pm b/perllib/FixMyStreet/SendReport.pm
index 40ec4caf2..2739e3043 100644
--- a/perllib/FixMyStreet/SendReport.pm
+++ b/perllib/FixMyStreet/SendReport.pm
@@ -19,10 +19,12 @@ has 'unconfirmed_notes' => ( 'is' => 'rw', isa => HashRef, default => sub { {} }
sub should_skip {
- my $self = shift;
- my $row = shift;
+ my $self = shift;
+ my $row = shift;
+ my $debug = shift;
return 0 unless $row->send_fail_count;
+ return 0 if $debug;
my $now = DateTime->now( time_zone => FixMyStreet->local_time_zone );
my $diff = $now - $row->send_fail_timestamp;
diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm
index e8d06efdf..30d888eb4 100644
--- a/perllib/Open311/PopulateServiceList.pm
+++ b/perllib/Open311/PopulateServiceList.pm
@@ -221,7 +221,8 @@ sub _add_meta_to_contact {
warn sprintf( "Empty meta data for %s at %s",
$self->_current_service->{service_code},
$self->_current_body->endpoint )
- if $self->verbose;
+ # Bristol has a habit of returning empty metadata, stop noise from that.
+ if $self->verbose and $self->_current_body->name ne 'Bristol City Council';
return;
}
diff --git a/t/app/controller/rss.t b/t/app/controller/rss.t
index 171121eaa..a8101b593 100644
--- a/t/app/controller/rss.t
+++ b/t/app/controller/rss.t
@@ -14,28 +14,19 @@ my $user1 = $mech->create_user_ok('reporter-rss@example.com', name => 'Reporter
my $dt_parser = FixMyStreet::App->model('DB')->schema->storage->datetime_parser;
-my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( {
+my ($report) = $mech->create_problems_for_body(1, 2651, '', {
postcode => 'eh1 1BB',
- bodies_str => '2651',
areas => ',11808,135007,14419,134935,2651,20728,',
category => 'Street lighting',
title => '&Test’i<n>g \'☃"',
detail => 'Testing Detail',
- used_map => 1,
name => $user1->name,
- anonymous => 0,
- state => 'confirmed',
confirmed => $dt_parser->format_datetime($dt),
lastupdate => $dt_parser->format_datetime($dt),
whensent => $dt_parser->format_datetime($dt->clone->add( minutes => 5 )),
- lang => 'en-gb',
- service => '',
- cobrand => 'default',
- cobrand_data => '',
- send_questionnaire => 1,
latitude => '55.951963',
longitude => '-3.189944',
- user_id => $user1->id,
+ user => $user1,
} );
$mech->host('www.fixmystreet.com');
@@ -127,54 +118,19 @@ $report->delete();
my $council = $mech->create_body_ok(2333, 'Hart Council');
my $county = $mech->create_body_ok(2227, 'Hampshire Council');
-my $now = DateTime->now();
-my $report_to_council = FixMyStreet::App->model('DB::Problem')->find_or_create(
- {
- postcode => 'GU51 4AE',
- bodies_str => $council->id,
+my ($report_to_council) = $mech->create_problems_for_body(1, $council->id, '', {
+ user => $user1,
areas => ',2333,2227,',
- category => 'Other',
- title => 'council report',
- detail => 'Test 2 Detail',
- used_map => 't',
- name => 'Test User',
- anonymous => 'f',
- state => 'closed',
- confirmed => $now->ymd . ' ' . $now->hms,
- lang => 'en-gb',
- service => '',
- cobrand => 'default',
- cobrand_data => '',
- send_questionnaire => 't',
latitude => '51.279616',
longitude => '-0.846040',
- user_id => $user1->id,
- }
-);
+});
-my $report_to_county_council = FixMyStreet::App->model('DB::Problem')->find_or_create(
- {
- postcode => 'GU51 4AE',
- bodies_str => $county->id,
+my ($report_to_county_council) = $mech->create_problems_for_body(1, $county->id, '', {
+ user => $user1,
areas => ',2333,2227,',
- category => 'Other',
- title => 'county report',
- detail => 'Test 2 Detail',
- used_map => 't',
- name => 'Test User',
- anonymous => 'f',
- state => 'closed',
- confirmed => $now->ymd . ' ' . $now->hms,
- lang => 'en-gb',
- service => '',
- cobrand => 'default',
- cobrand_data => '',
- send_questionnaire => 't',
latitude => '51.279616',
longitude => '-0.846040',
- user_id => $user1->id,
- }
-);
+});
subtest "check RSS feeds on cobrand have correct URLs for non-cobrand reports" => sub {
$mech->host('hart.fixmystreet.com');
diff --git a/t/app/engine.t b/t/app/engine.t
deleted file mode 100644
index d99c5e087..000000000
--- a/t/app/engine.t
+++ /dev/null
@@ -1,9 +0,0 @@
-use FixMyStreet::Test;
-
-use Catalyst::Test 'FixMyStreet::App';
-
-my $res = request("/?_override_foo=bar");
-
-like $res->headers->header('Set-Cookie'), qr/SameSite=Lax/;
-
-done_testing;
diff --git a/t/cobrand/bromley.t b/t/cobrand/bromley.t
index a3a807bb1..41e351dea 100644
--- a/t/cobrand/bromley.t
+++ b/t/cobrand/bromley.t
@@ -49,7 +49,7 @@ $mech->content_contains( 'State changed to: No further action' );
subtest 'testing special Open311 behaviour', sub {
$report->set_extra_fields();
$report->update;
- $body->update( { send_method => 'Open311', endpoint => 'http://bromley.endpoint.example.com', jurisdiction => 'FMS', api_key => 'test' } );
+ $body->update( { send_method => 'Open311', endpoint => 'http://bromley.endpoint.example.com', jurisdiction => 'FMS', api_key => 'test', send_comments => 1 } );
my $test_data;
FixMyStreet::override_config {
STAGING_FLAGS => { send_reports => 1 },
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index 8c2c70c2f..385f7f077 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -3,6 +3,7 @@
use DateTime;
use Email::MIME;
+use File::Temp;
use LWP::Protocol::PSGI;
use Test::LongString;
use Path::Tiny;
@@ -25,7 +26,6 @@ my $cobrand = FixMyStreet::Cobrand::Zurich->new();
my $sample_file = path(__FILE__)->parent->parent->child("app/controller/sample.jpg");
ok $sample_file->exists, "sample file $sample_file exists";
-my $sample_photo = $sample_file->slurp_raw;
# This is a helper method that will send the reports but with the config
# correctly set - notably STAGING_FLAGS send_reports needs to be true, and
@@ -103,7 +103,7 @@ my $superuser;
subtest "set up superuser" => sub {
$superuser = $mech->log_in_ok( 'super@example.org' );
# a user from body $zurich is a superuser, as $zurich has no parent id!
- $superuser->update({ from_body => $zurich->id });
+ $superuser->update({ from_body => $zurich->id });
$EXISTING_REPORT_COUNT = get_export_rows_count($mech);
$mech->log_out_ok;
};
@@ -112,7 +112,6 @@ my @reports = $mech->create_problems_for_body( 1, $division->id, 'Test', {
state => 'unconfirmed',
confirmed => undef,
cobrand => 'zurich',
- photo => $sample_photo,
areas => ',423017,',
});
my $report = $reports[0];
@@ -315,15 +314,30 @@ subtest "report_edit" => sub {
}
};
+# Give the report three photos
+my $UPLOAD_DIR = File::Temp->newdir();
+my @files = map { $_ x 40 . ".jpeg" } (1..3);
+$sample_file->copy(path($UPLOAD_DIR, $_)) for @files;
+$report->photo(join(',', @files));
+$report->update;
+
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAPIT_URL => 'http://mapit.zurich/',
MAP_TYPE => 'Zurich,OSM',
+ UPLOAD_DIR => $UPLOAD_DIR,
}, sub {
# Photo publishing
$mech->get_ok( '/admin/report_edit/' . $report->id );
- $mech->submit_form_ok( { with_fields => { state => 'confirmed', publish_photo => 1 } } );
+ $mech->submit_form_ok( { with_fields => { state => 'confirmed', publish_photo_1 => 1 } } );
+ $mech->get_ok( '/around?lat=' . $report->latitude . ';lon=' . $report->longitude);
+ $mech->content_lacks('photo/' . $report->id . '.0.fp.jpeg');
+ $mech->content_contains('photo/' . $report->id . '.1.fp.jpeg');
+ $mech->content_lacks('photo/' . $report->id . '.2.fp.jpeg');
$mech->get_ok( '/report/' . $report->id );
- $mech->content_contains('photo/' . $report->id . '.0.jpeg');
+ $mech->content_lacks('photo/' . $report->id . '.0.jpeg');
+ $mech->content_contains('photo/' . $report->id . '.1.jpeg');
+ $mech->content_lacks('photo/' . $report->id . '.2.jpeg');
# Internal notes
$mech->get_ok( '/admin/report_edit/' . $report->id );
@@ -451,12 +465,16 @@ $mech->content_contains( DateTime->now->strftime("%d.%m.%Y") );
# User confirms their email address
$report->set_extra_metadata(email_confirmed => 1);
+$report->confirmed(DateTime->now);
$report->update;
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
MAP_TYPE => 'Zurich,OSM',
}, sub {
+ # Quick RSS check here, while we have a report
+ $mech->get_ok('/rss/problems');
+
$mech->get_ok( '/admin/report_edit/' . $report->id );
$mech->content_lacks( 'Unbest&auml;tigt' ); # Confirmed email
$mech->submit_form_ok( { with_fields => { status_update => 'FINAL UPDATE' } } );
@@ -480,7 +498,6 @@ $mech->clear_emails_ok;
state => 'unconfirmed',
confirmed => undef,
cobrand => 'zurich',
- photo => $sample_photo,
areas => ',423017,',
});
$report = $reports[0];
@@ -522,7 +539,6 @@ $mech->email_count_is(0);
state => 'unconfirmed',
confirmed => undef,
cobrand => 'zurich',
- photo => $sample_photo,
areas => ',423017,',
});
$report = $reports[0];
@@ -830,7 +846,7 @@ subtest "test stats" => sub {
$mech->content_contains('Innerhalb von f&uuml;nf Arbeitstagen abgeschlossen: 3');
# my @data = $mech->content =~ /(?:moderiert|abgeschlossen): \d+/g;
# diag Dumper(\@data); use Data::Dumper;
-
+
my $export_count = get_export_rows_count($mech);
if (defined $export_count) {
is $export_count - $EXISTING_REPORT_COUNT, 3, 'Correct number of reports';
@@ -865,7 +881,7 @@ subtest 'email images to external partners' => sub {
});
my $fileid = $photoset->data;
- $report->set_extra_metadata('publish_photo' => 1);
+ $report->set_extra_metadata('publish_photo' => { 0 => 1 });
# The below email comparison must not have an external message.
$report->unset_extra_metadata('external_message');
$report->update({
diff --git a/templates/email/fixmystreet.com/update-confirm-donotsend.txt b/templates/email/fixmystreet.com/update-confirm-donotsend.txt
index 8ab91836b..21f3c6ffd 100644
--- a/templates/email/fixmystreet.com/update-confirm-donotsend.txt
+++ b/templates/email/fixmystreet.com/update-confirm-donotsend.txt
@@ -1,4 +1,4 @@
-[% IF NOT update.problem.to_body_named('Bromley|Stevenage') %]
+[% IF NOT problem.updates_sent_to_body %]
Note that we do not send updates to [% update.problem.body %] - they are
intended as a place for [% site_name %] users to
discuss, support, and offer advice.
diff --git a/templates/email/zurich/problem-confirm.txt b/templates/email/zurich/problem-confirm.txt
index d64d54e8c..7a76332bd 100644
--- a/templates/email/zurich/problem-confirm.txt
+++ b/templates/email/zurich/problem-confirm.txt
@@ -8,6 +8,8 @@ Besten Dank für Ihre Meldung auf <<Züri wie neu>>. Klicken Sie bitte auf diese
Wir werden Ihr Anliegen innerhalb der nächsten sechs Arbeitstage beantworten.
+Achtung: Notfälle müssen der Polizei gemeldet werden via Telefon 117.
+
Ihre Meldung lautet:
diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html
index ff99bb907..911f4094e 100644
--- a/templates/web/base/admin/report_edit.html
+++ b/templates/web/base/admin/report_edit.html
@@ -135,7 +135,9 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
<li>[% loc('Phone:') %] [% problem.user.phone_display | html %]</li>
[% END %]
[% IF problem.user.email != problem.user.username %]
-<li>[% loc('Email:') %] [% problem.user.email | html %]</li>
+<li>[% loc('Email:') %]
+<a href="mailto:[% problem.user.email | html %]">[% problem.user.email | html %]</a>
+</li>
[% END %]
<li><label class="inline-text" for="flagged">[% loc('Flagged:') %]</label>
<input type="checkbox" id="flagged" name="flagged"[% ' checked' IF problem.flagged %]></li>
diff --git a/templates/web/base/around/on_map_list_items.html b/templates/web/base/around/on_map_list_items.html
index fafe7f433..e1be87754 100644
--- a/templates/web/base/around/on_map_list_items.html
+++ b/templates/web/base/around/on_map_list_items.html
@@ -14,7 +14,11 @@
</li>
[% ELSE %]
<li class="item-list__item item-list__item--empty">
- <p>[% loc('There are no reports to show.') %]</p>
+ [% IF c.get_param('js') %]
+ <p>[% loc('Loading reports…') %]</p>
+ [% ELSE %]
+ <p>[% loc('There are no reports to show.') %]</p>
+ [% END %]
</li>
[% END %]
</ul>
diff --git a/templates/web/base/open311/index.html b/templates/web/base/open311/index.html
index 2a8044a54..68f83c445 100644
--- a/templates/web/base/open311/index.html
+++ b/templates/web/base/open311/index.html
@@ -40,8 +40,8 @@ about future-proofing your communication channels in an easy and economical way
[% IF c.cobrand.moniker == 'fixmystreet' %]
<p>You may be interested to know about <a
-href="https://www.fixmystreet.com/about/professional">FixMyStreet
-Professional</a>, our hosted service which sits seamlessly on your council
+href="https://www.fixmystreet.com/pro/">FixMyStreet
+Pro</a>, our hosted service which sits seamlessly on your council
website.</p>
<p>We can integrate it with any council back-end system, but if you use
diff --git a/templates/web/base/report/photo.html b/templates/web/base/report/photo.html
index aa82baef6..5474fad28 100644
--- a/templates/web/base/report/photo.html
+++ b/templates/web/base/report/photo.html
@@ -1,13 +1,15 @@
-[% IF c.cobrand.allow_photo_display(object) && object.photo %]
+[% IF object.photo %]
[% IF object.photos.size > 1 %]
<div class="update-img-set">
[% END %]
[% FOR photo IN object.photos %]
- <div class="update-img">
- <a href="[% photo.url_full %]" rel="fancy">
- <img alt="Photo of this report" src="[% photo.url %]">
- <span>zoom</span></a>
- </div>
+ [% IF c.cobrand.allow_photo_display(object, photo.idx) %]
+ <div class="update-img">
+ <a href="[% photo.url_full %]" rel="fancy">
+ <img alt="Photo of this report" src="[% photo.url %]">
+ <span>zoom</span></a>
+ </div>
+ [% END %]
[% END %]
[% IF object.photos.size > 1 %]
</div>
diff --git a/templates/web/borsetshire/front/footer-marketing.html b/templates/web/borsetshire/front/footer-marketing.html
index 78b4fa89b..7f1f3515a 100644
--- a/templates/web/borsetshire/front/footer-marketing.html
+++ b/templates/web/borsetshire/front/footer-marketing.html
@@ -1,6 +1,6 @@
<div class="fms-pro-promo">
- <h2>FixMyStreet Professional</h2>
+ <h2>FixMyStreet Pro</h2>
<p class="lead">The one-stop street reporting service for councils.</p>
<p>Integrate FixMyStreet with your council system for smooth, end-to-end report fullfilment.</p>
- <p><a href="/about/professional" class="btn--borsetshire">Learn more</a></p>
+ <p><a href="https://www.fixmystreet.com/pro/" class="btn--borsetshire">Learn more</a></p>
</div>
diff --git a/templates/web/borsetshire/header_site.html b/templates/web/borsetshire/header_site.html
index 51f42881b..6db1f950e 100644
--- a/templates/web/borsetshire/header_site.html
+++ b/templates/web/borsetshire/header_site.html
@@ -1,3 +1,14 @@
+<div class="ms-header clearfix">
+ <div class="container">
+ <div class="ms-header__logo">
+ <a href="https://www.mysociety.org/">mySociety</a>
+ </div>
+ <a class="ms-header__back-to-fms" href="https://www.fixmystreet.com/pro/">
+ Get <strong>FixMyStreet Pro</strong> – the one-stop street reporting service for councils
+ </a>
+ </div>
+</div>
+
<header id="site-header" role="banner">
<div class="container">
[% INCLUDE 'header_logo.html' %]
diff --git a/templates/web/bromley/front/footer-marketing.html b/templates/web/bromley/front/footer-marketing.html
index c519eba66..189547091 100644
--- a/templates/web/bromley/front/footer-marketing.html
+++ b/templates/web/bromley/front/footer-marketing.html
@@ -12,7 +12,7 @@
<div id="footer-help">
<p>
- Powered by <a class="platform-logo" href="https://www.fixmystreet.com/about/professional">FixMyStreet Platform</a>
+ Powered by <a class="platform-logo" href="https://www.fixmystreet.com/pro/">FixMyStreet Platform</a>
</p>
</div>
</div>
diff --git a/templates/web/eastherts/footer.html b/templates/web/eastherts/footer.html
index 59d998959..e8a54e462 100644
--- a/templates/web/eastherts/footer.html
+++ b/templates/web/eastherts/footer.html
@@ -41,7 +41,7 @@
<p>&copy; 2017 mySociety</p>
</div>
<div class="footer__goss">
- <a href="https://www.fixmystreet.com/about/professional">Powered by FixMyStreet</a>
+ <a href="https://www.fixmystreet.com/pro/">Powered by FixMyStreet</a>
</div>
</div>
</div>
diff --git a/templates/web/fixmystreet-uk-councils/report/updates-sidebar-notes.html b/templates/web/fixmystreet-uk-councils/report/updates-sidebar-notes.html
new file mode 100644
index 000000000..e4f8dda1b
--- /dev/null
+++ b/templates/web/fixmystreet-uk-councils/report/updates-sidebar-notes.html
@@ -0,0 +1,6 @@
+<p>
+ [% IF NOT problem.updates_sent_to_body %]
+ [% loc( 'Please note that updates are not sent to the council.' ) %]
+ [% END %]
+ [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]
+</p>
diff --git a/templates/web/fixmystreet.com/about/council-dashboard.html b/templates/web/fixmystreet.com/about/council-dashboard.html
index 7acaee207..c109b612f 100644
--- a/templates/web/fixmystreet.com/about/council-dashboard.html
+++ b/templates/web/fixmystreet.com/about/council-dashboard.html
@@ -6,7 +6,7 @@
[% IF no_body_found %]
[% INCLUDE header.html
- title = 'FixMyStreet Professional', bodyclass = 'fullwidthpage'
+ title = 'FixMyStreet Pro', bodyclass = 'fullwidthpage'
%]
<div class="confirmation-header confirmation-header--inbox">
@@ -17,12 +17,12 @@
[% ELSE %]
[% INCLUDE header.html
- title = 'FixMyStreet Professional', bodyclass = 'fms-for-councils fullwidthpage'
+ title = 'FixMyStreet Pro', bodyclass = 'fms-for-councils fullwidthpage'
%]
<div class="fixed-container">
<div class="council-header">
- <h1 class="councils-logo">FixMyStreet Professional</h1>
+ <h1 class="councils-logo">FixMyStreet Pro</h1>
</div>
<div class="councils-hero">
<div class="councils-hero__demo-access">
diff --git a/templates/web/fixmystreet.com/about/faq-en-gb.html b/templates/web/fixmystreet.com/about/faq-en-gb.html
index 4bc98f7df..0d6b95523 100755
--- a/templates/web/fixmystreet.com/about/faq-en-gb.html
+++ b/templates/web/fixmystreet.com/about/faq-en-gb.html
@@ -357,7 +357,7 @@ categories if you wish.
<p>FixMyStreet reports usually come by email. If you reply to the email in your
normal way, your response will go directly into the user's inbox.
<p>Your reply is not published on the FixMyStreet website (unless you are a
-FixMyStreet Professional customer who has chosen this option – see 'Can
+FixMyStreet Pro customer who has chosen this option – see 'Can
FixMyStreet connect directly with council systems?', below).
</dd>
@@ -397,11 +397,11 @@ FixMyStreet about as easy to use as possible.
<dt>FixMyStreet is better than our own reporting system</dt>
<dd>
<p>Then why not replace it with FixMyStreet? We now offer a <a
-href="/about/professional">complete fault-reporting solution for councils</a>, that
+href="/pro/">complete fault-reporting solution for councils</a>, that
integrates with your own website.
<p>It has all the benefits of FixMyStreet's focus on usability, and is a
robust, economical, cloud-based option.
-<p><a href="/council">Read case studies here</a>.
+<p><a href="/pro/">Read case studies here</a>.
</dd>
</dl>
diff --git a/templates/web/fixmystreet.com/contact/blurb.html b/templates/web/fixmystreet.com/contact/blurb.html
index 27412f894..28f6f45a9 100644
--- a/templates/web/fixmystreet.com/contact/blurb.html
+++ b/templates/web/fixmystreet.com/contact/blurb.html
@@ -12,7 +12,7 @@ please <a href="/">go to the front page</a> and follow the instructions.') %]
<h4>From a UK Local Council and interested in finding out about FixMyStreet Pro?</h4>
<p>
- Please get in touch <a href="/about/professional#order">via our sales enquiry form</a>
+ Please look at our <a href="/pro/">dedicated site</a>.
</p>
<h3>Send a message to FixMyStreet's technical support team</h3>
diff --git a/templates/web/fixmystreet.com/footer_extra.html b/templates/web/fixmystreet.com/footer_extra.html
index 6edf23b9f..e958ca35c 100644
--- a/templates/web/fixmystreet.com/footer_extra.html
+++ b/templates/web/fixmystreet.com/footer_extra.html
@@ -31,7 +31,7 @@
%]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>
</ul>
<ul>
- <li><a href="/about/professional">FixMyStreet Professional</a></li>
+ <li><a href="/pro/">FixMyStreet Pro</a></li>
<li><[% IF c.req.uri.path == '/posters' %]span[% ELSE %]a href="[% base %]/posters"[% END
%]>[% loc("FixMyStreet Goodies") %]</[% c.req.uri.path == '/posters' ? 'span' : 'a' %]></li>
<li><[% IF c.req.uri.path == '/contact' %]span[% ELSE %]a href="[% base %]/contact"[% END
diff --git a/templates/web/fixmystreet.com/front/footer-marketing.html b/templates/web/fixmystreet.com/front/footer-marketing.html
index fa9c188d0..2d1acc084 100644
--- a/templates/web/fixmystreet.com/front/footer-marketing.html
+++ b/templates/web/fixmystreet.com/front/footer-marketing.html
@@ -1,8 +1,8 @@
<div class="fms-pro-promo">
- <h2>FixMyStreet Professional</h2>
+ <h2>FixMyStreet Pro</h2>
<p class="lead">The one-stop street reporting service for councils.</p>
<p>Integrate FixMyStreet with your council system for smooth, end-to-end report fullfilment.</p>
- <p><a href="/about/professional" class="btn">Learn more</a></p>
+ <p><a href="/pro/" class="btn">Learn more</a></p>
</div>
<div class="footer-marketing">
diff --git a/templates/web/fixmystreet.com/report/_report_meta_info.html b/templates/web/fixmystreet.com/report/_report_meta_info.html
index f0b3503b9..2eab84c9e 100644
--- a/templates/web/fixmystreet.com/report/_report_meta_info.html
+++ b/templates/web/fixmystreet.com/report/_report_meta_info.html
@@ -1,6 +1,6 @@
[% problem.meta_line(c) | html %]
[% IF c.cobrand.moniker != problem.get_cobrand_logged.moniker AND problem.get_cobrand_logged.is_council %]
- using <a href="https://www.fixmystreet.com/about/professional">FixMyStreet Professional</a>
+ using <a href="https://www.fixmystreet.com/pro/">FixMyStreet Pro</a>
[% END %]
[% IF c.user_exists AND c.user.id == problem.user_id AND !problem.anonymous %]
<small>(<a href="/my/anonymize?problem=[% problem.id | uri %]" class="js-hide-name">[% loc('Hide your name?') %]</a>)</small>
diff --git a/templates/web/fixmystreet.com/report/updates-sidebar-notes.html b/templates/web/fixmystreet.com/report/updates-sidebar-notes.html
index 17e3ade62..e4f8dda1b 100644
--- a/templates/web/fixmystreet.com/report/updates-sidebar-notes.html
+++ b/templates/web/fixmystreet.com/report/updates-sidebar-notes.html
@@ -1,5 +1,5 @@
<p>
- [% IF NOT problem.send_method_used.match('Open311') OR NOT problem.to_body_named('Bromley|Stevenage') %]
+ [% IF NOT problem.updates_sent_to_body %]
[% loc( 'Please note that updates are not sent to the council.' ) %]
[% END %]
[% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]
diff --git a/templates/web/fixmystreet.com/reports/summary.html b/templates/web/fixmystreet.com/reports/summary.html
index 8b7f84f59..11ee5df28 100644
--- a/templates/web/fixmystreet.com/reports/summary.html
+++ b/templates/web/fixmystreet.com/reports/summary.html
@@ -17,8 +17,8 @@
<form method="GET">
<div class="filters">
<p>
- <label for="ward">[% loc('Problems reported in area:') %]</label>
- <select class="form-control" id="ward" name="ward">
+ <label for="area">[% loc('Problems reported in area:') %]</label>
+ <select class="form-control" id="area" name="area">
<option value="">[% body.name %]</option>
[% FOR w IN children.values.sort('name') %]
<option value="[% w.id %]"[% ' selected' IF w.id == ward %]>[% w.name %]</option>
diff --git a/templates/web/greenwich/front/footer-marketing.html b/templates/web/greenwich/front/footer-marketing.html
index 773314aa9..c8b4ae416 100644
--- a/templates/web/greenwich/front/footer-marketing.html
+++ b/templates/web/greenwich/front/footer-marketing.html
@@ -13,7 +13,7 @@
<div id="footer-help">
<p>
- Powered by <a class="platform-logo" href="https://www.fixmystreet.com/about/professional">FixMyStreet Platform</a>
+ Powered by <a class="platform-logo" href="https://www.fixmystreet.com/pro/">FixMyStreet Platform</a>
</p>
</div>
</div>
diff --git a/templates/web/hart/footer.html b/templates/web/hart/footer.html
index 01cf76f9d..5a53fb978 100644
--- a/templates/web/hart/footer.html
+++ b/templates/web/hart/footer.html
@@ -96,7 +96,7 @@
<strong>©</strong>
<a href="http://www.hart.gov.uk/disclaimer" title="More information on the Disclaimer" class="hart">Hart District Council</a>
</p>
- <a href="https://www.fixmystreet.com/about/professional">Powered by <img src="/cobrands/hart/fms-logo.png" alt="FixMyStreet" style="height:20px;"></a>
+ <a href="https://www.fixmystreet.com/pro/">Powered by <img src="/cobrands/hart/fms-logo.png" alt="FixMyStreet" style="height:20px;"></a>
</div>
</div>
</footer>
diff --git a/templates/web/oxfordshire/footer.html b/templates/web/oxfordshire/footer.html
index b7e3d9829..7dd6b6254 100644
--- a/templates/web/oxfordshire/footer.html
+++ b/templates/web/oxfordshire/footer.html
@@ -12,7 +12,7 @@
<div id="main-nav" role="navigation">
[% INCLUDE "main_nav.html" body_name=c.cobrand.council_area omit_wrapper=1 hide_privacy_link=1 %]
<ul class="nav-menu">
- <li><a id="mysoc-logo" href="https://www.fixmystreet.com/about/professional">Powered by <img src="/cobrands/oxfordshire/images/fms-logo-105x20.png" alt="FixMyStreet"></a></li>
+ <li><a id="mysoc-logo" href="https://www.fixmystreet.com/pro/">Powered by <img src="/cobrands/oxfordshire/images/fms-logo-105x20.png" alt="FixMyStreet"></a></li>
</ul>
</div>
</div>
diff --git a/templates/web/oxfordshire/header.html b/templates/web/oxfordshire/header.html
index fce316bf9..a1d42a777 100644
--- a/templates/web/oxfordshire/header.html
+++ b/templates/web/oxfordshire/header.html
@@ -19,6 +19,12 @@
[% INCLUDE 'tracking_code.html' %]
</head>
<body class="[% bodyclass | html IF bodyclass %]">
+
+<!-- Google Tag Manager (noscript) -->
+<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NT76GJ5"
+height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
+<!-- End Google Tag Manager (noscript) -->
+
<div id="oxford-wrapper">
<div id="oxford-header" class="desk-only">
<a href="https://www.oxfordshire.gov.uk/" title="Home" class="logo">Oxfordshire County Council</a>
diff --git a/templates/web/oxfordshire/tracking_code.html b/templates/web/oxfordshire/tracking_code.html
index 7a100f8ad..14afb5de0 100644
--- a/templates/web/oxfordshire/tracking_code.html
+++ b/templates/web/oxfordshire/tracking_code.html
@@ -1,15 +1,12 @@
[% IF c.config.BASE_URL == "https://www.fixmystreet.com" %]
-<script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-22094787-2']);
- _gaq.push(['_setDomainName', '.oxfordshire.gov.uk']);
- _gaq.push(['_setCustomVar',1,'level1','Roads and transport',3]);
- _gaq.push(['_setCustomVar',2,'level2','FixMyStreet',3]);
- _gaq.push(['_trackPageview']);
-
-</script>
+<!-- Google Tag Manager -->
+<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
+new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
+j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
+'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
+})(window,document,'script','dataLayer','GTM-NT76GJ5');</script>
+<!-- End Google Tag Manager -->
[% ELSE %]
<!-- Tracking code not inserted as "[% c.config.BASE_URL %]" not "https://www.fixmystreet.com" -->
diff --git a/templates/web/stevenage/footer.html b/templates/web/stevenage/footer.html
index c2944e97b..d276094c1 100644
--- a/templates/web/stevenage/footer.html
+++ b/templates/web/stevenage/footer.html
@@ -19,7 +19,7 @@
</li>
<li>
<h4>[% loc('Are you from a council?') %]</h4>
- <p>[% loc('Would you like better integration with FixMyStreet? <a href="https://www.fixmystreet.com/about/professional">Find out about FixMyStreet Professional</a>.') %]</p>
+ <p>[% loc('Would you like better integration with FixMyStreet? <a href="https://www.fixmystreet.com/pro/">Find out about FixMyStreet Pro</a>.') %]</p>
</li>
</ul>
</div>
diff --git a/templates/web/warwickshire/around/intro.html b/templates/web/warwickshire/around/intro.html
index 41e5088ad..03786e2e7 100644
--- a/templates/web/warwickshire/around/intro.html
+++ b/templates/web/warwickshire/around/intro.html
@@ -3,5 +3,5 @@
<p>
Please use this form for defect reporting except for Street Lighting.
<br /> For Street Lighting defects please click here:
- <a href="http://www.warwickshire.gov.uk/streetlightingfault">Reporting Street Lighting Faults</a>
+ <a href="https://www.warwickshire.gov.uk/streetlightingfault">Reporting Street Lighting Faults</a>
</p>
diff --git a/templates/web/warwickshire/footer.html b/templates/web/warwickshire/footer.html
index d6d88535c..6f4007781 100644
--- a/templates/web/warwickshire/footer.html
+++ b/templates/web/warwickshire/footer.html
@@ -37,7 +37,7 @@
<div class="span2">
<aside class="widget widget_text" id="text-13">
<div class="textwidget">
- <a href="https://public.govdelivery.com/accounts/UKWarwickshire/subscriber/new"><img src="http://www.warwickshire.gov.uk/wp-content/uploads/2016/05/keep-me-posted-white-on-trans-155x39.png"></a>
+ <a href="https://public.govdelivery.com/accounts/UKWarwickshire/subscriber/new"><img src="https://www.warwickshire.gov.uk/wp-content/uploads/2016/05/keep-me-posted-white-on-trans-155x39.png"></a>
</div>
</aside>
</div>
diff --git a/templates/web/warwickshire/warwickshire_masthead.html b/templates/web/warwickshire/warwickshire_masthead.html
index 1c87d3e89..11afec135 100644
--- a/templates/web/warwickshire/warwickshire_masthead.html
+++ b/templates/web/warwickshire/warwickshire_masthead.html
@@ -15,13 +15,13 @@
</a>
<a href="#maincontent" id="skiptomain">Skip to main content</a>
<a alt="Warwickshire County Council logo" class="brand" href="//www.warwickshire.gov.uk/">
- <img alt="Warwickshire County Council" src="http://www.warwickshire.gov.uk/wp-content/themes/gamma/images/corpwhitelogo.png" style="width:85px;">
+ <img alt="Warwickshire County Council" src="https://www.warwickshire.gov.uk/wp-content/themes/gamma/images/corpwhitelogo.png" style="width:85px;">
</a>
<a alt="Gov Delivery logo" class="gdslogo" href="https://public.govdelivery.com/accounts/UKWarwickshire/subscriber/new">
- <img alt="GDSl" src="http://www.warwickshire.gov.uk/wp-content/themes/gamma/images/keep_me_posted_envelope_17px.png" style="width:17px;">
+ <img alt="GDSl" src="https://www.warwickshire.gov.uk/wp-content/themes/gamma/images/keep_me_posted_envelope_17px.png" style="width:17px;">
</a>
<a alt="Gov Delivery logo" class="govdelmobile pull-right" href="https://public.govdelivery.com/accounts/UKWarwickshire/subscriber/new">
- <img alt="GDSl" src="http://www.warwickshire.gov.uk/wp-content/themes/gamma/images/keep_me_posted_envelope_17px.png" style="width:17px;">
+ <img alt="GDSl" src="https://www.warwickshire.gov.uk/wp-content/themes/gamma/images/keep_me_posted_envelope_17px.png" style="width:17px;">
</a>
<a class="gdstext" href="https://public.govdelivery.com/accounts/UKWarwickshire/subscriber/new">Email alerts</a>
<div class="nav-collapse collapse pull-left" id="right-topbar">
@@ -64,34 +64,34 @@
<a class="dropdown-toggle" data-toggle="dropdown" href="//www.warwickshire.gov.uk">Residents<b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
- <a href="http://www.warwickshire.gov.uk/">Residents - home</a>
+ <a href="//www.warwickshire.gov.uk/">Residents - home</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/environment">Environment</a>
+ <a href="//www.warwickshire.gov.uk/environment">Environment</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/health">Health</a>
+ <a href="//www.warwickshire.gov.uk/health">Health</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/librariesandleisure">Libraries and leisure</a>
+ <a href="//www.warwickshire.gov.uk/librariesandleisure">Libraries and leisure</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/roadsandtravel">Roads and travel</a>
+ <a href="//www.warwickshire.gov.uk/roadsandtravel">Roads and travel</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/registrations">Registrations</a>
+ <a href="//www.warwickshire.gov.uk/registrations">Registrations</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/safetyandcrime">Safety and crime</a>
+ <a href="//www.warwickshire.gov.uk/safetyandcrime">Safety and crime</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/schoolsandlearning">Schools and learning</a>
+ <a href="//www.warwickshire.gov.uk/schoolsandlearning">Schools and learning</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/socialcareandhealth">Social care and support</a>
+ <a href="//www.warwickshire.gov.uk/socialcareandhealth">Social care and support</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/contactus">Customer service and contacts</a>
+ <a href="//www.warwickshire.gov.uk/contactus">Customer service and contacts</a>
</li>
</ul>
</li>
@@ -99,28 +99,28 @@
<a class="dropdown-toggle" data-toggle="dropdown" href="//www.warwickshire.gov.uk/business">Business <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
- <a href="http://www.warwickshire.gov.uk/business">Business - home</a>
+ <a href="//www.warwickshire.gov.uk/business">Business - home</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/businesssupportorganisations">Business support organisations</a>
+ <a href="//www.warwickshire.gov.uk/businesssupportorganisations">Business support organisations</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/growingyourbusiness">Growing your business</a>
+ <a href="//www.warwickshire.gov.uk/growingyourbusiness">Growing your business</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/businesshealthandsafety">Health and safety for businesses</a>
+ <a href="//www.warwickshire.gov.uk/businesshealthandsafety">Health and safety for businesses</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/locatingyourbusiness">Locating your business</a>
+ <a href="//www.warwickshire.gov.uk/locatingyourbusiness">Locating your business</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/otherbusinessservices">Other business services</a>
+ <a href="//www.warwickshire.gov.uk/otherbusinessservices">Other business services</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/businessadvice">Regulatory business service and advice</a>
+ <a href="//www.warwickshire.gov.uk/businessadvice">Regulatory business service and advice</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/startingabusiness">Starting a business</a>
+ <a href="//www.warwickshire.gov.uk/startingabusiness">Starting a business</a>
</li>
</ul>
</li>
@@ -128,40 +128,40 @@
<a class="dropdown-toggle" data-toggle="dropdown" href="//www.warwickshire.gov.uk/corporate">The council <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
- <a href="http://www.warwickshire.gov.uk/corporate">The council - home</a>
+ <a href="//www.warwickshire.gov.uk/corporate">The council - home</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/democracy">Democracy</a>
+ <a href="//www.warwickshire.gov.uk/democracy">Democracy</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/financeandsuppliers">Finance and suppliers</a>
+ <a href="//www.warwickshire.gov.uk/financeandsuppliers">Finance and suppliers</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/jobs">Jobs</a>
+ <a href="//www.warwickshire.gov.uk/jobs">Jobs</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/listsanddata">Lists, data and information</a>
+ <a href="//www.warwickshire.gov.uk/listsanddata">Lists, data and information</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/news">News</a>
+ <a href="//www.warwickshire.gov.uk/news">News</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/organisation">Organisation</a>
+ <a href="//www.warwickshire.gov.uk/organisation">Organisation</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/performance">Our performance</a>
+ <a href="//www.warwickshire.gov.uk/performance">Our performance</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/partnerships">Partnerships</a>
+ <a href="//www.warwickshire.gov.uk/partnerships">Partnerships</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/policies">Policies, standards and legislation</a>
+ <a href="//www.warwickshire.gov.uk/policies">Policies, standards and legislation</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/projects">Projects</a>
+ <a href="//www.warwickshire.gov.uk/projects">Projects</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/strategies">Strategies and priorities</a>
+ <a href="//www.warwickshire.gov.uk/strategies">Strategies and priorities</a>
</li>
</ul>
</li>
@@ -181,10 +181,10 @@
<a href="http://invest.warwickshire.gov.uk/">Invest in Warwickshire</a>
</li>
<li>
- <a href="http://www.warwickshire.gov.uk/jobs">Jobs</a>
+ <a href="//www.warwickshire.gov.uk/jobs">Jobs</a>
</li>
<li>
- <a href="http://www.livingwellwithdementia.org/">Living well with dementia</a>
+ <a href="https://dementia.warwickshire.gov.uk/">Living well with dementia</a>
</li>
<li>
<a href="http://laf.warwickshire.gov.uk/">Local Access Forum</a>
@@ -216,4 +216,4 @@
</div>
</div>
</div>
-</div> \ No newline at end of file
+</div>
diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html
index 07fc9ad36..0319fc565 100644
--- a/templates/web/zurich/admin/report_edit-sdm.html
+++ b/templates/web/zurich/admin/report_edit-sdm.html
@@ -62,7 +62,7 @@
<strong>[% IF problem.name %][% problem.name | html %][% ELSE %][% loc('(No name)') %][% END %]</strong>
<input type='hidden' name='name' id='name' value='[% problem.name | html %]'>
<br>
- [% problem.user.email | html %]
+ <a href="mailto:[% problem.user.email | html %]">[% problem.user.email | html %]</a>
[% IF NOT problem.extra.email_confirmed %]<span class="error">[% loc('Unconfirmed') %]</span>[% END %]
<input type='hidden' id='username' name='username' value='[% problem.user.username | html %]'>
<br>
diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html
index 7e88fab30..fd03fb044 100644
--- a/templates/web/zurich/admin/report_edit.html
+++ b/templates/web/zurich/admin/report_edit.html
@@ -90,7 +90,7 @@
<strong>[% IF problem.name %][% problem.name | html %][% ELSE %][% loc('(No name)') %][% END %]</strong>
<input type='hidden' name='name' id='name' value='[% problem.name | html %]'>
<br>
- [% problem.user.email | html %]
+ <a href="mailto:[% problem.user.email | html %]">[% problem.user.email | html %]</a>
[% IF NOT problem.extra.email_confirmed %]<span class="error">[% loc('Unconfirmed') %]</span>[% END %]
<input type='hidden' id='username' name='username' value='[% problem.user.username | html %]'>
<br>
@@ -117,10 +117,10 @@
</div>
<input type="submit" name="rotate_photo_[% loop.index %]" value="[% loc('Rotate Left') %]" class="screen-only">
<input type="submit" name="rotate_photo_[% loop.index %]" value="[% loc('Rotate Right') %]" class="screen-only">
+ <br>
+ <input type="checkbox" id="publish_photo_[% loop.index %]" name="publish_photo_[% loop.index %]" value="1"[% ' checked' IF problem.extra.publish_photo.${loop.index} %] class="screen-only">
+ <label class="inline screen-only" for="publish_photo_[% loop.index %]">[% loc("Publish photo") %]</label></li>
[% END %]
- <br>
- <input type="checkbox" id="publish_photo" name="publish_photo" value="1"[% ' checked' IF problem.extra.publish_photo %] class="screen-only">
- <label class="inline screen-only" for="publish_photo">[% loc("Publish photo") %]</label></li>
[% END %]
</dl>
diff --git a/templates/web/zurich/report/_item.html b/templates/web/zurich/report/_item.html
index 560cbac51..ccae84271 100644
--- a/templates/web/zurich/report/_item.html
+++ b/templates/web/zurich/report/_item.html
@@ -1,7 +1,9 @@
<li class="item-list__item item-list--reports__item">
<a href="[% c.uri_for('/report', problem.id ) %]">
- [% IF problem.state != 'unconfirmed' AND problem.photo AND c.cobrand.allow_photo_display(problem) %]
- <img class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt="">
+ [% photo_to_display = c.cobrand.allow_photo_display(problem) %]
+ [% IF problem.state != 'unconfirmed' AND problem.photo AND photo_to_display %]
+ [% photo_idx = photo_to_display - 1 ~%]
+ <img class="img" height="60" width="90" src="[% problem.photos.${photo_idx}.url_fp %]" alt="">
[% END %]
[% IF problem.state != 'unconfirmed' %]
<h3 class="item-list__heading">[% problem.title | html %]</h3>
diff --git a/templates/web/zurich/report/_main.html b/templates/web/zurich/report/_main.html
index b868c03e2..912e8b0c9 100644
--- a/templates/web/zurich/report/_main.html
+++ b/templates/web/zurich/report/_main.html
@@ -6,9 +6,7 @@
</p>
[% IF problem.state != 'unconfirmed' %]
- [% IF c.cobrand.allow_photo_display(problem) %]
- [% INCLUDE 'report/photo.html' object=problem %]
- [% END %]
+ [% INCLUDE 'report/photo.html' object=problem %]
[% problem.detail | add_links | html_para %]
[% ELSE %]
[% loc('This report is awaiting moderation.') %]
diff --git a/templates/web/zurich/reports/index.html b/templates/web/zurich/reports/index.html
index 1389c666c..d6d7a541a 100755
--- a/templates/web/zurich/reports/index.html
+++ b/templates/web/zurich/reports/index.html
@@ -1,4 +1,5 @@
[%
+ PROCESS "report/photo-js.html";
PROCESS "maps/${map.type}.html";
SET bodyclass = 'mappage';
INCLUDE 'header.html',
@@ -13,6 +14,7 @@
<h1>[% loc('All Reports') %]</h1>
<section class="full-width">
+ [% INCLUDE "reports/_list-filters.html", use_form_wrapper = 1 %]
<div class="js-pagination">
[% INCLUDE 'pagination.html', param = 'p' %]
</div>
diff --git a/web/cobrands/borsetshire/_council-header.scss b/web/cobrands/borsetshire/_council-header.scss
index 73d531489..750c11ce0 100644
--- a/web/cobrands/borsetshire/_council-header.scss
+++ b/web/cobrands/borsetshire/_council-header.scss
@@ -1,5 +1,5 @@
.nav-wrapper {
- top: 5em;
+ top: 7.5em;
}
#main-nav {
diff --git a/web/cobrands/borsetshire/_mysoc-header.scss b/web/cobrands/borsetshire/_mysoc-header.scss
new file mode 100644
index 000000000..f1143736c
--- /dev/null
+++ b/web/cobrands/borsetshire/_mysoc-header.scss
@@ -0,0 +1,62 @@
+// Adapted from .ms-header component in FMS Pro WordPress theme.
+
+.ms-header {
+ background-color: #3B3F44;
+ color: #fff;
+}
+
+.ms-header__logo,
+.ms-header__back-to-fms {
+ box-sizing: border-box;
+ margin: 10px 0;
+}
+
+.ms-header__logo {
+ @media (min-width: 48em) {
+ float: right;
+ width: 25%;
+ }
+ padding-left: 1em;
+
+ a {
+ display: block;
+ width: 101px;
+ height: 0;
+ padding-top: 21px;
+ overflow: hidden;
+ background: transparent;
+ background-position: 0 0;
+ background-repeat: no-repeat;
+ background-size: 101px 21px;
+ @include svg-background-image('../fixmystreet.com/images/mysoc-footer/logo-mysociety');
+
+ // Centre on narrow screens, right align on wider screens.
+ margin: 0 auto;
+ @media (min-width: 48em) {
+ margin-right: 0;
+ }
+ }
+}
+
+.ms-header__back-to-fms {
+ @media (min-width: 48em) {
+ width: 75%;
+ float: left;
+ }
+
+ padding-right: 1em;
+
+ display: block; // .ms-header__back-to-fms is an <a> element
+
+ color: #ddd;
+ font-size: 0.875em;
+
+ &:visited {
+ color: #ddd;
+ }
+ &:hover,
+ &:focus {
+ color: #fff;
+ text-decoration: none;
+ }
+}
diff --git a/web/cobrands/borsetshire/base.scss b/web/cobrands/borsetshire/base.scss
index a92d54427..10973fea2 100644
--- a/web/cobrands/borsetshire/base.scss
+++ b/web/cobrands/borsetshire/base.scss
@@ -115,3 +115,5 @@ body.authpage {
.btn--borsetshire {
@include button-reset($text: #000, $hover-text: #000);
}
+
+@import "mysoc-header";
diff --git a/web/cobrands/fixmystreet.com/base.scss b/web/cobrands/fixmystreet.com/base.scss
index 029749ec1..0cc23c539 100644
--- a/web/cobrands/fixmystreet.com/base.scss
+++ b/web/cobrands/fixmystreet.com/base.scss
@@ -9,7 +9,6 @@
@import "../sass/h5bp";
@import "_colours";
@import "../sass/base";
-@import "../sass/top-banner";
// Don't need these styles from core any more,
// as we do funky stuff with the FMS.com logo.
diff --git a/web/cobrands/fixmystreet/offline.js b/web/cobrands/fixmystreet/offline.js
index 18d724e8c..a611cfec0 100644
--- a/web/cobrands/fixmystreet/offline.js
+++ b/web/cobrands/fixmystreet/offline.js
@@ -11,9 +11,9 @@ fixmystreet.offlineBanner = (function() {
function formText() {
var num = fixmystreet.offlineData.getForms().length;
if ( num === 1 ) {
- return num + translation_strings.offline.update_single;
+ return num + ' ' + translation_strings.offline.update_single;
} else {
- return num + translation_strings.offline.update_plural;
+ return num + ' ' + translation_strings.offline.update_plural;
}
}
@@ -338,12 +338,16 @@ fixmystreet.offline = (function() {
});
}
- $('#report_inspect_form').submit(function() {
+ // If we catch the form submit, e.g. Chrome still seems to
+ // try and submit and we get the Chrome offline error page
+ var btn = $('#report_inspect_form input[type=submit]');
+ btn.click(function() {
var data = $(this).serialize() + '&save=1&saved_at=' + Math.floor(+new Date() / 1000);
fixmystreet.offlineData.addForm(this.action, data);
location.href = '/my/planned?saved=1';
return false;
});
+ btn[0].type = 'button';
return true;
}
diff --git a/web/cobrands/oxfordshire/base.scss b/web/cobrands/oxfordshire/base.scss
index 55bd2f436..85fe0fbdf 100644
--- a/web/cobrands/oxfordshire/base.scss
+++ b/web/cobrands/oxfordshire/base.scss
@@ -3,7 +3,6 @@
@import "../sass/mixins";
@import "../sass/base";
-@import "../sass/top-banner";
@import "../sass/report_list_pins";
#site-logo {
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss
index 109a67d64..41075907f 100644
--- a/web/cobrands/sass/_base.scss
+++ b/web/cobrands/sass/_base.scss
@@ -2389,3 +2389,4 @@ a#geolocate_link.loading, .btn--geolocate.loading {
@import "_multiselect";
@import "_autocomplete";
@import "_dashboard";
+@import "_top-banner";
diff --git a/web/cobrands/warwickshire/vendor/gamma/print.css b/web/cobrands/warwickshire/vendor/gamma/print.css
index ac40d74d3..089386cae 100644
--- a/web/cobrands/warwickshire/vendor/gamma/print.css
+++ b/web/cobrands/warwickshire/vendor/gamma/print.css
@@ -12,7 +12,7 @@
}
/* header image added DJ - 17-02-2016 */
header:before {
- content: url(http://www.warwickshire.gov.uk/wp-content/uploads/2016/02/WCC-Logo.gif);
+ content: url(https://www.warwickshire.gov.uk/wp-content/uploads/2016/02/WCC-Logo.gif);
}
/*header.entry-header {left:none;}*/
@@ -66,7 +66,7 @@ header:before {
}
/*footer {
- content: url(http://www.warwickshire.gov.uk/wp-content/uploads/2016/02/footer-text.jpg);
+ content: url(https://www.warwickshire.gov.uk/wp-content/uploads/2016/02/footer-text.jpg);
}
*/
diff --git a/web/cobrands/warwickshire/vendor/gamma/style.css b/web/cobrands/warwickshire/vendor/gamma/style.css
index a558d761f..d9090a888 100644
--- a/web/cobrands/warwickshire/vendor/gamma/style.css
+++ b/web/cobrands/warwickshire/vendor/gamma/style.css
@@ -8913,7 +8913,7 @@ border-radius:5px;
font-weight:500;
color:white;
text-decoration:none;
- /* background-image: url(http://www.warwickshire.gov.uk/Web/corporate/wccweb.nsf/Links/B6876CFE9798941F80257855005D6E89/$file/menu-arrow.png);*/
+ /* background-image: url(//www.warwickshire.gov.uk/Web/corporate/wccweb.nsf/Links/B6876CFE9798941F80257855005D6E89/$file/menu-arrow.png);*/
background-size:25px 20px;
background-repeat:no-repeat;
background-position: 130px 15px;
@@ -8936,7 +8936,7 @@ border-radius:5px;
font-weight:500;
color:white;
text-decoration:none;
- background-image: url(http://www.warwickshire.gov.uk/Web/corporate/wccweb.nsf/Links/B6876CFE9798941F80257855005D6E89/$file/menu-arrow2.png);
+ background-image: url(//www.warwickshire.gov.uk/Web/corporate/wccweb.nsf/Links/B6876CFE9798941F80257855005D6E89/$file/menu-arrow2.png);
background-size:25px 20px;
background-repeat:no-repeat;
background-position: 155px 15px;
@@ -8960,7 +8960,7 @@ border-radius:5px;
/* background: -ms-linear-gradient(left, #0F7C4B 39%,#0F8E50 100%); /* IE10+ */
/* background: linear-gradient(to right, #0F7C4B 39%,#0F8E50 100%); /* W3C */
/* filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0F7C4B', endColorstr='#0F8E50',GradientType=1 );
-/* background-image: url(http://www.warwickshire.gov.uk/Web/corporate/wccweb.nsf/Links/B6876CFE9798941F80257855005D6E89/$file/menu-arrow.png);
+/* background-image: url(//www.warwickshire.gov.uk/Web/corporate/wccweb.nsf/Links/B6876CFE9798941F80257855005D6E89/$file/menu-arrow.png);
background-size:25px 20px;
background-position: 130px 15px;*/
/* background-repeat:no-repeat; */
@@ -8969,7 +8969,7 @@ border-radius:5px;
.style-2 ul#super-menu li a:hover {
background: rgb(0, 85, 161);
- /* background-image: url(http://www.warwickshire.gov.uk/Web/corporate/wccweb.nsf/Links/B6876CFE9798941F80257855005D6E89/$file/menu-arrow2.png);*/
+ /* background-image: url(//www.warwickshire.gov.uk/Web/corporate/wccweb.nsf/Links/B6876CFE9798941F80257855005D6E89/$file/menu-arrow2.png);*/
background-repeat: no-repeat;
background-size:25px 20px;
background-position: 155px 15px;
@@ -8982,7 +8982,7 @@ border-radius:5px;
background-color: #F2F5F2;
background: #F2F5F2;
background-image: url(//www.warwickshire.gov.uk/wp-content/uploads/2014/10/menu-arrow1.png);
- /* background-image: url(http://www.warwickshire.gov.uk/Web/corporate/wccweb.nsf/Links/B6876CFE9798941F80257855005D6E89/$file/menu-arrow2.png); */
+ /* background-image: url(//www.warwickshire.gov.uk/Web/corporate/wccweb.nsf/Links/B6876CFE9798941F80257855005D6E89/$file/menu-arrow2.png); */
background-size: 25px 20px;
background-repeat: no-repeat;
background-position: 130px 15px;
@@ -9272,15 +9272,15 @@ border-bottom: solid 1px #FFFFFF;
/*.style-5 ul#super-menu li a:hover, .style-4 ul#super-menu li a:hover {
.style-5 ul#super-menu li a:hover {
-background-image: url(http://www.warwickshire.gov.uk/Web/corporate/wccweb.nsf/Links/B6876CFE9798941F80257855005D6E89/$file/menu-arrow2.png);
+background-image: url(//www.warwickshire.gov.uk/Web/corporate/wccweb.nsf/Links/B6876CFE9798941F80257855005D6E89/$file/menu-arrow2.png);
}*/
.style-4 ul#super-menu li.active a{
-background-image: url(http://www.warwickshire.gov.uk/wp-content/uploads/2014/10/menu-arrow4.png);
+background-image: url(//www.warwickshire.gov.uk/wp-content/uploads/2014/10/menu-arrow4.png);
color:#666666;
}
.style-5 ul#super-menu li.active a{
-background-image: url(http://www.warwickshire.gov.uk/wp-content/uploads/2013/06/menu-arrow5.png);
+background-image: url(//www.warwickshire.gov.uk/wp-content/uploads/2013/06/menu-arrow5.png);
color:#666666;
}
@@ -10777,7 +10777,7 @@ h3.home-header {
#home-social {background-image:url(//www.warwickshire.gov.uk/wp-content/uploads/2014/10/wd-socialcare.png);}
#home-events {background-image:url(//www.warwickshire.gov.uk/wp-content/uploads/2014/10/wd-events.png);}
#home-council {background-image:url(//www.warwickshire.gov.uk/wp-content/uploads/2014/10/wd-council.png);}
-#home-audience {background-image:url(http://www.warwickshire.gov.uk/wp-content/uploads/2014/10/wd-volunteering.png);}
+#home-audience {background-image:url(//www.warwickshire.gov.uk/wp-content/uploads/2014/10/wd-volunteering.png);}
#home-a-z {background-image:none; margin-left: -1.5em;}
@@ -11543,4 +11543,4 @@ font-family:helvetica!important;
font-size:14px;
}
-} \ No newline at end of file
+}
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 1d417f68e..7f8ec1755 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -240,9 +240,6 @@ $.extend(fixmystreet.utils, {
strategy.deactivate();
var center = bounds.getCenterLonLat();
var z = fixmystreet.map.getZoomForExtent(bounds);
- if ( z < 13 && $('html').hasClass('mobile') ) {
- z = 13;
- }
fixmystreet.map.setCenter(center, z);
// Reactivate the strategy and make it think it's done an update
strategy.activate();
@@ -858,10 +855,10 @@ OpenLayers.Protocol.FixMyStreet = OpenLayers.Class(OpenLayers.Protocol.HTTP, {
$('#loading-indicator').removeClass('hidden');
$('#loading-indicator').attr('aria-hidden', false);
// Pass the values of the category, status, and sort fields as query params
+ options.params = options.params || {};
$.each({ filter_category: 'filter_categories', status: 'statuses', sort: 'sort' }, function(key, id) {
var val = $('#' + id).val();
if (val !== undefined) {
- options.params = options.params || {};
options.params[key] = val;
}
});