diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Council.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyBarangay.pm | 24 | ||||
-rw-r--r-- | templates/web/fixmybarangay/header.html | 38 | ||||
-rw-r--r-- | templates/web/fixmybarangay/index.html | 93 |
4 files changed, 18 insertions, 139 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Council.pm b/perllib/FixMyStreet/App/Controller/Council.pm index 48248e4fe..c4819765a 100644 --- a/perllib/FixMyStreet/App/Controller/Council.pm +++ b/perllib/FixMyStreet/App/Controller/Council.pm @@ -82,7 +82,7 @@ sub load_and_check_councils : Private { $c->cobrand->remove_redundant_councils($all_councils) if $c->stash->{remove_redundant_councils}; # If we don't have any councils we can't accept the report - if ( !scalar keys %$all_councils ) { + if ( !scalar keys %$all_councils || $all_councils->{error}) { $c->stash->{location_offshore} = 1; return; } diff --git a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm index 965096911..0328ff334 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm @@ -1,22 +1,32 @@ package FixMyStreet::Cobrand::FixMyBarangay; -use base 'FixMyStreet::Cobrand::UKCouncils'; +use base 'FixMyStreet::Cobrand::Default'; use strict; use warnings; -sub council_id { return 0; } -sub council_area { return 'FixMyBarangay'; } -sub council_name { return 'FixMyBarangay'; } -sub council_url { return 'fmb'; } +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 country { + return 'PH'; +} sub disambiguate_location { return { country => 'ph', - bing_culture => 'en', - bing_country => 'The Philippines' + bing_country => 'Philippines', }; } +sub site_title { + my ($self) = @_; + return 'FixMyBarangay'; +} 1; diff --git a/templates/web/fixmybarangay/header.html b/templates/web/fixmybarangay/header.html deleted file mode 100644 index b08cc693d..000000000 --- a/templates/web/fixmybarangay/header.html +++ /dev/null @@ -1,38 +0,0 @@ -<!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 gt IE 8]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> - <head> - <meta name="viewport" content="initial-scale=1.0"> - <meta name="apple-mobile-web-app-capable" content="yes"> - <meta name="apple-mobile-web-app-status-bar-style" content="black"> - <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('/css/core.css') %]"> - - [% INCLUDE 'common_header_tags.html' %] - - </head> - <body> - -<div id="wrapper"><div id="wrapper2"><div id="wrapper3"> - - [% IF NOT title AND NOT c.req.path %]<h1 id="header" role="banner">[% ELSE %]<div id="header" role="banner"><a href="/">[% END - %] FixMyBarangay - [%- IF NOT title AND NOT c.req.path %]</h1>[% ELSE %]</a></div>[% END %] - - <ul id="meta"> - [% IF c.user_exists %] - <li>[% tprintf(loc('Signed in as %s'), c.user.name || c.user.email) %] - <li class="last"><a href="/auth/sign_out">[% loc('Sign out') %]</a></li> - [% ELSE %] - <li> </li> - [% END %] - </ul> - - <div id="mysociety" class="container" role="main"> - - [% INCLUDE 'debug_header.html' %] diff --git a/templates/web/fixmybarangay/index.html b/templates/web/fixmybarangay/index.html deleted file mode 100644 index f43c420a0..000000000 --- a/templates/web/fixmybarangay/index.html +++ /dev/null @@ -1,93 +0,0 @@ -[% INCLUDE 'header.html', title => '' %] - -[% IF error %] - <p class="error">[% error %]</p> -[% END %] -<p id="expl"> - [% - subhead - = c.cobrand.moniker == 'southampton' - ? '(like graffiti, fly tipping, or broken paving slabs)' - : loc('(like graffiti, fly tipping, broken paving slabs, or street lighting)'); - %] - - <strong>[% loc('Report, view, or discuss local problems') %]</strong> - - [% IF subhead != ' ' %] - <small>[% subhead %]</small> - [% END %] -</p> - -[% TRY %][% INCLUDE 'front/news.html' %][% CATCH file %][% END %] - -[% - 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> - <span><input type="text" name="pc" value="" id="pc" size="10" maxlength="200"> - <input type="submit" value="[% loc('Go') %]" id="submit"> - </span> -</form> - -<div id="front_intro"> - - <h2>[% loc('How to report a problem') %]</h2> - - <ol> - <li>[% question %]</li> - <li>[% loc('Locate the problem on a map of the area') %]</li> - <li>[% loc('Enter details of the problem') %]</li> - <li>[% loc('We send it to the council on your behalf') %]</li> - </ol> - - [% INCLUDE "front/stats.html" %] - [% TRY %][% INCLUDE "front/tips.html" %][% CATCH file %][% END %] - -</div> - -[% - recent_photos = c.cobrand.recent_photos(3); - probs = c.cobrand.recent(); -%] - -<!-- =============================================================================== --> -[% IF c.user AND c.user.belongs_to_council %] - <p>user</p> -[% ELSE %] - <p>read-only user</p> -[% END %] -</div> -<!-- =============================================================================== --> - -[% IF probs.size || recent_photos.size %] -<div id="front_recent"> - <h2>[% loc('Recently reported problems') %]</h2> - [% IF recent_photos.size %] - <p id="front_photos"> - [% FOREACH p IN recent_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 %] - </p> - [% END %] - - [% IF probs.size %] - - - <ul id="nearby_lists"> - [% FOREACH p IN probs %] - <li> - <a href="/report/[% p.id %]">[% p.title | html %]</a> - <small>[% prettify_epoch( p.confirmed_local.epoch, 1 ) %]</small> - </li> - [% END %] - </ul> - [% END %] -</div> -[% END %] - -[% INCLUDE 'footer.html' %] |