diff options
47 files changed, 1286 insertions, 95 deletions
diff --git a/.gitignore b/.gitignore index 055e181dd..b55a7046f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ tags /web/css/main.css /web/cobrands/fixmystreet/*.css /web/cobrands/bromley/*.css +/web/cobrands/barnet/*.css /local /web/cobrands/fixmystreet/compass_app_log.txt diff --git a/bin/make_css b/bin/make_css index 27cbec1b5..22ebddba2 100755 --- a/bin/make_css +++ b/bin/make_css @@ -16,9 +16,10 @@ DIRECTORY=$(cd `dirname $0`/../web && pwd) # FixMyStreet uses compass compass compile --output-style compressed $DIRECTORY/cobrands/fixmystreet compass compile --output-style compressed $DIRECTORY/cobrands/bromley +compass compile --output-style compressed $DIRECTORY/cobrands/barnet # The rest are plain sass -for scss in `find $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq | grep -v "cobrands/\(fixmystreet\|bromley\)"` +for scss in `find $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq | grep -v "cobrands/\(fixmystreet\|bromley\|barnet\)"` do sass --scss --update --style compressed $scss done diff --git a/perllib/FixMyStreet/Cobrand/Barnet.pm b/perllib/FixMyStreet/Cobrand/Barnet.pm index 6f115ec63..60fdb6da6 100644 --- a/perllib/FixMyStreet/Cobrand/Barnet.pm +++ b/perllib/FixMyStreet/Cobrand/Barnet.pm @@ -8,6 +8,15 @@ sub council_id { return 2489; } sub council_area { return 'Barnet'; } sub council_name { return 'Barnet Council'; } sub council_url { return 'barnet'; } +sub all_reports_style { return 'detailed'; } + +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; @@ -19,5 +28,75 @@ sub disambiguate_location { }; } +sub generate_problem_banner { + my ( $self, $problem ) = @_; + + my $banner = {}; + if ( $problem->is_open && time() - $problem->lastupdate_local->epoch > 8 * 7 * 24 * 60 * 60 ) + { + $banner->{id} = 'unknown'; + $banner->{text} = _('Unknown'); + } + if ($problem->is_fixed) { + $banner->{id} = 'fixed'; + $banner->{text} = _('Fixed'); + } + if ($problem->is_closed) { + $banner->{id} = 'closed'; + $banner->{text} = _('Closed'); + } + + if ( grep { $problem->state eq $_ } ( 'investigating', 'in progress', 'planned' ) ) { + $banner->{id} = 'progress'; + $banner->{text} = _('In progress'); + } + + return $banner; +} + +sub council_rss_alert_options { + my $self = shift; + my $all_councils = shift; + my $c = shift; + + my %councils = map { $_ => 1 } $self->area_types(); + + my $num_councils = scalar keys %$all_councils; + + my ( @options, @reported_to_options ); + if ( $num_councils == 1 or $num_councils == 2 ) { + my ($council, $ward); + foreach (values %$all_councils) { + if ($councils{$_->{type}}) { + $council = $_; + $council->{short_name} = $self->short_name( $council ); + ( $council->{id_name} = $council->{short_name} ) =~ tr/+/_/; + } else { + $ward = $_; + $ward->{short_name} = $self->short_name( $ward ); + ( $ward->{id_name} = $ward->{short_name} ) =~ tr/+/_/; + } + } + + push @options, + { + type => 'council', + id => sprintf( 'council:%s:%s', $council->{id}, $council->{id_name} ), + text => 'All problems within the council.', + rss_text => sprintf( _('RSS feed of problems within %s'), $council->{name}), + uri => $c->uri_for( '/rss/reports/' . $council->{short_name} ), + }; + push @options, + { + type => 'ward', + id => sprintf( 'ward:%s:%s:%s:%s', $council->{id}, $ward->{id}, $council->{id_name}, $ward->{id_name} ), + rss_text => sprintf( _('RSS feed of problems within %s ward'), $ward->{name}), + text => sprintf( _('Problems within %s ward'), $ward->{name}), + uri => $c->uri_for( '/rss/reports/' . $council->{short_name} . '/' . $ward->{short_name} ), + } if $ward; + } + + return ( \@options, @reported_to_options ? \@reported_to_options : undef ); +} 1; diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index c45c36b0b..25ad37a0b 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -136,6 +136,15 @@ Parameter is QUERY sub enter_postcode_text { '' } +=head2 all_reports_style + +Return the type of problem information to display on the all reports +pages for councils. Can be either simple or detailed. + +=cut + +sub all_reports_style { return 'simple'; } + =head2 set_lang_and_domain my $set_lang = $cobrand->set_lang_and_domain( $lang, $unicode, $dir ) diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm index 97b4c3c8b..384b1b05b 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm @@ -6,6 +6,8 @@ sub restriction { return {}; } +sub all_reports_style { return 'detailed'; } + sub generate_problem_banner { my ( $self, $problem ) = @_; diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index b40f13d9d..923cd435d 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -75,5 +75,7 @@ sub recent_photos { return $self->problems->recent_photos( $num, $lat, $lon, $dist ); } +sub is_council_cobrand { return 1 } + 1; diff --git a/templates/web/barnet/alert/_list.html b/templates/web/barnet/alert/_list.html new file mode 100644 index 000000000..b281fd54f --- /dev/null +++ b/templates/web/barnet/alert/_list.html @@ -0,0 +1,89 @@ + <input type="hidden" name="type" value="local"> + <input type="hidden" name="pc" value="[% pc | html %]"> + <input type="hidden" name="latitude" value="[% latitude | html %]"> + <input type="hidden" name="longitude" value="[% longitude | html %]"> + + <p> + [% IF pretty_pc %] + [% tprintf( loc('Here are the types of local problem alerts for ‘%s’.'), pretty_pc ) %] + [% END %] + [% loc('Select which type of alert you\'d like and click the button for an RSS feed, or enter your email address to subscribe to an email alert.') %] + </p> + + [% INCLUDE 'errors.html' %] + + <p> + [% loc('The simplest alert is our geographic one:') %] + </p> + + <p> + <input type="radio" name="feed" id="[% rss_feed_id %]" value="[% rss_feed_id %]"[% IF rss_feed_id == selected_feed || selected_feed == '' %] checked[% END %]> + <label class="inline" for="[% rss_feed_id %]">[% tprintf( loc('Problems within %.1fkm of this location'), population_radius ) %]</label> + <a href='[% rss_feed_uri %]'><img src='/i/feed.png' width='16' height='16' title='[% loc('RSS feed of nearby problems') %]' alt='[% loc('RSS feed') %]' border='0'></a> + <br /> + [% loc('(a default distance which covers roughly 200,000 people)') %] + </p> + + <p id="rss_local_alt"> + [% loc('(alternatively the RSS feed can be customised, within') %] + <a href="[% rss_feed_2k %]">2km</a> / <a href="[% rss_feed_5k %]">5km</a> / <a href="[% rss_feed_10k %]">10km</a> / <a href="[% rss_feed_20k %]">20km</a>) + </p> + + <p> + Or you can subscribe to an alert for all council problems or one based upon what ward you’re in: + </p> + + [% IF reported_to_options %] + <p><strong> + [% loc('Problems within the boundary of:') %] + </strong></p> + <ul class="plain-list"> + [% ELSE %] + <ul id="rss_feed" class="plain-list"> + [% END %] + + [% FOREACH option IN options %] + <li[% IF ! (loop.count % 2) %] class="a"[% END %]> + <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]> + <a href="[% option.uri %]"><img src="/i/feed.png" width="16" height="16" +title="[% option.rss_text %]" alt="RSS feed" border="0"></a> + <label class="inline" for="[% option.id %]">[% option.text %]</label> + </li> + [% END %] +</ul> + [% IF reported_to_options %] + <p><strong> + [% loc('Or problems reported to:') %] + </strong></p> + <ul class="plain-list"> + [% FOREACH option IN reported_to_options %] + <li[% IF ! (loop.count % 2) %] class="a"[% END %]> + <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]> + <a href="[% option.uri %]"><img src="/i/feed.png" width="16" height="16" + title="[% option.rss_text %]" alt="RSS feed" border="0"></a> + <label class="inline" for="[% option.id %]">[% option.text %]</label> + </li> + [% END %] + </ul> + <p><small> + [% loc( 'FixMyStreet sends different categories of problem +to the appropriate council, so problems within the boundary of a particular council +might not match the problems sent to that council. For example, a graffiti report +will be sent to the district council, so will appear in both of the district +council’s alerts, but will only appear in the "Within the boundary" alert +for the county council.' ) %] + </small></p> + [% END %] + + <input id="alert_rss_button" class="green-btn" type="submit" name="rss" value="[% loc('Give me an RSS feed') %]"> + + <p id="alert_or"> + [% loc('or') %] + </p> + + [% UNLESS c.user_exists %] + <label for="rznvy">[% loc('Your email') %]</label> + <input type="text" id="rznvy" name="rznvy" value="[% rznvy | html %]"> + [% END %] + <input id="alert_email_button" style="margin-top:1em;" class="green-btn" type="submit" name="alert" value="[% loc('Subscribe me to an email alert') %]"> + diff --git a/templates/web/barnet/alert/index.html b/templates/web/barnet/alert/index.html new file mode 100644 index 000000000..1cc39e130 --- /dev/null +++ b/templates/web/barnet/alert/index.html @@ -0,0 +1,38 @@ +[% INCLUDE 'header.html', title = loc('Local RSS feeds and email alerts'), bodyclass = 'twothirdswidthpage' %] + +<h1>[% loc('Local RSS feeds and email alerts') %]</h1> + +<p> +You can subscribe to an RSS feed and email alerts for problems, including alerts for all problems within Barnet or in a particular ward, or all problems within a certain distance of a particular location. To find out what alerts we have for you, please enter a Barnet postcode or street name and area +</p> + +[% IF location_offshore %] + <div class="error">[% loc('That location does not appear to be covered by a council, perhaps it is offshore - please try somewhere more specific.') %]</div> +[% ELSIF location_error %] + <div class="error">[% location_error %]</div> +[% ELSE %] + [% INCLUDE 'errors.html' %] +[% END %] + +<form method="get" action="/alert/list" class="full-width"> + <fieldset> + <div class="form-txt-submit-box"> + <input type="text" name="pc" value="[% pc | html %]" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]"> + <input class="green-btn" type="submit" value="[% loc('Go') %]"> + </div> + </fieldset> +</form> + +[% IF photos.size %] +<div class="sticky-sidebar"> + <aside> + <h2>[% loc('Some photos of recent reports') %]</h2> + [% FOREACH p IN photos %] + <a href="/report/[% p.id %]"><img border="0" height="100" + src="/photo/[% p.id %].tn.jpeg" alt="[% p.title | html %]" title="[% p.title | html %]"></a> + [% END %] + </aside> +</div> +[% END %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/barnet/bromley-footer.html b/templates/web/barnet/bromley-footer.html new file mode 100644 index 000000000..619a6826f --- /dev/null +++ b/templates/web/barnet/bromley-footer.html @@ -0,0 +1,49 @@ + </div><!-- .content role=main --> + <p id="bromley-powered-by" class="desk-only"> + <a href="http://www.fixmystreet.com/">Powered by <img src="/cobrands/bromley/fms-logo.png" style="height:20px;"></a> + </p> + + </div><!-- .container --> + </div><!-- .table-cell --> + + <div class="nav-wrapper"> + <div class="nav-wrapper-2"> + <div id="main-nav" role="navigation"> + <ul id="mysoc-menu"> + <li><a href="http://www.fixmystreet.com/">Powered by <img src="/cobrands/bromley/fms-logo.png" style="height:20px;"></a></li> + </ul> + <ul id="main-menu"> + <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn" + >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/my' %]span[% ELSE %]a href="/my"[% END + %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/reports/Bromley' %]span[% ELSE %]a href="/reports/Bromley"[% END + %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END + %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END + %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li> + </ul> + </div> + </div> + </div> + + </div> <!-- .wrapper --> + +<div id="bromley-footer" class="desk-only"> + <p class="copy">© 2012 London Borough of Bromley</p> + + <a href="http://www.direct.gov.uk/"><img src="http://www.bromley.gov.uk/site/images/directgov.jpg" alt="Directgov website link - Public services all in one place" /></a> + + <ul class="footer-nav"> + <li><a href="#bromley-header">To the top</a></li> + <li><a href="http://www.bromley.gov.uk/terms">Disclaimer</a></li> + <li><a href="http://www.bromley.gov.uk/privacy" rel="nofollow">Privacy and cookies</a></li> + <li><a href="http://www.bromley.gov.uk/accesstoinfo">Access to information</a></li> + </ul> + +</div> + + </div></div> +</body> +</html> diff --git a/templates/web/barnet/bromley-header.html b/templates/web/barnet/bromley-header.html new file mode 100644 index 000000000..50b0f8fa1 --- /dev/null +++ b/templates/web/barnet/bromley-header.html @@ -0,0 +1,94 @@ +<!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"> + + <link rel="stylesheet" href="[% version('/cobrands/bromley/base.css') %]"> + <link rel="stylesheet" href="[% version('/cobrands/bromley/layout.css') %]" media="(min-width:48em)"> + <link rel="stylesheet" href="[% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]"> + <link rel="stylesheet" href="[% version('/cobrands/bromley/bromley.css') %]"> + <!--[if (lt IE 9) & (!IEMobile)]> + <link rel="stylesheet" href="[% version('/cobrands/bromley/layout.css') %]"> + <![endif]--> + + <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> + [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + <script src="[% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script> + + <link rel="Shortcut Icon" type="image/x-icon" href="/cobrands/bromley/favicon.ico"> + + </head> + <body class="[% bodyclass | html IF bodyclass %]"> + [%# ie_wrapper is to prevent a horizontal scrollbar in IE7, it appears (from Bromley site) %] + <div id="bromley-wrapper"><div id="bromley-ie_wrapper"> + +<div id="bromley-header" class="desk-only"> + <ul class="header-nav"> + <li><a href="http://www.bromley.gov.uk/accessibility">Accessibility</a></li> + <li><a class="skiplink" href="http://www.bromley.gov.uk/#user-meta" rel="nofollow">Skip to content</a></li> + <!-- <li><a rel="nofollow" href="http://www.bromley.gov.uk/a_to_z?previewstyle=generic/print.css">Printer friendly</a></li> --> + <!-- <li><a href="http://www.bromley.gov.uk/accessibility/settings">Text size: AAA</a></li> --> + <li><div id="google_translate_element"></div></li> + </ul> + + <div class="logo"> + <a href="http://www.bromley.gov.uk"><img src="/cobrands/bromley/bromley-logo.jpg" alt="London Borough of Bromley logo" width="159" height="114" style="width:159px; height:114px;" /></a> + </div> + + <div class="sign-in"> + [% IF c.user_exists %] + <p> + [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + <a href="/auth/sign_out">[% loc('sign out') %]</a> + </p> + [% END %] + </div> + + <div class="main-menu"> + <ul> + <li class="home"><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn" + >[% "Report" %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/my' %]span[% ELSE %]a href="/my"[% END + %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/reports/Bromley' %]span[% ELSE %]a href="/reports/Bromley"[% END + %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END + %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[% + %]<li class="last"><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END + %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li> + </ul> + </div> + +</div> + + <div class="wrapper"> + <div class="table-cell"> + <header id="site-header" role="banner"> + <div class="container"> + <a href="/" id="site-logo">FixMyStreet</a> + <a href="#main-nav" id="nav-link">Main Navigation</a> + </div> + </header> + + <div id="user-meta"> + [% IF c.user_exists %] + <p> + [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + <a href="/auth/sign_out">[% loc('sign out') %]</a> + </p> + [% END %] + </div> + + <h1 class="main desk-only">Reporting a problem in Bromley’s streets or parks</h1> + + <div class="container"> + <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> + + diff --git a/templates/web/barnet/footer.html b/templates/web/barnet/footer.html index 32c6b5f7b..7982ad530 100644 --- a/templates/web/barnet/footer.html +++ b/templates/web/barnet/footer.html @@ -1,7 +1,37 @@ - </div> - <!-- end of content, start of footer --> - </div> - </div> + <p id="barnet-powered-by" class="desk-only"> + <a href="http://www.fixmystreet.com/">Powered by <img src="/cobrands/barnet/img/fms-logo.png" style="height:20px;"></a> + </p> + </div><!-- .content role=main --> + </div><!-- .container --> + </div><!-- .table-cell --> + + <div class="nav-wrapper"> + <div class="nav-wrapper-2"> + <div id="main-nav" role="navigation"> + <ul id="mysoc-menu"> + <li><a href="http://www.fixmystreet.com/">Powered by <img src="/cobrands/barnet/img/fms-logo.png" style="height:20px;"></a></li> + </ul> + <ul id="main-menu"> + <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn" + >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/my' %]span[% ELSE %]a href="/my"[% END + %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/reports/Barnet' %]span[% ELSE %]a href="/reports/Barnet"[% END + %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END + %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END + %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li> + </ul> + </div> + </div> + </div> + + </div> <!-- .wrapper --> +</div> +</div> +</div> + <!-- googleoff: index --> <div id="column_nav"> <div class="navigation active"> @@ -44,8 +74,7 @@ </div> </div> <!-- googleon: index --> - </div> - </div> - </div> +</div> +</div> </body> -</html>
\ No newline at end of file +</html> diff --git a/templates/web/barnet/header.html b/templates/web/barnet/header.html index 955473090..1b921d44d 100644 --- a/templates/web/barnet/header.html +++ b/templates/web/barnet/header.html @@ -1,60 +1,92 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/standard.css" media="screen" /> -<!--[if lte IE 6]> - <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/generic/ie-six.css" media="screen" /> - <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/generic/ie-six-print.css" media="print" /> -<![endif]--> -<!--[if IE 7]> - <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/generic/ie-seven.css" media="screen" /> -<![endif]--> -<!--[if IE 8]> - <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/generic/ie-eight.css" media="screen" /> -<![endif]--> - <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/generic/print.css" media="print" /> - <link rel="stylesheet" type="text/css" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/styles/generic/handheld.css" media="handheld" /> - <link rel="Shortcut Icon" type="image/x-icon" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/favicon.ico" /> +<!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"> + <link rel="ToC" href="http://www.barnet.gov.uk/site_map" /> <meta name="Keywords" content="fixmystreet barnet pothole streetlights report street problem" /> <meta name="Description" content="FixMyStreet Barnet: report problems in Barnet like graffiti, fly tipping, broken paving slabs, or street lighting" /> - <link rel="stylesheet" type="text/css" href="[% version('/css/core.css') %]"> - <link rel="stylesheet" type="text/css" href="/cobrands/barnet/css/layout.css"> - - [% INCLUDE 'common_header_tags.html' %] - - </head> - <body> - <div id="wrapper"> - <div id="ie_wrapper"> -<!-- googleoff: index --> - <div id="mobile_name">London Borough of Barnet</div> - <div id="mast"> - <div class="pseudoH1"> - <a href="http://www.barnet.gov.uk/"><span>London Borough of Barnet</span> <img src="http://pledgebank.barnet.gov.uk/microsites/barnet/site/images/blank.gif" alt="London Borough of Barnet logo" /></a> - </div> - <ul id="skip" class="hidden"> - <li><a href="#content" rel="nofollow">Skip to content</a></li> - <li><a href="#column_nav" rel="nofollow">Skip to main navigation</a></li> - </ul> - <div class="mast_links"></div> - <span class="clear"></span> - <div id="search"></div> - <div class="clear"></div> - </div> -<!-- googleon: index --> - <div id="page_wrap"> - <div id="page"> - <div id="breadcrumb"> -<!-- googleoff:all --> - <ul> - <li><a href="/">FixMyStreet Home</a></li> - <li class="bc_end"><span>[% c.req.uri.path == '/'? 'Report a problem' : "$title" | html %]</span></li> - </ul> -<!-- googleon:all --> - </div> - <div id="content" class="withWidth fullWidth"> - <div id="mysociety"> - - <!-- end of header -->
\ No newline at end of file + <link rel="Shortcut Icon" type="image/x-icon" href="http://pledgebank.barnet.gov.uk/microsites/barnet/site/favicon.ico" /> + + <link rel="stylesheet" href="[% version('/cobrands/barnet/base.css') %]"> + <link rel="stylesheet" href="[% version('/cobrands/barnet/layout.css') %]" media="(min-width:48em)"> + <link rel="stylesheet" href="[% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]"> + <!--[if (lt IE 9) & (!IEMobile)]> + <link rel="stylesheet" href="[% version('/cobrands/barnet/layout.css') %]"> + <![endif]--> + <link rel="stylesheet" href="[% version('/cobrands/barnet/barnet.css') %]" media="(min-width:48em)"> + <!--[if (lt IE 9) & (!IEMobile)]> + <link rel="stylesheet" href="[% version('/cobrands/barnet/barnet.css') %]"> + <![endif]--> + + <script src="[% version('/js/modernizr.custom.76759.js') %]" charset="utf-8"></script> + <script src="[% version('/cobrands/barnet/position_map.js') %]" charset="utf-8"></script> + [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] + <script src="[% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script> + + </head> + <body class="[% bodyclass | html IF bodyclass %]"> + <div id="barnet-wrapper"> + <div id="ie_wrapper"> + <div id="mast"> + <div class="pseudoH1"> + <a href="http://www.barnet.gov.uk/"><span>London Borough of Barnet</span> <img src="http://pledgebank.barnet.gov.uk/microsites/barnet/site/images/blank.gif" alt="London Borough of Barnet logo" /></a> + </div> + <ul id="skip" class="hidden"> + <li><a href="#content" rel="nofollow">Skip to content</a></li> + <li><a href="#column_nav" rel="nofollow">Skip to main navigation</a></li> + </ul> + <div class="mast_links"></div> + <span class="clear"></span> + <div id="search"></div> + <div class="clear"></div> + </div> + <div id="page_wrap"> + <div id="page"> + <div id="breadcrumb"> + <!-- googleoff:all --> + <ul> + <li><a href="http://www.barnet.gov.uk/">Home</a></li> + <li><a href="/">FixMyStreet</a></li> + <li class="bc_end"><span> + [% IF c.req.uri.path == '/' %]Report a problem[% ELSE %][% title %][% END %] + </span></li> + </ul> + <!-- googleon:all --> + </div> + <div id="content" class="withWidth fullWidth"> + <div id="user-meta"> + [% IF c.user_exists %] + <p> + [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + <a href="/auth/sign_out">[% loc('sign out') %]</a> + </p> + [% END %] + </div> + + <h1 id="page-title"> + <span>FixMyStreet</span> + </h1> + + <div class="wrapper"> + <div class="table-cell"> + <header id="site-header" role="banner"> + <div class="container"> + <a href="/" id="site-logo">FixMyStreet</a> + <a href="#main-nav" id="nav-link">Main Navigation</a> + </div> + </header> + + <div class="container"> + <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> + + <!-- end of header --> diff --git a/templates/web/barnet/index.html b/templates/web/barnet/index.html new file mode 100644 index 000000000..0dfacf499 --- /dev/null +++ b/templates/web/barnet/index.html @@ -0,0 +1,99 @@ +[%# Assumes fixmystreet cobrand is using FMS map template - for bonus points preload all the right map elements. %] +[% map_js = BLOCK %] +<script> +yepnope.addPrefix( 'preload', function ( resource ) { + resource.noexec = true; + return resource; +}); +Modernizr.load({ + load: [ + "preload![% version('/js/OpenLayers.fixmystreet.js') %]", + "preload![% version('/js/map-OpenLayers.js') %]", + "preload![% version('/js/map-bing-ol.js') %]", + "preload![% version('/js/jquery.ba-hashchange.min.js') %]" + ] +}); +</script> +[% END %] + +[% INCLUDE 'header.html', title => '' , bodyclass => 'frontpage fullwidthpage' %] + +[% IF error %] + <p class="error">[% error %]</p> +[% END %] + + +<div id="front-main"> + <div id="front-main-container"> + <h1>[% loc('Report, view, or discuss local problems') %]</h1> + + <h2>[% loc('(like graffiti, fly tipping, broken paving slabs, or street lighting)') %]</h2> + + [% + question + = c.cobrand.enter_postcode_text() + || loc("Enter a nearby GB postcode, or street name and area"); + %] + + <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> + <label for="pc">[% question %]:</label> + <div> + <input type="text" name="pc" value="" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]"> + <input type="submit" value="[% loc('Go') %]" id="submit"> + </div> + </form> + </div> +</div> + +<div class="tablewrapper"> + <div id="front-howto"> + <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> + </ol> + + <section class="full-width"> + [% INCLUDE "front/stats.html" %] + [% TRY %][% INCLUDE "front/tips.html" %][% CATCH file %][% END %] + </section> + </div> + + + [% + recent_photos = c.cobrand.recent_photos(5); + %] + + [% IF recent_photos.size %] + <div id="front-recently"> + <h2>[% loc('Recently reported problems') %]</h2> + + <section class="full-width"> + <ul class="issue-list-a"> + [% FOREACH p IN recent_photos %] + <li> + <a href="/report/[% p.id %]"> + <div class="text"> + <h4>[% p.title | html %]</h4> + <small>[% prettify_epoch( p.confirmed_local.epoch, 1 ) %]</small> + </div> + <div class="img"> + <img alt="[% p.title | html %]" title="[% p.title | html %]" height="60" width="90" src="/photo/[% p.id %].fp.jpeg"> + </div> + </a> + </li> + [% END %] + </ul> + </section> + + </div> + [% END %] +</div> + + +<!-- [% TRY %][% INCLUDE 'front/news.html' %][% CATCH file %][% END %] --> + + +[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/barnet/report/new/councils_text_all.html b/templates/web/barnet/report/new/councils_text_all.html new file mode 100644 index 000000000..20152928b --- /dev/null +++ b/templates/web/barnet/report/new/councils_text_all.html @@ -0,0 +1,4 @@ +<p> +All the information you provide here will be sent to the <strong>relevant department</strong>. +[% loc('The subject and details of the problem will be public, plus your name if you give us permission.') %] +</p> diff --git a/templates/web/barnet/report/updates-sidebar-notes.html b/templates/web/barnet/report/updates-sidebar-notes.html new file mode 100644 index 000000000..9fff322a1 --- /dev/null +++ b/templates/web/barnet/report/updates-sidebar-notes.html @@ -0,0 +1 @@ + <p>[% loc( 'Please note that updates are not sent to the relevant department. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</p> diff --git a/templates/web/default/reports/council.html b/templates/web/default/reports/council.html index 0d3d43d82..1610a98cb 100755 --- a/templates/web/default/reports/council.html +++ b/templates/web/default/reports/council.html @@ -8,6 +8,12 @@ %] [% END %] +[% IF c.cobrand.is_council_cobrand %] + [% ward_text = loc( 'View reports by ward' ) %] +[% ELSE %] + [% ward_text = loc( 'Wards of this council' ) %] +[% END %] + [% PROCESS "maps/${map.type}.html"; INCLUDE 'header.html', @@ -19,8 +25,8 @@ [% map_html %] -[% IF c.cobrand.moniker != 'fixmystreet' AND children.size %] -<h2 style="clear:right">[% loc('Wards of this council') %]</h2> +[% IF c.cobrand.all_reports_style != 'detailed' AND children.size %] +<h2 style="clear:right">[% ward_text %]</h2> <p>[% loc('Follow a ward link to view only reports within that ward.') %]</p> <ul> [% FOR child IN children.values.sort('name') %] @@ -66,12 +72,12 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a <a href="/reports/Central+Bedfordshire">Central Bedfordshire Council</a>. [% END %] </p> -[% ELSIF c.cobrand.moniker == 'fixmystreet' %] +[% ELSIF c.cobrand.all_reports_style == 'detailed' %] <div class="shadow-wrap"> <ul id="key-tools"[% IF NOT children.size %] class="singleton"[% END %]> - <li><a rel="nofollow" id="key-tool-updates-area" class="feed" href="[% rss_url %]">[% tprintf(loc('Get updates of problems in this %s'), thing) %]</a></li> + <li><a rel="nofollow" id="key-tool-updates-area" class="feed" href="[% rss_url %]">[% IF c.cobrand.is_council_cobrand %][% tprintf(loc('Get updates of %s problems'), thing) %][% ELSE %][% tprintf(loc('Get updates of problems in this %s'), thing) %][% END %]</a></li> [% IF children.size %] - <li><a href="#council_wards" id="key-tool-wards" class="chevron">[% loc('Wards of this council') %]</a></li> + <li><a href="#council_wards" id="key-tool-wards" class="chevron">[% ward_text %]</a></li> [% END %] </ul> </div> @@ -81,9 +87,9 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a [% TRY %][% INCLUDE 'reports/cobrand_stats.html' %][% CATCH file %][% END %] -[% IF c.cobrand.moniker == 'fixmystreet' AND children.size %] +[% IF c.cobrand.all_reports_style == 'detailed' AND children.size %] <section id="council_wards" class="hidden-js"> - <h2>[% loc('Wards of this council') %]</h2> +<h2>[% ward_text %]</h2> <p>[% loc('Follow a ward link to view only reports within that ward.') %]</p> <ul class="issue-list-a full-width"> [% FOR child IN children.values.sort('name') %] @@ -117,7 +123,7 @@ Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a [% IF problems %] <ul class="issue-list-a"> -[% IF c.cobrand.moniker == 'fixmystreet' %] +[% IF c.cobrand.all_reports_style == 'detailed' %] [% FOREACH problem IN problems %] <li> diff --git a/templates/web/fixmystreet/header.html b/templates/web/fixmystreet/header.html index f5d510922..4b1a40f71 100644 --- a/templates/web/fixmystreet/header.html +++ b/templates/web/fixmystreet/header.html @@ -19,6 +19,7 @@ <![endif]--> <script src="[% version('/js/modernizr.custom.76759.js') %]" charset="utf-8"></script> + <script src="[% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script> [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] [% extra_js %] diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html index 0bb13fa67..c0d89973c 100644 --- a/templates/web/fixmystreet/report/display.html +++ b/templates/web/fixmystreet/report/display.html @@ -57,7 +57,7 @@ [% IF c.cobrand.moniker != 'emptyhomes' %] <div class="general-sidebar-notes"> - <p>[% loc( 'Please note that updates are not sent to the council. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</p> + [% INCLUDE 'report/updates-sidebar-notes.html' %] </div> [% END %] diff --git a/templates/web/fixmystreet/report/updates-sidebar-notes.html b/templates/web/fixmystreet/report/updates-sidebar-notes.html new file mode 100644 index 000000000..a622cc7da --- /dev/null +++ b/templates/web/fixmystreet/report/updates-sidebar-notes.html @@ -0,0 +1 @@ + <p>[% loc( 'Please note that updates are not sent to the council. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</p> diff --git a/web/cobrands/barnet/_colours.scss b/web/cobrands/barnet/_colours.scss new file mode 100644 index 000000000..2f5ccc42b --- /dev/null +++ b/web/cobrands/barnet/_colours.scss @@ -0,0 +1,9 @@ +/* COLOURS */ + +$primary: #E9E9EA; +$primary_b: #000000; +$primary_text: #3E3D44; + +$contrast1: #E1E3E4; +$contrast1_dark: darken(#E1E3E4, 10%); +$contrast2: #AA8D11; diff --git a/web/cobrands/barnet/barnet.scss b/web/cobrands/barnet/barnet.scss new file mode 100644 index 000000000..3a2b4ab01 --- /dev/null +++ b/web/cobrands/barnet/barnet.scss @@ -0,0 +1,115 @@ +/* Parts of barnet's main CSS needed for its header/footer and adjusted (see + * bottom) to not be affected by main FixMyStreet CSS. Not very sustainable; + * perhaps we should wrap all council CSS within a SCSS #council ID? Hmm. + */ + +@import "compass"; + +#column_nav li { list-style: none ;} + +#content ol.big-numbers li { + padding: 0 0 0 2.5em; +} + +#barnet-wrapper { + width: 100%; + display: table; + caption-side: bottom; +} + +#barnet-powered-by { + clear: both; +} + +body {font-size: 77%; font-family: Arial, Helvetica, sans-serif; color: #3e3d44; padding: 0; margin: 0; line-height: 1.5; background: #e9e9ea;} +body > html {font-size: 12px;} + +#barnet-wrapper {padding: 0; margin: 20px auto; width: 960px; background: #fff;} +#ie_wrapper {display: block; padding: 20px 25px 25px;} +#page {float: left; width: 100%;} + +#mast {clear: both;} + +#mast .pseudoH1 {margin: 0 0 0 -3px; padding: 0; background: url(img/barnet-logo.gif) no-repeat top left; width: 240px; height: 38px; float: left;} +#mast .pseudoH1 a, #mast .pseudoH1 a:link, #mast .pseudoH1 a:visited, #mast .pseudoH1 a:hover, #mast .pseudoH1 a:active {display: block; width: 240px; height: 38px; padding: 0; background: url(img/barnet-logo.gif) no-repeat top left;} +#mast .pseudoH1 span {position: absolute; margin-top: -13000px; top: -13000px;} + +#mast .mast_links {float: right; display: inline; margin: 0; padding: 10px 0 0; list-style: none; overflow: hidden;} + +#mast #search {clear: both; float: right; margin: 8px 0 0; background: #e1e3e4; border-top: 6px solid #bddadc; border-bottom: 2px solid #c8cacb; width: 100%; padding: 3px 0 2px; height: 21px;} + +/* ############################################################## */ + +#content {margin: 0; width: 910px; overflow: hidden; min-height: 350px;} +#content.withWidth {margin: 0 0 0 232px; width: 446px; overflow: hidden; float: left; display: inline;} +#content.fullWidth {width: 678px;} +#content.home {margin-top: 18px;} + +.mappage { + #content.withWidth {margin: 0 0 0 0px; width: auto; overflow: hidden; float: left; display: inline;} + #content.fullWidth {width: 900px;} +} + +/* IE6 ignore the second #foo.bar rule so we have to fudge it another way */ +.ie6 { + .mappage { + #content { + margin: 0 0 0 0px; + overflow: hidden; + float: left; + display: inline; + width: 900px; + } + } +} + +#breadcrumb {font-size: .9em; color: #5c6267; padding: 6px 0; margin: 0 0 0 232px;} +#breadcrumb.full {margin: 0;} +#breadcrumb ul {margin: 0; padding: 0; list-style: none;} +#breadcrumb ul li {margin: 0; padding: 0 4px 0 0; display: inline;} +#breadcrumb ul li a:link, #breadcrumb ul li a:visited, #breadcrumb ul li a:hover, #breadcrumb ul li a:active {color: #5c6267; background: url(img/bcArrow.gif) no-repeat right center; padding: 0 10px 0 0; font-weight: normal;} +#breadcrumb ul li span {font-weight: normal; color: #5c6267;} + +/* ############################################################## */ + +#column_nav {width: 214px; float: left; display: inline; padding: 0; margin: -35px 0 0 -910px; border-right: 3px solid #fff;} + +.ie6 #column_nav { + float: none; + position: absolute; + top: 85px; + margin: 0 0 0 0px; +} + +body.mappage #column_nav { display: none; } + +#content h1 {margin: 0 0 20px; font-size: 1.8em; border-bottom: 6px solid #bed9dd; font-family: Georgia, Times, 'Times New Roman', serif; color: #5d6167;} +#content h1 span {padding: 6px 7px 3px; border: 1px solid #eff1f2; border-bottom: 0 none; display: block;} +#content h1#reports_heading span { display: none; } + +#column_nav .navigation {background: #fff; margin: 0 0 4px;} +#column_nav h2 {font-size: 1.2em; padding: 0; height: 29px; margin: 0; border-radius: 0 0 3px 3px; background: url(img/nav-bg-active.gif) left bottom repeat-x; border-top: 6px solid #bddadc;} +#column_nav #nav1 h2 {border-radius: 0 0 0 3px;} +#column_nav h2 a {color: #fff; padding: 3px 10px 0 26px; display: block; background: url(img/nav-arrow.gif) 8px 7px no-repeat;} +#column_nav .active h2 a {background: url(img/nav-arrow-active.gif) 8px 8px no-repeat;} +#column_nav ul {margin: 0 0 0 4px; padding: 8px 7px 4px; border-width: 0 1px 1px; border-color: #e1e1e1; border-style: solid; border-radius: 3px; list-style: none; background: #fff; background: -moz-linear-gradient(top, #ffffff 0%, #f7f9f8 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f7f9f8)); background: -webkit-linear-gradient(top, #ffffff 0%,#f7f9f8 100%); background: -o-linear-gradient(top, #ffffff 0%,#f7f9f8 100%); background: -ms-linear-gradient(top, #ffffff 0%,#f7f9f8 100%); background: linear-gradient(top, #ffffff 0%,#f7f9f8 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f7f9f8',GradientType=0);} +#column_nav ul li {margin: 0; padding: 2px 4px; border-bottom: 1px solid #bfc0c1; color: #333; font-size: .9em;} +#column_nav ul li.lastItem {border-bottom: none;} +#column_nav ul li a:link, #column_nav ul li a:visited, #column_nav ul li a:hover, #column_nav ul li a:active {display: block; color: #333; font-weight: normal;} +#column_nav ul li a:hover, #column_nav ul li a:active {text-decoration: none; color: #0090a2;} + +/* ############################################################## */ + +#footer {clear: both; margin: 10px 0 0; padding: 15px 0 0; text-align: left;} +#footer p {border-top: 1px solid #dadadb; border-bottom: 1px solid #dadadb; margin: 0 0 5px; color: #5d6167; float: left; display: inline; height: 24px; padding: 8px 0 2px; width: 551px;} +#footer p a {color: #5d6167; font-weight: normal; padding: 0 2px;} +#footer p.assocLinks {float: right; display: inline; padding: 5px 0; width: 359px;} +#footer p.assocLinks a {float: left; display: inline; margin: 0 0 0 8px; padding: 0; background-position: center top; background-repeat: no-repeat; width: 24px; height: 24px;} +#footer p.assocLinks a:active, #footer p.assocLinks a:hover, #footer p.assocLinks a:focus {background-position: center bottom;} +#footer a#goto_browsealoud {background-image: url(img/browsealoud.gif); width: 95px; height: 25px; margin-top: 1px;} +#footer a#goto_directgov {background-image: url(img/directgov.gif); width: 90px; margin: 0 0 0 22px;} +#footer a#share_facebook {background-image: url(img/social1-facebook.gif); margin: 0 0 0 24px;} +#footer a#share_twitter {background-image: url(img/social2-twitter.gif);} +#footer a#share_youtube {background-image: url(img/social3-youtube.gif);} +#footer a#share_flickr {background-image: url(img/social4-flickr.gif);} +#bottomBar {background: url(img/barnet-footer-logo.gif) 771px 12px no-repeat #21aaaa; display: block; width: 100%; height: 56px; border-top: 6px solid #bddadc;} diff --git a/web/cobrands/barnet/base.scss b/web/cobrands/barnet/base.scss new file mode 100644 index 000000000..0447c6779 --- /dev/null +++ b/web/cobrands/barnet/base.scss @@ -0,0 +1,39 @@ +@import "../fixmystreet/_h5bp"; +@import "./_colours"; +@import "../fixmystreet/_mixins"; +@import "compass"; + +@import "../fixmystreet/_base"; + +#mast, +#breadcrumb, +#page-title, +#column_nav, +#footer, +#bottomBar +{ display: none } + +#site-header{ + @include background(none); + background-color: white; +} +#site-logo { + width: 235px; + background: url('/cobrands/barnet/img/barnet-logo.gif') -3px -3px no-repeat; +} +#nav-link { + right: 1em; + background: url('/cobrands/barnet/img/barnet-skipnav.png') no-repeat; +} + +#front-main #postcodeForm div input#submit, +.green-btn, +button.green-btn, +input.green-btn, +.red-btn, +button.red-btn, +input.red-btn{ + @include button-reset; + background: #5D6167; + color: white; +} diff --git a/web/cobrands/barnet/config.rb b/web/cobrands/barnet/config.rb new file mode 100644 index 000000000..cab97b18f --- /dev/null +++ b/web/cobrands/barnet/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/barnet/img/barnet-footer-logo.gif b/web/cobrands/barnet/img/barnet-footer-logo.gif Binary files differnew file mode 100644 index 000000000..afba1cca2 --- /dev/null +++ b/web/cobrands/barnet/img/barnet-footer-logo.gif diff --git a/web/cobrands/barnet/img/barnet-logo.gif b/web/cobrands/barnet/img/barnet-logo.gif Binary files differnew file mode 100644 index 000000000..86e0f4ee8 --- /dev/null +++ b/web/cobrands/barnet/img/barnet-logo.gif diff --git a/web/cobrands/barnet/img/barnet-skipnav.png b/web/cobrands/barnet/img/barnet-skipnav.png Binary files differnew file mode 100644 index 000000000..21efe0f67 --- /dev/null +++ b/web/cobrands/barnet/img/barnet-skipnav.png diff --git a/web/cobrands/barnet/img/bcArrow.gif b/web/cobrands/barnet/img/bcArrow.gif Binary files differnew file mode 100644 index 000000000..4e7c1848e --- /dev/null +++ b/web/cobrands/barnet/img/bcArrow.gif diff --git a/web/cobrands/barnet/img/browsealoud.gif b/web/cobrands/barnet/img/browsealoud.gif Binary files differnew file mode 100644 index 000000000..4fbb3eded --- /dev/null +++ b/web/cobrands/barnet/img/browsealoud.gif diff --git a/web/cobrands/barnet/img/directgov.gif b/web/cobrands/barnet/img/directgov.gif Binary files differnew file mode 100644 index 000000000..1c9dd22e2 --- /dev/null +++ b/web/cobrands/barnet/img/directgov.gif diff --git a/web/cobrands/barnet/img/fms-logo.png b/web/cobrands/barnet/img/fms-logo.png Binary files differnew file mode 100644 index 000000000..23bea6b0f --- /dev/null +++ b/web/cobrands/barnet/img/fms-logo.png diff --git a/web/cobrands/barnet/img/nav-arrow-active.gif b/web/cobrands/barnet/img/nav-arrow-active.gif Binary files differnew file mode 100644 index 000000000..89ff9d0b3 --- /dev/null +++ b/web/cobrands/barnet/img/nav-arrow-active.gif diff --git a/web/cobrands/barnet/img/nav-bg-active.gif b/web/cobrands/barnet/img/nav-bg-active.gif Binary files differnew file mode 100644 index 000000000..0d2ec9873 --- /dev/null +++ b/web/cobrands/barnet/img/nav-bg-active.gif diff --git a/web/cobrands/barnet/img/social1-facebook.gif b/web/cobrands/barnet/img/social1-facebook.gif Binary files differnew file mode 100644 index 000000000..41b404df0 --- /dev/null +++ b/web/cobrands/barnet/img/social1-facebook.gif diff --git a/web/cobrands/barnet/img/social2-twitter.gif b/web/cobrands/barnet/img/social2-twitter.gif Binary files differnew file mode 100644 index 000000000..17f368536 --- /dev/null +++ b/web/cobrands/barnet/img/social2-twitter.gif diff --git a/web/cobrands/barnet/img/social3-youtube.gif b/web/cobrands/barnet/img/social3-youtube.gif Binary files differnew file mode 100644 index 000000000..eeb6ba356 --- /dev/null +++ b/web/cobrands/barnet/img/social3-youtube.gif diff --git a/web/cobrands/barnet/img/social4-flickr.gif b/web/cobrands/barnet/img/social4-flickr.gif Binary files differnew file mode 100644 index 000000000..300e75da0 --- /dev/null +++ b/web/cobrands/barnet/img/social4-flickr.gif diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss new file mode 100644 index 000000000..97b27cfff --- /dev/null +++ b/web/cobrands/barnet/layout.scss @@ -0,0 +1,260 @@ +@import "_colours"; +@import "../fixmystreet/_layout"; + +#mast, +#breadcrumb, +#page-title, +#column_nav, +#footer, +#bottomBar { + display: block; +} + +// So that map appears underneath the header +.wrapper { + position: relative; +} +.ie6, .ie7 { + .wrapper { + padding-top: 1em; + } +} + +#front-main { + background: $primary; + @include border-radius(1em 1em 0 0); + margin-bottom: 1em; + padding-top: 0; + width: 678px; + // layout sets this because base has it slightly lighter + h2 { + color: $primary_text; + } + #front-main-container { + padding: 1em; + } +} + +#front_intro { + float: left; + margin-right: 3em; +} + +#front_recent { + margin-left: 3em; +} + +body.fullwidthpage { + .content { + width: 52em; + } +} +.ie6 { + body.fullwidthpage { + #front-main { + margin-top: -4em; + } + #front-howto, + #front-recently { + width: 26em; + } + .container { + padding: 0; + } + .content { + margin-left: 0px; + width: 55em; + } + div.img { + margin-top: -3.3em; + } + } +} + +body.twothirdswidthpage { + .content { + @include box-shadow(none); + width: 640px; + margin-top: 0; + .sticky-sidebar { + display: none; + aside { + top: 25em; + } + } + } +} + +.nav-wrapper { + display: none; +} + +.mappage { + #breadcrumb { + margin-left: 0px; + } +} + +.frontpage .content { + margin: 0; + @include box-shadow(none); +} +.ie6, .ie7, .ie8 { + .frontpage .content { + border: none; + } +} + +#content .container h1 { + border-bottom: none; + font-size: 2em; + margin-bottom: 0.5em; +} + +.shadow-wrap { + position: static; + padding-top: 0; + margin-bottom: 1em; + ul#key-tools { + border-top: none; + border-bottom: 1px solid $primary; + li { + a.chevron { + background-position: right -3230px; + } + a.feed { + background-position: right -3080px; + } + a.abuse { + background-position: right -2940px; + } + } + } + ul#key-tools.singleton { + li a { + padding-right: 4em; + } + } +} + +#content h1.big-green-banner { + font-size: 1.4em; + margin-left: -2em; + background: #e1e3e4 url(/cobrands/fixmystreet/images/sprite.png) right -2192px no-repeat +} + +body.frontpage { + #user-meta { + p { + top: 1em; + color: $primary_text; + a { + background: none; + } + } + } +} +#user-meta { + float: right; + p { + @include box-shadow(none); + color: $primary_text; + position: relative; + background: none; + a { + color: $primary_text; + background: none; + } + a:hover { + background: $primary; + } + } +} +.ie6 { + #user-meta { + float: none; + p { + position: absolute; + margin-top: 35px; + margin-right: 20px; + right: 0px; + left: auto; + } + + } + .mappage { + #user-meta { + p { + margin-right: -100px; + } + } + } +} + +/* barnet styles */ + +.clear { + clear: both; +} + +.container { + padding: 0 1em; +} + +#site-header, +#site-logo { + display: none !important; +} + + +#report-a-problem-sidebar { + left: 30em; + top: 4em; + width: 17em; + .sidebar-tips, + .sidebar-notes { + font-size: 0.9em; + } +} +.ie6 { + #report-a-problem-sidebar { + margin-top: -4em; + left: 30em; + .sidebar-notes { + padding-bottom: 0.5em; + } + p { + margin-bottom: 0.4em; + } + } +} + + +.general-sidebar-notes { + left: 25em; + width: 14em; + font-size: 1.2em; + p { + margin-bottom: 0 !important; + } +} + +#front-howto #front_stats div big, +ol.big-numbers > li::before { + color: #C0E8E8; +} + +.banner { + p { + top: -2em; + } + p#fixed { + padding-top: 4em; + background: #00BD08; + } +} + + +#map_box { + border: 1px solid black; +} diff --git a/web/cobrands/barnet/position_map.js b/web/cobrands/barnet/position_map.js new file mode 100644 index 000000000..e6d46288e --- /dev/null +++ b/web/cobrands/barnet/position_map.js @@ -0,0 +1,17 @@ +function position_map_box() { + var map_pos = 'absolute', map_height = $('.wrapper').height(); + $('#map_box').prependTo('.wrapper').css({ + zIndex: 0, position: map_pos, + top: 1, left: $('.wrapper').left, + right: 0, bottom: $('.wrapper').bottom + 1, + width: '898px', height: map_height, + margin: 0 + }); +} + +function map_fix() { + var height = $('.wrapper').height() - 3; + $('#map_box').height(height); +} + +var slide_wards_down = 1; diff --git a/web/cobrands/bromley/_colours.scss b/web/cobrands/bromley/_colours.scss index c0376274e..e178c9db2 100644 --- a/web/cobrands/bromley/_colours.scss +++ b/web/cobrands/bromley/_colours.scss @@ -1,8 +1,9 @@ /* COLOURS */ -$primary: rgb(76,120,168); +$primary: rgb(91,120,147); $primary_b: #000000; $primary_text: #ffffff; -$contrast1: #00BD08; +$contrast1: rgb(91,120,147); +$contrast1_dark: darken(rgb(91,120,147), 10%); $contrast2: #AA8D11; diff --git a/web/cobrands/bromley/base.scss b/web/cobrands/bromley/base.scss index 4594f832f..9c5ff2b0f 100644 --- a/web/cobrands/bromley/base.scss +++ b/web/cobrands/bromley/base.scss @@ -5,3 +5,56 @@ @import "../fixmystreet/_base"; +a, a:visited { + color: #369; + &:hover, &:active { + color: #369; + } +} + +h1.main { + color: $primary; + text-align: center; + margin: 0.5em 0; +} + +// Want a white header, and logo is slightly bigger +#site-header { + @include background(linear-gradient(#ddd, #fff 10%, #fff)); + height: 4em; +} + +// Colour tab to match colour scheme +#nav-link { + width: 50px; + height: 48px; + background: url('/cobrands/bromley/tab-blue.png') 0 0 no-repeat; +} + +// Change logo to logo of council +#site-logo { + display: block; + width: 80px; + height: 44px; + top: 0.9em; + background: url('/cobrands/bromley/bromley-logo.s.jpg') 0 0 no-repeat; +} + +#problems-nav { + border-bottom:0.25em solid $primary; + ul li a { + text-transform: none; + &.active { + background: $primary; + color: #fff; + } + } +} + +.big-green-banner { + text-transform: none; +} + +#form_sign_in { + margin-top: 1em; +} diff --git a/web/cobrands/bromley/layout.scss b/web/cobrands/bromley/layout.scss index 3dc34c6c7..f773b47f1 100644 --- a/web/cobrands/bromley/layout.scss +++ b/web/cobrands/bromley/layout.scss @@ -1,11 +1,131 @@ @import "_colours"; @import "../fixmystreet/_layout"; -body { - background: #fff; +body { background: #9b9b9b url('http://www.bromley.gov.uk/site/styles/css_img/repeater.gif') repeat-x; } +#bromley-wrapper { background: #fff url('http://www.bromley.gov.uk/site/styles/css_img/header-corners.gif') center 110px no-repeat; margin: 1px auto 0; padding: 0 15px; width: 955px;} +.offline #bromley-wrapper { padding: 0 15px 20px; } + +// So that map appears underneath the header +.wrapper { + position: relative; +} +.ie6, .ie7 { + .wrapper { + padding-top: 1em; + } } #front-main { background: $primary; + @include border-radius(1em 1em 0 0); + margin-bottom: 1em; + padding-top: 0; + // layout sets this because base has it slightly lighter + h2 { + color: $primary_text; + } +} + +// Don't want gap that normal site has +body.frontpage { + .table-cell { + .content { + margin-top: 0; + } + } +} + +// Don't want FixMyStreet logo on desktop, and we have a skip to content in +// Bromley header +#site-header { + display: none; +} + +#user-meta { + display: none; +} + +// Currently hiding, but do want some internal navigation somewhere at the end +.nav-wrapper { + display: none; +} + +// White background, so no shadow or margin needed. +.content { + margin: 0; + @include box-shadow(none); +} +.ie6, .ie7, .ie8 { + .content { + border: none; + } +} + +// As map can scroll and isn't at the top, give it an edge +#map_box { + border: solid 1px #999; + top: 1em; + right: 0em; + margin: 0; +} + +// Perhaps fix map location (should be in central?) +.ie6 #map_box, .ie7 #map_box { + right: -32em; +} + +.general-sidebar-notes, +#report-a-problem-sidebar { + position: static; + width: auto; + @include box-shadow(rgba(0, 0, 0, 0), 0, 0, 0); + .sidebar-tips, + .sidebar-notes { + font-size:1em; + } +} + +.ie7 .big-green-banner { + right: 0; +} + +// Pull OpenLayers navigation down a bit +#fms_pan_zoom { + top: 0.5em !important; +} + +// Fix location of aside sidebar +body.twothirdswidthpage { + .content { + aside { + @include box-shadow(none); + } + .sticky-sidebar { + aside { + position: absolute; + top: 0; + } + } + } +} +@media only screen and (min-width: 48em) and (max-width: 61em) { + body.twothirdswidthpage { + .content { + .sticky-sidebar { + top: auto; + } + } + } +} + +// So as not to interfere with the Bromley footer, make the fixed nav static. +.shadow-wrap { + position: static; + padding-top: 0; + margin-bottom: 1em; + ul#key-tools { + border-top: none; + border-bottom: 1px solid $primary; + } } diff --git a/web/cobrands/fixmystreet/_layout.scss b/web/cobrands/fixmystreet/_layout.scss index 2e0ebbca7..d9084d928 100644 --- a/web/cobrands/fixmystreet/_layout.scss +++ b/web/cobrands/fixmystreet/_layout.scss @@ -304,7 +304,6 @@ body.fullwidthpage { } // two thirds width page, also has option for a sidebar which can be sticky or not body.twothirdswidthpage { - @extend .fullwidthpage; .content { width:40em; position: relative; diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index 9d5151189..085765c75 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -128,17 +128,7 @@ $(function(){ } else { // Make map full screen on non-mobile sizes. $html.removeClass('mobile'); - var map_pos = 'fixed', map_height = '100%'; - if ($html.hasClass('ie6')) { - map_pos = 'absolute'; - map_height = $(window).height(); - } - $('#map_box').prependTo('.wrapper').css({ - zIndex: 0, position: map_pos, - top: 0, left: 0, right: 0, bottom: 0, - width: '100%', height: map_height, - margin: 0 - }); + position_map_box(); if (typeof fixmystreet !== 'undefined') { fixmystreet.state_map = 'full'; } @@ -479,7 +469,7 @@ $.fn.drawer = function(id, ajax) { }); }; - if ($('html.mobile').length) { + if ($('html.mobile').length || 'slide_wards_down' ) { $('#council_wards').hide().removeClass('hidden-js').find('h2').hide(); $('#key-tool-wards').click(function(e){ e.preventDefault(); @@ -576,6 +566,8 @@ $.fn.drawer = function(id, ajax) { if (!$('html.mobile').length) { if (!($('body').hasClass('frontpage'))){ heightFix(window, '.content', -176); + // in case we have a map that isn't full screen + map_fix(); } } diff --git a/web/cobrands/fixmystreet/position_map.js b/web/cobrands/fixmystreet/position_map.js new file mode 100644 index 000000000..9fee518db --- /dev/null +++ b/web/cobrands/fixmystreet/position_map.js @@ -0,0 +1,16 @@ +function position_map_box() { + var map_pos = 'fixed', map_height = '100%'; + if ($('html').hasClass('ie6')) { + map_pos = 'absolute'; + map_height = $(window).height(); + } + $('#map_box').prependTo('.wrapper').css({ + zIndex: 0, position: map_pos, + top: 0, left: 0, right: 0, bottom: 0, + width: '100%', height: map_height, + margin: 0 + }); +} + +function map_fix() {} +var slide_wards_down = 0; diff --git a/web/fixmystreet_app_cgi.cgi b/web/fixmystreet_app_cgi.cgi index 7d60ce673..dd0984e15 100755 --- a/web/fixmystreet_app_cgi.cgi +++ b/web/fixmystreet_app_cgi.cgi @@ -1,8 +1,11 @@ #!/usr/bin/env perl BEGIN { # set all the paths to the perl code - use FindBin; - require "$FindBin::Bin/../setenv.pl"; + use File::Spec; + use File::Basename; + my $root = dirname(File::Spec->rel2abs(__FILE__)); + + require "$root/../setenv.pl"; } use Catalyst::ScriptRunner; diff --git a/web/fixmystreet_app_fastcgi.cgi b/web/fixmystreet_app_fastcgi.cgi index 1059cbd34..63cb78918 100755 --- a/web/fixmystreet_app_fastcgi.cgi +++ b/web/fixmystreet_app_fastcgi.cgi @@ -1,8 +1,11 @@ #!/usr/bin/env perl BEGIN { # set all the paths to the perl code - use FindBin; - require "$FindBin::Bin/../setenv.pl"; + use File::Spec; + use File::Basename; + my $root = dirname(File::Spec->rel2abs(__FILE__)); + + require "$root/../setenv.pl"; } use Catalyst::ScriptRunner; diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index 7ddaae299..20c2ea720 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -468,6 +468,8 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { // e.xy is relative to top left of map, which might not be top left of page e.xy.x += bo.left; e.xy.y += bo.top; + + // 24 and 64 is the width and height of the marker pin if (e.xy.y <= o.top || (e.xy.x >= o.left && e.xy.x <= o.left + w + 24 && e.xy.y >= o.top && e.xy.y <= o.top + h + 64)) { // top of the page, pin hidden by header; // or underneath where the new sidebar will appear |