diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-07-12 15:18:18 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-07-12 15:18:18 +0100 |
commit | c0b629d8cc92f6e89b6f8e85cd9716d95a39331c (patch) | |
tree | 7c903e2f3dfdf2533e2b65832d0ccf54e1efdb36 /templates | |
parent | 5e85e2e217d5b453212924765d592c235eb93071 (diff) |
Tidy up templates, to make it easier to keep in sync.
Diffstat (limited to 'templates')
-rwxr-xr-x | templates/web/fixmybarangay/around/display_location.html | 115 | ||||
-rw-r--r-- | templates/web/fixmybarangay/auth/general.html | 67 | ||||
-rw-r--r-- | templates/web/fixmybarangay/header.html | 7 | ||||
-rw-r--r-- | templates/web/fixmybarangay/index.html | 91 | ||||
-rw-r--r-- | templates/web/fixmystreet/auth/general.html | 4 | ||||
-rw-r--r-- | templates/web/fixmystreet/index.html | 16 |
6 files changed, 24 insertions, 276 deletions
diff --git a/templates/web/fixmybarangay/around/display_location.html b/templates/web/fixmybarangay/around/display_location.html deleted file mode 100755 index 5dbc13d05..000000000 --- a/templates/web/fixmybarangay/around/display_location.html +++ /dev/null @@ -1,115 +0,0 @@ -[% - - rss_alt = loc('RSS feed'); - rss_title = loc('RSS feed of recent local problems'); - - rss_url - = pc - ? c.uri_for( "/rss/pc", pc ) - : c.uri_for( "/rss/l/$short_latitude,$short_longitude" ); - - email_url = c.uri_for( - '/alert/list', - { - lat => short_latitude, - lon => short_longitude, - feed => "local:$short_latitude:$short_longitude", - } - ); - - url_skip = c.uri_for( - '/report/new', - { - pc => pc - latitude => short_latitude, - longitude => short_longitude, - skipped => 1, - } - ); - - PROCESS "maps/${map.type}.html"; - - INCLUDE 'header.html', - title => loc('Viewing a location') - rss => [ loc('Recent local problems, FixMyStreet'), rss_url ], - bodyclass => 'mappage', - robots => 'noindex,nofollow'; - - allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); -%] - -[% IF allow_creation %] -<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate"> - [% IF c.req.params.map_override %] - <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> - [% END %] - <input type="hidden" name="pc" value="[% pc | html %]"> - - <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]"> - <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]"> -[% END %] - - [% map_html %] - - <p id='sub_map_links'> - [% IF c.req.params.no_pins %] - <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 0 } ) %]'>[% loc('Show pins') %]</a> - [% ELSE %] - <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 1 } ) %]'>[% loc('Hide pins') %]</a> - [% END %] - [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %] - [% IF c.req.params.all_pins %] - <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide old') %]</a> - [% ELSE %] - <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Show old') %]</a> - [% END %] - [% END %] - </p> - - </div> - - - - - <div id="side"> - - [% IF allow_creation %] - <h1 class="big-green-banner"> - [% loc( 'Click map to report a problem' ) %] - </h1> - <p id="skip-this-step"> - [% - tprintf( - loc("Can't see the map? <a href='%s' rel='nofollow'>Skip this step</a>"), - url_skip - ) - %] - </p> - [% END %] - - <div class="shadow-wrap"> - <ul id="key-tools" class="singleton"> - <li><a class="feed" id="key-tool-around-updates" href="[% email_url | html %]">Get updates</a></li> - </ul> - </div> - - <section class="full-width"> - [% INCLUDE "around/tabbed_lists.html" %] - </section> - </div> - - [% IF allow_creation %] - <div style="display:none" id="side-form"> - [% INCLUDE "report/new/fill_in_details_form.html" - js = 1, - report.used_map = 1 - report.name = c.user.name - %] - </div> - [% END %] - -[% IF allow_creation %] -</form> -[% END %] - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/fixmybarangay/auth/general.html b/templates/web/fixmybarangay/auth/general.html deleted file mode 100644 index e51434c17..000000000 --- a/templates/web/fixmybarangay/auth/general.html +++ /dev/null @@ -1,67 +0,0 @@ -[% INCLUDE 'header.html', title = loc('Sign in or create an account') %] - -<h1>[% loc('Sign in') %]</h1> - -<form action="[% c.uri_for() %]" method="post" name="general_auth" class="validate"> - <fieldset> - <input type="hidden" name="r" value="[% c.req.params.r | html %]"> - - [% IF email_error; - - # other keys include fqdn, mxcheck if you'd like to write a custom error message - - errors = { - missing => loc('Please enter your email'), - other => loc('Please check your email address is correct') - }; - - loc_email_error = errors.$email_error || errors.other; - END %] - <label class="n" for="email">[% loc('Email') %]</label> - [% IF loc_email_error %] - <div class="form-error">[% loc_email_error %]</div> - [% ELSIF sign_in_error %] - <div class="form-error">[% loc('There was a problem with your email/password combination. If you cannot remember your password, or do not have one, please fill in the ‘sign in by email’ section of the form.') %]</div> - [% END %] - <input type="email" class="required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]"> - - <div id="form_sign_in"> - <h3>[% loc("Do you have a FixMyBarangay password?") %]</h3> - - <div id="form_sign_in_yes" class="form-box"> - <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5> - - <label class="hidden-js n" for="password_sign_in">[% loc('<strong>Yes</strong> I have a password') %]</label> - - <div class="form-txt-submit-box"> - <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]"> - <input class="green-btn" type="submit" name="sign_in" value="[% loc('Sign in') %]"> - </div> - - <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> - <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label> - - </div> - <div id="form_sign_in_no" class="form-box"> - <h5>[% loc('<strong>No</strong> let me sign in by email') %]</h5> - - <div class="general-sidebar-notes"> - <p>Providing a name and password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.</p> - </div> - - <label for="name">[% loc('Name') %]</label> - <input type="text" name="name" value="" placeholder="[% loc('Your name') %]"> - - <label for="password_register">[% loc('Password (optional)') %]</label> - <div class="form-txt-submit-box"> - <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> - <input class="green-btn" type="submit" name="email_sign_in" value="[% loc('Sign in') %]"> - </div> - </div> - - </div> - </fieldset> -</form> - - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/fixmybarangay/header.html b/templates/web/fixmybarangay/header.html index 052b2dd4d..245f58d6d 100644 --- a/templates/web/fixmybarangay/header.html +++ b/templates/web/fixmybarangay/header.html @@ -13,7 +13,7 @@ <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/base.css') %]"> <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/layout.css') %]" media="(min-width:48em)"> - <link rel="stylesheet" href="[% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]"> + [% extra_css %] <!--[if (lt IE 9) & (!IEMobile)]> <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/layout.css') %]"> <![endif]--> @@ -21,8 +21,7 @@ <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> <script src="[% version('/cobrands/fixmybarangay/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> - + [% extra_js %] [% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); %] [% IF allow_creation %] @@ -63,6 +62,8 @@ [% END %] </div> + [% pre_container_extra %] + <div class="container"> <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> diff --git a/templates/web/fixmybarangay/index.html b/templates/web/fixmybarangay/index.html deleted file mode 100644 index 76ce69c28..000000000 --- a/templates/web/fixmybarangay/index.html +++ /dev/null @@ -1,91 +0,0 @@ -[%# 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>View local problems</h1> - <h2>(potholes or street lighting)</h2> - - <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> - <p> - <a href="/around?latitude=10.322;longitude=123.907" class="yellow-btn">Bgy. Luz</a> - <a href="/around?latitude=10.288;longitude=123.870" class="yellow-btn">Bgy. Basak San Nicolas</a> - </p> - </form> - </div> -</div> - -<div class="tablewrapper"> - <div id="front-howto"> - <h2>[% loc('How to report a problem') %]</h2> - - <ol class="big-numbers"> - <li>Text LUZ or BSN followed by your report to 12345</li> - <li>Visit the Barangay Center in person</li> - <li>Staff? <a href="/auth">Sign in</a> and click on the map! - </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/fixmystreet/auth/general.html b/templates/web/fixmystreet/auth/general.html index 6ecbcadc5..7fa2b57fe 100644 --- a/templates/web/fixmystreet/auth/general.html +++ b/templates/web/fixmystreet/auth/general.html @@ -26,7 +26,11 @@ <input type="email" class="required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]"> <div id="form_sign_in"> + [% IF c.cobrand.moniker == 'fixmybarangay' %] + <h3>[% loc("Do you have a FixMyBarangay password?") %]</h3> + [% ELSE %] <h3>[% loc("Do you have a FixMyStreet password?") %]</h3> + [% END %] <div id="form_sign_in_yes" class="form-box"> <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5> diff --git a/templates/web/fixmystreet/index.html b/templates/web/fixmystreet/index.html index 808fbd420..922999f88 100644 --- a/templates/web/fixmystreet/index.html +++ b/templates/web/fixmystreet/index.html @@ -21,6 +21,9 @@ Modernizr.load({ <div id="front-main-container"> [% IF c.cobrand.moniker == 'bromley' %] <h1 class="main mob-only">Reporting a problem in Bromley’s streets or parks</h1> + [% ELSIF c.cobrand.moniker == 'fixmybarangay' %] + <h1>View local problems</h1> + <h2>(potholes or street lighting)</h2> [% ELSE %] <h1>[% loc('Report, view, or discuss local problems') %]</h1> <h2>[% loc('(like graffiti, fly tipping, broken paving slabs, or street lighting)') %]</h2> @@ -31,11 +34,18 @@ Modernizr.load({ %] <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> + [% IF c.cobrand.moniker == 'fixmybarangay' %] + <p> + <a href="/around?latitude=10.322;longitude=123.907" class="yellow-btn">Bgy. Luz</a> + <a href="/around?latitude=10.288;longitude=123.870" class="yellow-btn">Bgy. Basak San Nicolas</a> + </p> + [% ELSE %] <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> + [% END %] </form> </div> </div> @@ -56,6 +66,11 @@ kinds of problems like missed bins use our <h2>[% loc('How to report a problem') %]</h2> <ol class="big-numbers"> + [% IF c.cobrand.moniker == 'fixmybarangay' %] + <li>Text LUZ or BSN followed by your report to 12345</li> + <li>Visit the Barangay Center in person</li> + <li>Staff? <a href="/auth">Sign in</a> and click on the map! + [% ELSE %] <li>[% question %]</li> <li>[% loc('Locate the problem on a map of the area') %]</li> <li>[% loc('Enter details of the problem') %]</li> @@ -64,6 +79,7 @@ kinds of problems like missed bins use our [% ELSE %] <li>[% loc('We send it to the council on your behalf') %]</li> [% END %] + [% END %] </ol> <section class="full-width"> |