diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2014-02-19 18:01:45 +0000 |
---|---|---|
committer | Hakim Cassimally <hakim@mysociety.org> | 2014-03-05 09:47:55 +0000 |
commit | 13f4bc9ccde5b73858785c96a63451842273fda6 (patch) | |
tree | 3856049a2e4d76b6e63f90ee866c3b38f7359236 | |
parent | cde0118c45ceffef62f777b5aadd9789685582bd (diff) |
[Hart] Guidance related to two_tier, e.g. HCC
Guidance in prominent places (report, all reports, and message
on confirming problem.)
Should alleviate mysociety/FixMyStreet-Commercial#481 and
mysociety/FixMyStreet-Commercial#485
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UKCouncils.pm | 12 | ||||
-rwxr-xr-x | templates/web/default/reports/body.html | 4 | ||||
-rw-r--r-- | templates/web/fixmystreet/my/my.html | 2 | ||||
-rw-r--r-- | templates/web/hart/_hart_hants_note.html | 5 | ||||
-rw-r--r-- | templates/web/hart/index-steps.html | 20 | ||||
-rw-r--r-- | templates/web/hart/report/new/councils_extra_text.html | 9 | ||||
-rw-r--r-- | templates/web/hart/tokens/confirm_problem.html | 21 | ||||
-rw-r--r-- | web/cobrands/hart/hart.scss | 5 |
8 files changed, 75 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index 2c18d4e22..ec3423f35 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -99,13 +99,19 @@ sub recent_photos { return $self->problems->recent_photos( $num, $lat, $lon, $dist ); } +# Returns true if the cobrand owns the problem. +sub owns_problem { + my ($self, $report) = @_; + my $bodies = $report->bodies; + my %areas = map { %{$_->areas} } values %$bodies; + return $areas{$self->council_id} ? 1 : undef; +} + # If we ever link to a county problem report, needs to be to main FixMyStreet sub base_url_for_report { my ( $self, $report ) = @_; if ( $self->is_two_tier ) { - my $bodies = $report->bodies; - my %areas = map { %{$_->areas} } values %$bodies; - if ( $areas{$self->council_id} ) { + if ( $self->owns_problem( $report ) ) { return $self->base_url; } else { return FixMyStreet->config('BASE_URL'); diff --git a/templates/web/default/reports/body.html b/templates/web/default/reports/body.html index 8a443a5fe..2b19e5735 100755 --- a/templates/web/default/reports/body.html +++ b/templates/web/default/reports/body.html @@ -39,6 +39,10 @@ [% END %] </h1> +[% IF c.cobrand.moniker == 'hart' %] + [% INCLUDE '_hart_hants_note.html' %] +[% END %] + [% IF NOT body.areas.size AND c.cobrand.country == 'GB' %] <p id="unknown" class="alert">This council no longer exists. [% IF council.name.match('Penwith|Kerrier|Carrick|Restormel|Caradon|North Cornwall') %] diff --git a/templates/web/fixmystreet/my/my.html b/templates/web/fixmystreet/my/my.html index 389e907a3..5c4ccf2af 100644 --- a/templates/web/fixmystreet/my/my.html +++ b/templates/web/fixmystreet/my/my.html @@ -20,6 +20,8 @@ [% IF c.cobrand.moniker == 'fixmybarangay' %] [% INCLUDE '_barangay_buttons.html' %] +[% ELSIF c.cobrand.moniker == 'hart' %] + [% INCLUDE '_hart_hants_note.html' %] [% END %] [% INCLUDE 'pagination.html', diff --git a/templates/web/hart/_hart_hants_note.html b/templates/web/hart/_hart_hants_note.html new file mode 100644 index 000000000..a091ad3fc --- /dev/null +++ b/templates/web/hart/_hart_hants_note.html @@ -0,0 +1,5 @@ +<div id="hart_hants_note"> + Note that reports managed by Hampshire County Council are not shown on + this map. View those reports on + <a href="http://www.fixmystreet.com/reports/Hampshire">FixMyStreet.com</a> +</div> diff --git a/templates/web/hart/index-steps.html b/templates/web/hart/index-steps.html new file mode 100644 index 000000000..8db031cf8 --- /dev/null +++ b/templates/web/hart/index-steps.html @@ -0,0 +1,20 @@ +<h2>[% loc('How to report a problem') %]</h2> + +<ol class="big-numbers"> + <li>[% question %]</li> + <li>[% loc('Locate the problem on a map of the area') %]</li> + <li>[% loc('Enter details of the problem') %]</li> + <li>Confirm the report and [% c.cobrand.council_name %] will investigate</li> +</ol> + +<div id="hart_hants_note"> + This site can also be used to report problems to Hampshire County Council via FixMyStreet. +</div> + +[% 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/hart/report/new/councils_extra_text.html b/templates/web/hart/report/new/councils_extra_text.html index 91cceca11..e3e5fb27e 100644 --- a/templates/web/hart/report/new/councils_extra_text.html +++ b/templates/web/hart/report/new/councils_extra_text.html @@ -1 +1,10 @@ +<div id="hart_hants_note"> +<p> +<b>NB:</b> though we will forward your request as appropriate, +reports for problems managed by Hampshire County Council are not shown on this map. +View all problems in this area on +<a href="http://www.fixmystreet.com/reports/Hampshire">FixMyStreet.com</a>. +</p> +</div> + Do not use this to <a href="/faq#emergencies">report emergencies outside of working hours</a>. diff --git a/templates/web/hart/tokens/confirm_problem.html b/templates/web/hart/tokens/confirm_problem.html new file mode 100644 index 000000000..117d2d1bc --- /dev/null +++ b/templates/web/hart/tokens/confirm_problem.html @@ -0,0 +1,21 @@ +[% INCLUDE 'header.html', title = loc('Confirmation') %] + +<h1>[% loc('Confirmation') %]</h1> + +<p class="confirmed"> +Thank you. You have successfully confirmed your report +[% IF c.cobrand.owns_problem( problem ) %] +and this will now be investigated by the council. +You can <a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %]">view the problem on this site</a>. +[% ELSE %] +and this has now been passed on to [%# TODO make this generic %] <b>Hampshire County Council</b> to investigate. +Note that Hart District Council is not responsible for this type of problem. However you can continue to view your problem on the <a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %]"><i>fixmystreet.com</i> website</a>. +[% END %] +</p> + +<p>Your reference for this problem is [% problem.id %], please quote it in any enquiries. +</p> + +[% display_crosssell_advert( problem.user.email, problem.name ) %] + +[% INCLUDE 'footer.html' %] diff --git a/web/cobrands/hart/hart.scss b/web/cobrands/hart/hart.scss index 9345a5141..0368ced64 100644 --- a/web/cobrands/hart/hart.scss +++ b/web/cobrands/hart/hart.scss @@ -442,3 +442,8 @@ body.mappage .hart-footer-wrapper { top: 12em; } +#hart_hants_note { + background-color: lighten($hart_primary, 30%); + padding: 0.5em; + font-size: 0.8em; +} |