aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorHakim Cassimally <hakim@mysociety.org>2014-01-22 10:19:35 +0000
committerHakim Cassimally <hakim@mysociety.org>2014-03-05 09:43:06 +0000
commitd94ccbc4621df55cacf058b8efca1b14a8cc2dd4 (patch)
treebe185600120cceebf59c3ef3908dd719ab537c40 /perllib
parentcbdcd3a3f2d3b9fe4e5e3b3656bbe20b5c56bc61 (diff)
[Hart] basic Hart cobranding
Originally copied from template of Bromley code, substituting logo, council ID, geolocation data, and renaming .scss variables etc. (NB: this was a bad idea. As per notes/cobranding.txt, should have started with less copying of files, as this required more cleanup. Bromley's code has some particularities, like smaller map, split First/Last name fields and so on. The current branch has been rebased to present a slightly idealised picture of the process.) (Includes contributions by @davea and @stevenday) * Some code cleanup and added is_two_tier * Add Hart-specific links to footer * Shift FMS nav out of the main header * Update styling to follow design more closely * Flip nav colours to better indicate links * Make header banner entire width of the page * Stretch footer bg to entire width of page * Add top-level nav links * Correct header height on mobile * Correct wording of top menu item * Remove FMS logo from top of page * Shift top level nav to correct position * Invert media query so IE8 displays header properly * hide folding triangle, as makes no sense on this cobrand * Some more renaming of Bromley to Hart * Treat Hart the same as Bromley in the JS * Whitespace/formatting fixes * Basic test for cobrand * Javascript #map_box fixes * Make sure #map_box is not in desk-only * ensure there is only single map (one .wrapper only) * colour tweaks * Fix example places (postcode, spelling) * Basic FAQ text * Set Zoom level 3 * CSS/HTML/JS tweaks removing Bromley customizations * Switch templates to put navigation in footer, as FMS.com does * remaining HTML/CSS changes for large map * replace favicon * move site-logo scss to one place * make small logo transparent
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/Cobrand/Hart.pm66
1 files changed, 66 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Hart.pm b/perllib/FixMyStreet/Cobrand/Hart.pm
new file mode 100644
index 000000000..eddd48774
--- /dev/null
+++ b/perllib/FixMyStreet/Cobrand/Hart.pm
@@ -0,0 +1,66 @@
+package FixMyStreet::Cobrand::Hart;
+use parent 'FixMyStreet::Cobrand::UKCouncils';
+
+use strict;
+use warnings;
+
+sub council_id { return 2333; } # http://mapit.mysociety.org/area/2333.html
+sub council_area { return 'Hart'; }
+sub council_name { return 'Hart Council'; }
+sub council_url { return 'hart'; }
+sub is_two_tier { return 1; }
+
+# Different to councils parent due to this being a two-tier council. If we get
+# more, this can be genericised in the parent.
+sub problems_clause {
+ return { bodies_str => { like => '%2333%' } };
+}
+
+sub path_to_web_templates {
+ my $self = shift;
+ return [
+ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify,
+ FixMyStreet->path_to( 'templates/web/fixmystreet' )->stringify
+ ];
+}
+
+sub disambiguate_location {
+ my $self = shift;
+ my $string = shift;
+
+ my $town = 'Hart, Hampshire';
+
+ return {
+ %{ $self->SUPER::disambiguate_location() },
+ town => $town,
+ # these are taken from mapit http://mapit.mysociety.org/area/2333/geometry -- should be automated?
+ centre => '51.284839,-0.8974600',
+ span => '0.180311,0.239375',
+ bounds => [ 51.186005, -1.002295, 51.366316, -0.762920 ],
+ };
+}
+
+sub example_places {
+ return ( 'GU51 4JX', 'Primrose Drive' );
+}
+
+sub send_questionnaires {
+ return 0;
+}
+
+sub ask_ever_reported {
+ return 0;
+}
+
+sub contact_email {
+ my $self = shift;
+ return join( '@', 'info', 'hart.gov.uk' );
+}
+sub contact_name { 'Hart District Council (do not reply)'; }
+
+sub default_map_zoom { 3 }
+
+sub reports_per_page { return 20; }
+
+1;
+