diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-04-20 12:10:16 +0100 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-04-20 12:10:16 +0100 |
commit | 1dfa315b15c2b108124b6db59e25fcd0c79bb8b7 (patch) | |
tree | 7384511859c1b230aee6d6c94d90a30e9e186b05 | |
parent | ddfed3e1b445a16c50b874947790a0de7de2a178 (diff) |
initial FixMyBarangay cobrand
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyBarangay.pm | 22 | ||||
-rw-r--r-- | templates/web/fixmybarangay/header.html | 38 | ||||
-rw-r--r-- | templates/web/fixmybarangay/index.html | 93 |
3 files changed, 153 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm new file mode 100644 index 000000000..9c4ceb0ce --- /dev/null +++ b/perllib/FixMyStreet/Cobrand/FixMyBarangay.pm @@ -0,0 +1,22 @@ +package FixMyStreet::Cobrand::FixMyBarangay; +use base 'FixMyStreet::Cobrand::UKCouncils'; + +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 disambiguate_location { + return { + country => 'ph', + bing_culture => 'ph', + bing_country => 'The Philippines' + }; +} + + +1; + diff --git a/templates/web/fixmybarangay/header.html b/templates/web/fixmybarangay/header.html new file mode 100644 index 000000000..b08cc693d --- /dev/null +++ b/templates/web/fixmybarangay/header.html @@ -0,0 +1,38 @@ +<!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 new file mode 100644 index 000000000..f43c420a0 --- /dev/null +++ b/templates/web/fixmybarangay/index.html @@ -0,0 +1,93 @@ +[% 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' %] |