diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2015-01-08 13:31:30 +0000 |
---|---|---|
committer | Hakim Cassimally <hakim@mysociety.org> | 2015-01-08 13:31:30 +0000 |
commit | 8595114fe90a1213af696d3040fc7620c73429b5 (patch) | |
tree | 141e6f654e66f9bb28cf4061ef238f5069946a3b | |
parent | 252389d2bcb9981b60d8eaebec33046380383067 (diff) | |
parent | 8bee19d0f2259c4ddfe1eb3d99d249d63197a047 (diff) |
Merge branch 'harrogate-candidate'
23 files changed, 949 insertions, 17 deletions
diff --git a/bin/generate_council_location b/bin/generate_council_location index c7aea8074..c7aea8074 100644..100755 --- a/bin/generate_council_location +++ b/bin/generate_council_location diff --git a/perllib/FixMyStreet/Cobrand/Harrogate.pm b/perllib/FixMyStreet/Cobrand/Harrogate.pm new file mode 100644 index 000000000..7249bcece --- /dev/null +++ b/perllib/FixMyStreet/Cobrand/Harrogate.pm @@ -0,0 +1,242 @@ +package FixMyStreet::Cobrand::Harrogate; +use base 'FixMyStreet::Cobrand::UKCouncils'; + +use strict; +use warnings; +use feature 'say'; + +sub council_id { return 2407; } +sub council_area { return 'Harrogate'; } +sub council_name { return 'Harrogate Borough Council'; } +sub council_url { return 'harrogate'; } +sub is_two_tier { return 1; } # with North Yorkshire CC 2235 + +sub disambiguate_location { + my $self = shift; + my $string = shift; + + my $town = 'Harrogate'; + + # as it's the requested example location, try to avoid a disambiguation page + $town .= ', HG1 1DH' if $string =~ /^\s*king'?s\s+r(?:oa)?d\s*(?:,\s*har\w+\s*)?$/i; + + return { + %{ $self->SUPER::disambiguate_location() }, + town => $town, + centre => '54.0671557690306,-1.59581319536637', + span => '0.370193897090822,0.829517054931808', + bounds => [ 53.8914112467619, -2.00450542308575, 54.2616051438527, -1.17498836815394 ], + }; +} + +sub example_places { + return ( 'HG1 2SG', "King's Road" ); +} + +sub enter_postcode_text { + my ($self) = @_; + return 'Enter a Harrogate district postcode, or street name and area'; +} + +# increase map zoom level so street names are visible +sub default_map_zoom { return 3; } + + +=head2 temp_email_to_update, temp_update_contacts + +Temporary helper routines to update the extra for potholes (temporary setup +hack, cargo-culted from ESCC, may in future be superseded either by +Open311/integration or a better mechanism for manually creating rich contacts). + +Can run with a script or command line like: + + bin/cron-wrapper perl -MFixMyStreet::App -MFixMyStreet::Cobrand::Harrogate -e \ + 'FixMyStreet::Cobrand::Harrogate->new({c => FixMyStreet::App->new})->temp_update_contacts' + +=cut + +sub temp_email_to_update { + return 'test@example.com'; +} + +sub temp_update_contacts { + my $self = shift; + + my $contact_rs = $self->{c}->model('DB::Contact'); + + my $email = $self->temp_email_to_update; + my $_update = sub { + my ($category, $field, $category_details) = @_; + # NB: we're accepting just 1 field, but supply as array [ $field ] + + my $contact = $contact_rs->find_or_create( + { + body_id => $self->council_id, + category => $category, + + confirmed => 1, + deleted => 0, + email => $email, + editor => 'automated script', + note => '', + send_method => '', + whenedited => \'NOW()', + %{ $category_details || {} }, + }, + { + key => 'contacts_body_id_category_idx' + } + ); + + say "Editing category: $category"; + + my %default = ( + variable => 'true', + order => '1', + required => 'no', + datatype => 'string', + datatype_description => 'a string', + ); + + if ($field->{datatype} || '' eq 'boolean') { + my $description = $field->{description}; + %default = ( + %default, + datatype => 'singlevaluelist', + datatype_description => 'Yes or No', + values => { value => [ + { key => ['No'], name => ['No'] }, + { key => ['Yes'], name => ['Yes'] }, + ] }, + ); + } + + $contact->update({ + extra => [ { %default, %$field } ], + confirmed => 1, + deleted => 0, + editor => 'automated script', + whenedited => \'NOW()', + note => 'Edited by script as per requirements Dec 2014', + }); + }; + + $_update->( 'Abandoned vehicles', { + code => 'registration', + description => 'Vehicle Registration number:', + }); + + $_update->( 'Dead animals', { + code => 'INFO_TEXT', + variable => 'false', + description => 'We do not remove small species, e.g. squirrels, rabbits, and small birds.', + }); + + $_update->( 'Flyposting', { + code => 'offensive', + description => 'Is it offensive?', + datatype => 'boolean', # mapped onto singlevaluelist + }); + + $_update->( 'Flytipping', { + code => 'size', + description => 'Size?', + datatype => 'singlevaluelist', + values => { value => [ + { key => ['Single Item'], name => ['Single item'] }, + { key => ['Car boot load'], name => ['Car boot load'] }, + { key => ['Small van load'], name => ['Small van load'] }, + { key => ['Transit van load'], name => ['Transit van load'] }, + { key => ['Tipper lorry load'], name => ['Tipper lorry load'] }, + { key => ['Significant load'], name => ['Significant load'] }, + ] }, + }); + + $_update->( 'Graffiti', { + code => 'offensive', + description => 'Is it offensive?', + datatype => 'boolean', # mapped onto singlevaluelist + }); + + $_update->( 'Parks and playgrounds', { + code => 'dangerous', + description => 'Is it dangerous or could cause injury?', + datatype => 'boolean', # mapped onto singlevaluelist + }); + + $_update->( 'Trees', { + code => 'dangerous', + description => 'Is it dangerous or could cause injury?', + datatype => 'boolean', # mapped onto singlevaluelist + }); + + # also ensure that the following categories are created: + for my $category ( + 'Car parking', + 'Dog and litter bins', + 'Dog fouling', + 'Other', + 'Rubbish (refuse and recycling)', + 'Street cleaning', + 'Street lighting', + 'Street nameplates', + ) { + say "Creating $category if required"; + my $contact = $contact_rs->find_or_create( + { + body_id => $self->council_id, + category => $category, + confirmed => 1, + deleted => 0, + email => $email, + editor => 'automated script', + note => 'Created by script as per requirements Dec 2014', + send_method => '', + whenedited => \'NOW()', + } + ); + } + + my @to_delete = ( + 'Parks/landscapes', # delete in favour of to parks and playgrounds + 'Public toilets', # as no longer in specs + ); + say sprintf "Deleting: %s (if present)", join ',' => @to_delete; + $contact_rs->search({ + body_id => $self->council_id, + category => \@to_delete, + deleted => 0 + })->update({ + deleted => 1, + editor => 'automated script', + whenedited => \'NOW()', + note => 'Deleted by script as per requirements Dec 2014', + }); +} + +sub contact_email { + my $self = shift; + return join( '@', 'customerservices', 'harrogate.gov.uk' ); +} + +sub process_additional_metadata_for_email { + my ($self, $problem, $h) = @_; + + my $additional = ''; + if (my $extra = $problem->extra) { + $additional = join "\n\n", map { + if ($_->{name} eq 'INFO_TEXT') { + (); + } + else { + sprintf '%s: %s', $_->{description}, $_->{value}; + } + } @$extra; + $additional = "\n\n$additional" if $additional; + } + + $h->{additional_information} = $additional; +} + +1; + diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm index 5d70bf47d..d3c016be6 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm @@ -323,6 +323,10 @@ sub send_reports { $h{user_details} .= sprintf(_('Email: %s'), $row->user->email) . "\n\n"; } + if ($cobrand->can('process_additional_metadata_for_email')) { + $cobrand->process_additional_metadata_for_email($row, \%h); + } + my %reporters = (); my ( $sender_count ); if ($site eq 'emptyhomes') { diff --git a/templates/email/harrogate/submit.txt b/templates/email/harrogate/submit.txt new file mode 100644 index 000000000..87df45c0c --- /dev/null +++ b/templates/email/harrogate/submit.txt @@ -0,0 +1,43 @@ +Subject: Problem Report: <?=$values['title']?> + +Dear <?=$values['bodies_name']?>, + +<?=$values['missing']?><?=$values['multiple']?>A user of +FixMyStreet has submitted the following report +of a local problem that they believe might require your attention. + +<?=$values['fuzzy']?>, or to provide an update on the problem, +please visit the following link: + + <?=$values['url']?> + +<?=$values['has_photo']?>---------- + +Name: <?=$values['name']?> + +Email: <?=$values['email']?> + +<?=$values['phone_line']?><?=$values['category_line']?>Subject: <?=$values['title']?> + +<?=$values['detail']?> <?=$values['additional_information']?> + +<?=$values['easting_northing']?>Latitude: <?=$values['latitude']?> + +Longitude: <?=$values['longitude']?> + +<?=$values['closest_address']?>---------- + +Replies to this email will go to the user who submitted the problem. + +<?=$values['signature']?> + +This message was sent via FixMyStreet, a project of UKCOD, registered charity +number 1076346. If there is a more appropriate email address for messages about +<?=$values['category_footer']?>, please let us know by visiting <https://www.fixmystreet.com/contact>. +This will help improve the service for local people. We +also welcome any other feedback you may have. + +FixMyStreet is now available for full integration into council +websites, making life easier for both you and your residents. +Read more here: https://www.mysociety.org/services/fixmystreet-for-councils/ + diff --git a/templates/web/base/auth/change_password.html b/templates/web/base/auth/change_password.html index 5f2861aa3..b4170c23e 100644 --- a/templates/web/base/auth/change_password.html +++ b/templates/web/base/auth/change_password.html @@ -1,4 +1,4 @@ -[% INCLUDE 'header.html', title = loc('Change password') %] +[% INCLUDE 'header.html', title = loc('Change password'), bodyclass = 'authpage' %] <h1>[% loc('Change password') %]</h1> diff --git a/templates/web/base/report/new/category_extras.html b/templates/web/base/report/new/category_extras.html index 928b61041..6b15cbef9 100644 --- a/templates/web/base/report/new/category_extras.html +++ b/templates/web/base/report/new/category_extras.html @@ -11,14 +11,16 @@ <div class="form-field"> <label for="form_[% meta_name %]">[% meta.description _ ':' %]</label> - [% IF meta.exists('values') %] - <select name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> - [% FOR option IN meta.values.value.value %] - <option value="[% option.key.0 %]"[% IF option.key.0 == report_meta.$meta_name.value %] selected[% END %]>[% option.name.0 %]</option> + [% IF meta.variable != 'false' %] + [% IF meta.exists('values') + <select name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> + [% FOR option IN meta.values.value.value %] + <option value="[% option.key.0 %]"[% IF option.key.0 == report_meta.$meta_name.value %] selected[% END %]>[% option.name.0 %]</option> + [% END %] + </select> + [% ELSE %] + <input type="text" value="[% report_meta.$meta_name | html %]" name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> [% END %] - </select> - [% ELSE %] - <input type="text" value="[% report_meta.$meta_name | html %]" name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> [% END %] </div> [%- END %] diff --git a/templates/web/fixmystreet/auth/general.html b/templates/web/fixmystreet/auth/general.html index 3f3fe5b99..45239073d 100644 --- a/templates/web/fixmystreet/auth/general.html +++ b/templates/web/fixmystreet/auth/general.html @@ -1,4 +1,5 @@ -[% INCLUDE 'header.html', title = loc('Sign in or create an account') %] +[% INCLUDE 'header.html', bodyclass='authpage', title = loc('Sign in or create an account') %] +[%# should bodyclass='twothirdspage' instead? Need override for Harrogate %] <h1>[% loc('Sign in') %]</h1> diff --git a/templates/web/fixmystreet/report/new/category_extras.html b/templates/web/fixmystreet/report/new/category_extras.html index ae1214c35..48a38435d 100644 --- a/templates/web/fixmystreet/report/new/category_extras.html +++ b/templates/web/fixmystreet/report/new/category_extras.html @@ -9,14 +9,16 @@ [% IF field_errors.$meta_name %] <p class='form-error'>[% field_errors.$meta_name %]</p> [% END -%] - [% IF meta.exists('values') %] - <select name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> - [% FOR option IN meta.values.value %] - <option value="[% option.key.0 %]"[% IF option.key.0 == report_meta.$meta_name.value %] selected[% END %]>[% option.name.0 %]</option> - [% END %] - </select> - [% ELSE %] - <input type="text" value="[% report_meta.$meta_name.value | html %]" name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> + [% IF meta.variable != 'false' %] + [% IF meta.exists('values') %] + <select name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> + [% FOR option IN meta.values.value %] + <option value="[% option.key.0 %]"[% IF option.key.0 == report_meta.$meta_name.value %] selected[% END %]>[% option.name.0 %]</option> + [% END %] + </select> + [% ELSE %] + <input type="text" value="[% report_meta.$meta_name.value | html %]" name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> + [% END %] [% END %] [%- END %] diff --git a/templates/web/harrogate/around/intro.html b/templates/web/harrogate/around/intro.html new file mode 100644 index 000000000..53476965d --- /dev/null +++ b/templates/web/harrogate/around/intro.html @@ -0,0 +1,4 @@ + <div id="postcode-intro"> + <h1> Report something in Harrogate district that needs to be fixed, cleaned, or cleared. </h1> + <h2> (like graffiti, fly tipping, broken playground equipment, or street lighting) </h2> + </div> diff --git a/templates/web/harrogate/faq/faq-en-gb.html b/templates/web/harrogate/faq/faq-en-gb.html new file mode 100755 index 000000000..e5c9e5480 --- /dev/null +++ b/templates/web/harrogate/faq/faq-en-gb.html @@ -0,0 +1,134 @@ +[% INCLUDE 'header.html', title = 'Help', bodyclass = 'twothirdswidthpage' %] + +<div class="sticky-sidebar"> + <aside> + <ul class="plain-list"> + <li><a href="#faq">Frequently Asked Questions</a></li> + <li><a href="/privacy">Privacy and cookies</a></li> + <li><a href="/contact">Contact FixMyStreet</a></li> + </ul> + </aside> +</div> + +<h1> Frequently Asked Questions </h1> + +<p>These pages are for reporting things which are broken, dirty, damaged or +dumped, and need fixing, cleaning or clearing: </p> +<ul> + <li>graffiti + <li>flytipping + <li>broken playground equipment + <li>street lighting + <li>potholes + </ul> + <p> + Note that though most of these services are provided by Harrogate Borough Council, + FixMyStreet will forward some categories of issue to North Yorkshire County Council. + </p> + +<dl> + <dt><a name="emergencies"></a>Reporting emergencies (Out of Hours)</dt> + <dd> + <p> Please do not report problems which present an immediate risk to life, + for example missing manhole covers or a fallen lamp column. </p> + <p> Issues reported via the website are only actioned during office hours. + If you require an Out of Hours service please ring our main number + 01423 500600 and a message will direct you to the relevant Council Out of Hours + service. </p> + + </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>Harrogate Borough Council and FixMyStreet are 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>Can I use FixMyStreet on my mobile?</dt> + <dd> + <p>The FixMyStreet website will already work on your mobile phone, adapting to + the size of your screen automatically. Using an app has some advantages, though + — for example, you can create a report even when you have no network + connection. + <ul> + <li> + <a href="https://itunes.apple.com/gb/app/fixmystreet/id297456545">FixMyStreet app for iPhone</a> + <li> + <a href="https://play.google.com/store/apps/details?id=org.mysociety.FixMyStreet">FixMyStreet app for Android</a> + <li><em>Nokia:</em> A volunteer, Thomas Forth, has written an app available from the + <a href="http://store.ovi.com/content/107557">Ovi Store</a>. + </ul> + </dd> + + <dt>Can I use these pages to report problems outside of the Harrogate district?</dd> + <dd>Yes, if you enter a postcode or address outside the borough you will be re-directed to the main FixMyStreet site that will enable you to report problems elsewhere. FixMyStreet will forward these on to the relevant council.</dd> + + <dt>The site is powered by FixMyStreet, who are they?</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. +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.</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>I’d like a site like this for my own location/ where’s the "source code" to this site?</dt> + <dd> +The mySociety software behind this site is open source, and available +under the GNU Affero GPL software license. You can <a +href="http://github.com/mysociety/fixmystreet">download the +source code</a> and help mySociety 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> + + <h2><a name="privacy"></a>Privacy Questions</h2> + + <dl> + <dt>Who gets to see my email address?</dt> + <dd> +<p>If you submit a problem, your details, and details of the problem, will be +submitted to Harrogate Borough Council, or North Yorkshire County Council, as +appropriate. 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.</p> +<p>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.</p> +</dd> + + <dt>What emails will you send to me?</dt> + <dd>We will email you when we have received your report, and when it has + been investigated and actioned. We will only send you emails that + relate to an issue you have reported.</dd> + + </dl> + +[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/harrogate/footer.html b/templates/web/harrogate/footer.html new file mode 100644 index 000000000..116b318a3 --- /dev/null +++ b/templates/web/harrogate/footer.html @@ -0,0 +1,55 @@ + [% IF pagefooter %] + <footer role="content-info"> + [% 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 id="main-menu"> + [% selected = c.req.uri.path == '/' %] + <li [% selected ? 'class="menu-item-selected"' : '' %]> + <[% IF selected %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn"> + [% loc("Report a problem") %]</[% selected == '/' ? 'span' : 'a' %]></li> + + [% selected = c.req.uri.path == '/my' %] + <li [% selected ? 'class="menu-item-selected"' : '' %]> + <[% IF selected %]span[% ELSE %]a href="/my"[% END %]> + [% loc("Your reports") %]</[% selected ? 'span' : 'a' %]></li> + + [% selected = c.req.uri.path == '/reports/Harrogate' %] + <li [% selected ? 'class="menu-item-selected"' : '' %]> + <[% IF selected %]span[% ELSE %]a href="/reports"[% END %]> + [% loc("All reports") %]</[% selected ? 'span' : 'a' %]></li> + + [% selected = c.req.uri.path == '/alert' %] + <li [% selected ? 'class="menu-item-selected"' : '' %]> + <[% IF selected %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END %]> + [% loc("Local alerts") %]</[% selected ? 'span' : 'a' %]></li> + + [% selected = c.req.uri.path == '/faq' %] + <li [% selected ? 'class="menu-item-selected"' : '' %]> + <[% IF selected %]span[% ELSE %]a href="/faq"[% END %]> + [% loc("Help") %]</[% selected ? 'span' : 'a' %]></li> + + [% selected = c.req.uri.path == '/privacy' %] + <li id="top-nav-privacy" [% selected ? 'class="menu-item-selected"' : '' %]> + <[% IF selected %]span[% ELSE %]a href="/privacy"[% END %]> + [% loc("Privacy") %]</[% selected ? 'span' : 'a' %]></li> + </ul> + </div> + </div> + </div> + +<!-- [% INCLUDE 'debug_footer.html' %] --> + </div> <!-- .wrapper --> +</body> +</html> diff --git a/templates/web/harrogate/front/footer-marketing.html b/templates/web/harrogate/front/footer-marketing.html new file mode 100644 index 000000000..495a17fc5 --- /dev/null +++ b/templates/web/harrogate/front/footer-marketing.html @@ -0,0 +1,19 @@ + <div class="tablewrapper bordered"> + <div id="footer-mobileapps"> + <h4>The FixMyStreet App</h4> + <p> + <a href="https://itunes.apple.com/gb/app/fixmystreet/id297456545"> + <img alt="FixMyStreet app on the App Store" src="/cobrands/fixmystreet/images/itunes_store_logo.png" /> + </a> + <a href="https://play.google.com/store/apps/details?id=org.mysociety.FixMyStreet"> + <img alt="FixMyStreet Android app on Google Play" src="/cobrands/fixmystreet/images/google_play_logo.png" /> + </a> + </p> + </div> + + <div id="footer-help"> + <p> + Powered by <a class="platform-logo" href="http://fixmystreet.org/">FixMyStreet Platform</a> + </p> + </div> + </div> diff --git a/templates/web/harrogate/header.html b/templates/web/harrogate/header.html new file mode 100644 index 000000000..3d69fbac6 --- /dev/null +++ b/templates/web/harrogate/header.html @@ -0,0 +1,63 @@ +<!doctype html> +<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 7]> <html class="no-js ie7 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 8]> <html class="no-js ie8 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 9]> <html class="no-js ie9 oldie" 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"> + + [% INCLUDE 'header_opengraph.html' %] + +[% SET start = c.config.ADMIN_BASE_URL IF admin %] + + <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/base.css') %]"> + <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]" media="(min-width:48em)"> + [% extra_css %] + <!--[if (lt IE 9) & (!IEMobile)]> + <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/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', site_title = c.cobrand.site_title %] + [% 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/harrogate/report/new/councils_extra_text.html b/templates/web/harrogate/report/new/councils_extra_text.html new file mode 100644 index 000000000..92dc93452 --- /dev/null +++ b/templates/web/harrogate/report/new/councils_extra_text.html @@ -0,0 +1,10 @@ +<div id="council_responsibilities_note"> +<p> +<b>NB:</b> though we will forward your request as appropriate, +reports for problems managed by North Yorkshire County Council are not shown on this map. +View all problems in that area on +<a href="https://www.fixmystreet.com/reports/North+Yorkshire">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/harrogate/static/privacy.html b/templates/web/harrogate/static/privacy.html new file mode 100755 index 000000000..0107d0873 --- /dev/null +++ b/templates/web/harrogate/static/privacy.html @@ -0,0 +1,56 @@ +[% 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><strong>Privacy and cookies</strong></li> + <li><a href="/contact">Contact [% c.cobrand.site_title %]</a></li> + </ul> + </aside> +</div> + +<h1>Privacy, cookies, and third party services</h1> + +<p><strong>Our use of your data, cookies, and external services: what you +should know, and how to opt out if you want to.</strong></p> + +<h2>Privacy</h2> + + <dl> + <dt>Who gets to see my email address?</dt> + <dd> + <p>If you submit a problem, your details, and details of the problem, will be + submitted to Harrogate Borough Council, or North Yorkshire County Council, as + appropriate. 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.</p> + <p>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.</p> + </dd> + + <dt>What emails will you send to me?</dt> + <dd>We will email you when we have received your report, and when it has + been investigated and actioned. We will only send you emails that + relate to an issue you have reported.</dd> + + </dl> + <dl> + +<h2>Cookies</h2> + +<p>To make our service easier or more useful, we sometimes place small data +files on your computer or mobile phone, known as cookies; many websites do +this. We use this information to, for example, remember you have logged in so +you don't need to do that on every page. Below, we list the cookies and +services that this site can use. + +<table cellpadding=5> +<tr align="left"><th scope="col">Name</th><th scope="col">Typical Content</th><th scope="col">Expires</th></tr> +<tr><td>fixmystreet_app_session</td><td nowrap>A random unique identifier</td><td>When browser is closed, or four weeks if “Keep me signed in” is ticked</td></tr> +</table> + +[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/web/cobrands/harrogate/HBCLogo-cropped.png b/web/cobrands/harrogate/HBCLogo-cropped.png Binary files differnew file mode 100755 index 000000000..4421820d2 --- /dev/null +++ b/web/cobrands/harrogate/HBCLogo-cropped.png diff --git a/web/cobrands/harrogate/HBCLogo-mobile.png b/web/cobrands/harrogate/HBCLogo-mobile.png Binary files differnew file mode 100755 index 000000000..7b4cd6063 --- /dev/null +++ b/web/cobrands/harrogate/HBCLogo-mobile.png diff --git a/web/cobrands/harrogate/HBCLogo.png b/web/cobrands/harrogate/HBCLogo.png Binary files differnew file mode 100644 index 000000000..11ee7c79c --- /dev/null +++ b/web/cobrands/harrogate/HBCLogo.png diff --git a/web/cobrands/harrogate/HBLogo.png b/web/cobrands/harrogate/HBLogo.png Binary files differnew file mode 100755 index 000000000..03cf2b4f5 --- /dev/null +++ b/web/cobrands/harrogate/HBLogo.png diff --git a/web/cobrands/harrogate/_colours.scss b/web/cobrands/harrogate/_colours.scss new file mode 100644 index 000000000..a79b7acfb --- /dev/null +++ b/web/cobrands/harrogate/_colours.scss @@ -0,0 +1,22 @@ +/* COLOURS */ + +$harrogate_primary: #7EB7D8; + +$primary: $harrogate_primary; +$primary_dark: darken($harrogate_primary, 20%); + +$col_click_map: $harrogate_primary; +$col_click_map_dark: $harrogate_primary; +$col_fixed_label_dark: $harrogate_primary; +$col_fixed_label: $harrogate_primary; + +$primary_b: #000000; +$primary_text: #ffffff; + +$base_bg: #fff; +$base_fg: #1a1a1a; + +/* Following seem to be required in layout.scss */ +$map_nav_bg: #222; +$nav_fg: #000; +$nav_fg_hover: #444; diff --git a/web/cobrands/harrogate/base.scss b/web/cobrands/harrogate/base.scss new file mode 100644 index 000000000..eccb1a84f --- /dev/null +++ b/web/cobrands/harrogate/base.scss @@ -0,0 +1,65 @@ +@import "../sass/h5bp"; +@import "./_colours"; +@import "../sass/mixins"; +@import "compass"; + +@import "../sass/base"; + + +body.frontpage #site-logo, +.ie6 body.frontpage #site-logo, +#site-logo +{ + display: block; + margin: 2px; + padding-left: 10px; + position: static; + + background: url("/cobrands/harrogate/HBCLogo-mobile.png") 0 0 no-repeat; + width: 106px; + height: 37px; +} + +#main-nav ul#main-menu li { + + // blue button background, darker if selected + background: #ededed; + &.menu-item-selected { + background: $primary; + span { + color: #fff; + } + } + + span { + color: $nav_fg; + } +} + +#main-nav ul#main-menu li, +body.mappage #main-nav ul#main-menu li, +{ + padding-left: 0.25em; + padding-right: 0.25em; + padding-top: 0; + padding-bottom: 0; + + a { padding: 0 } +} + +label[for=form_INFO_TEXT] { + background: yellow; + border: solid 1px black; + padding: 1em; +} + +#site-header { + background: none; +} + + +#council_responsibilities_note { + background-color: lighten($primary, 30%); + padding: 0.5em; + font-size: 0.8em; +} diff --git a/web/cobrands/harrogate/config.rb b/web/cobrands/harrogate/config.rb new file mode 100644 index 000000000..cab97b18f --- /dev/null +++ b/web/cobrands/harrogate/config.rb @@ -0,0 +1,25 @@ +# 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/harrogate/layout.scss b/web/cobrands/harrogate/layout.scss new file mode 100644 index 000000000..480a07f5d --- /dev/null +++ b/web/cobrands/harrogate/layout.scss @@ -0,0 +1,185 @@ +@import "_colours"; +@import "../sass/layout"; + +@media only screen and (min-width: 48em) { + #site-logo, + .ie6 #site-logo, + + body.frontpage #site-logo, + .ie6 body.frontpage #site-logo, + + body.authpage #site-logo, + .ie6 body.authpage #site-logo, + + body.twothirdswidthpage #site-logo, + .ie6 body.twothirdswidthpage #site-logo + { + position: relative; + top: 1.2em; + margin: 0; + padding: 0; + background: url("/cobrands/harrogate/HBCLogo.png") 0 0 no-repeat; + width: 227px; + height: 122px; + } + + body.frontpage #site-header, + .ie6 body.frontpage #site-header, + + body.twothirdswidthpage #site-header, + .ie6 body.twothirdswidthpage #site-header, + + body.authpage #site-header, + .ie6 body.authpage #site-header, + + body.mappage #site-header, + .ie6 body.mappage #site-header, + body.mappage .nav-wrapper-2, + .ie6 body.mappage .nav-wrapper-2 + { + height: 10em; + } + + #fms_pan_zoom { + top: 10.75em!important; + } +} + +@media only screen and (min-width: 48em) { + body.twothirdswidthpage .container .content footer .tablewrapper a:link, + body.twothirdswidthpage .container .content footer .tablewrapper a:visited, + body.fullwidthpage .container .content footer .tablewrapper a:link, + body.fullwidthpage .container .content footer .tablewrapper a:visited { + color: white; + } + + body.mappage #user-meta+.container .content { + padding-top: 1.5em; + } +} + +body.fullwidthpage #main-nav, +body.frontpage #main-nav, +body.twothirdswidthpage #main-nav, +body.authpage #main-nav +{ + margin-top: 3.2em; +} + +body.mappage #main-nav, +{ + // TODO would be better to edit containers to figure out where missing em is defined + margin-top: 2.2em; +} + +body.fullwidthpage .container .content, +body.twothirdswidthpage .container .content { + margin: 0; + padding-left: 0; + padding-right: 0; +} + +@media only screen and (min-width: 48em) { + body.fullwidthpage .container .content { + margin-top: 3em; // push far enough for the sign-out link to also be visible + } +} + +body.twothirdswidthpage .content aside { + margin-top: 2em; + @include box-shadow(none); +} + + +body.twothirdswidthpage form.full-width { + margin: 0; +} + +body.mappage #main-nav { + ul#main-menu { + padding: 1em 0; + } +} + +body.mappage #main-nav ul#main-menu li a, body.mappage #main-nav ul#main-menu li span { + padding: 0.75em; +} + +body.mappage #main-nav ul#main-menu li a.report-a-problem-btn, +#main-nav ul#main-menu li a.report-a-problem-btn { + margin: 0; + padding: 0.75em; +} +#main-nav ul#main-menu li a.report-a-problem-btn { + &:hover { + background: #444; + color: #fff; + @include border-radius(0em); + } +} + +#main-nav { + ul#main-menu { + li { + a.report-a-problem-btn { + color: #000; + background: #ededed; + } + } + } +} + +body.mappage .nav-wrapper .nav-wrapper-2 { + background: #fff; + border-bottom: solid 4px $primary; +} + +.nav-wrapper .nav-wrapper-2 { + border-top: 0px; +} + +#front-main { + background: none; + padding: 0; + + #front-main-container { + background: $primary; + padding: 2em 0; + margin-bottom: 1.2em; + @include border-radius(12px); + + #postcode-intro { + margin: 0 2em; + } + } + +} + +body.frontpage #user-meta p { + top: -2.4em; +} + +body.mappage #user-meta { + top: 2em; + p { + background: $primary; + border-color: $primary_dark; + } +} + +body.mappage .content { + margin-top: 4em; +} + + +body.twothirdswidthpage .container .content footer, +body.fullwidthpage .container .content footer +{ + .tablewrapper { + width: 100%; + background: $primary; + @include border-radius(12px); + margin-bottom: 2em; + + } +} |