diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/default/around/around_index.html | 4 | ||||
-rw-r--r-- | templates/web/default/index.html | 4 | ||||
-rw-r--r-- | templates/web/emptyhomes/index.html | 4 | ||||
-rw-r--r-- | templates/web/fixmybarangay/around/tabbed_lists.html | 20 | ||||
-rw-r--r-- | templates/web/fixmybarangay/footer.html | 31 | ||||
-rw-r--r-- | templates/web/fixmybarangay/header.html | 52 | ||||
-rw-r--r-- | templates/web/fixmybarangay/index.html | 90 | ||||
-rw-r--r-- | templates/web/fixmystreet/alert/index.html | 6 | ||||
-rw-r--r-- | templates/web/fixmystreet/around/around_index.html | 4 | ||||
-rwxr-xr-x | templates/web/fixmystreet/around/display_location.html | 26 | ||||
-rw-r--r-- | templates/web/fixmystreet/around/tabbed_lists.html | 14 | ||||
-rw-r--r-- | templates/web/fixmystreet/header.html | 2 | ||||
-rw-r--r-- | templates/web/fixmystreet/index.html | 4 | ||||
-rw-r--r-- | templates/web/fixmystreet/report/display.html | 5 |
14 files changed, 232 insertions, 34 deletions
diff --git a/templates/web/default/around/around_index.html b/templates/web/default/around/around_index.html index 012354f4a..55ed38341 100644 --- a/templates/web/default/around/around_index.html +++ b/templates/web/default/around/around_index.html @@ -8,9 +8,7 @@ %] [% - question - = c.cobrand.enter_postcode_text() - || loc("Enter a nearby GB postcode, or street name and area"); + question = c.cobrand.enter_postcode_text(); %] <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> diff --git a/templates/web/default/index.html b/templates/web/default/index.html index e5f98b0c5..ab8796688 100644 --- a/templates/web/default/index.html +++ b/templates/web/default/index.html @@ -22,9 +22,7 @@ [% 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"); + question = c.cobrand.enter_postcode_text(); %] <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> diff --git a/templates/web/emptyhomes/index.html b/templates/web/emptyhomes/index.html index bd7261f49..60bdee70c 100644 --- a/templates/web/emptyhomes/index.html +++ b/templates/web/emptyhomes/index.html @@ -38,9 +38,7 @@ The TV series launched a campaign for action and while this is running, our <a h </p> [% - question - = c.cobrand.enter_postcode_text() - || loc("Enter a nearby GB postcode, or street name and area"); + question = c.cobrand.enter_postcode_text(); %] <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> diff --git a/templates/web/fixmybarangay/around/tabbed_lists.html b/templates/web/fixmybarangay/around/tabbed_lists.html new file mode 100644 index 000000000..3ca4d7b2b --- /dev/null +++ b/templates/web/fixmybarangay/around/tabbed_lists.html @@ -0,0 +1,20 @@ +[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); + +IF allow_creation %] +<menu id="problems-nav" class="tab-nav"> + <ul> + <li><a href="#current">Problems on the map</a></li> + <li><a href="#message_manager">Problems via text</a></li> + </ul> +</menu> +[% END %] + +<ul id="current" class="issue-list-a tab"> + [% INCLUDE "around/on_map_list_items.html" %] +</ul> + +[% IF allow_creation %] +<ul id="message_manager" class="issue-list-a tab"> + <li><p>Message Manager texts listed here</p></li> +</ul> +[% END %] diff --git a/templates/web/fixmybarangay/footer.html b/templates/web/fixmybarangay/footer.html new file mode 100644 index 000000000..b548c02df --- /dev/null +++ b/templates/web/fixmybarangay/footer.html @@ -0,0 +1,31 @@ + </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 id="mysoc-logo" href="http://www.mysociety.org/">mySociety</a></li>[% + %]<li><a href="http://mysociety.org/donate/">Donate</a></li>[% + %]<li><a href="http://www.mysociety.org/projects/">Our Sites</a></li> + </ul> + + <ul id="main-menu"> + <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn" + >View problems</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% 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> + +<!-- [% INCLUDE 'debug_footer.html' %] --> + </div> <!-- .wrapper --> +</body> +</html> diff --git a/templates/web/fixmybarangay/header.html b/templates/web/fixmybarangay/header.html new file mode 100644 index 000000000..9779a4919 --- /dev/null +++ b/templates/web/fixmybarangay/header.html @@ -0,0 +1,52 @@ +<!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/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') %]"> + <!--[if (lt IE 9) & (!IEMobile)]> + <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/layout.css') %]"> + <![endif]--> + + <script src="[% version('/js/modernizr.custom.76759.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> + <script src="[% version('/cobrands/fixmybarangay/messages.js') %]" charset="utf-8"></script> + + </head> + <body class="[% bodyclass | html IF bodyclass %]"> + + <div class="wrapper"> + <div class="table-cell"> + <header id="site-header" role="banner"> + <div class="container"> + <a href="/" id="site-logo">[% c.cobrand.site_title %]</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> + [% ELSE %] + <!-- <a href="/auth">[% loc('Sign in') %]</a> --> + [% END %] + </div> + + <div class="container"> + <div class="content[% " $mainclass" | html IF mainclass %]" 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..fd240f218 --- /dev/null +++ b/templates/web/fixmybarangay/index.html @@ -0,0 +1,90 @@ +[%# 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>(like 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="green-btn" style="color:#fff">Bgy. Luz</a> + <a href="/around?latitude=10.295;longitude=123.888" class="green-btn" style="color:#fff">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> + </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/alert/index.html b/templates/web/fixmystreet/alert/index.html index 8d4459c01..9e082650d 100644 --- a/templates/web/fixmystreet/alert/index.html +++ b/templates/web/fixmystreet/alert/index.html @@ -16,12 +16,12 @@ within a certain distance of a particular location.') %] [% INCLUDE 'errors.html' %] [% END %] -<p>[% loc('To find out what local alerts we have for you, please enter your GB - postcode or street name and area' ) %]</p> +<p>[% loc('To find out what local alerts we have for you, please fill in the form below.') %]</p> <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) %]"> + <label for="pc">[% c.cobrand.enter_postcode_text %]:</label> + <input type="text" id="pc" 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> diff --git a/templates/web/fixmystreet/around/around_index.html b/templates/web/fixmystreet/around/around_index.html index 331f34325..3b79a6e8a 100644 --- a/templates/web/fixmystreet/around/around_index.html +++ b/templates/web/fixmystreet/around/around_index.html @@ -8,9 +8,7 @@ %] [% - question - = c.cobrand.enter_postcode_text() - || loc("Enter a nearby GB postcode, or street name and area"); + question = c.cobrand.enter_postcode_text(); %] <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> diff --git a/templates/web/fixmystreet/around/display_location.html b/templates/web/fixmystreet/around/display_location.html index c98982a60..6a5b0e2d2 100755 --- a/templates/web/fixmystreet/around/display_location.html +++ b/templates/web/fixmystreet/around/display_location.html @@ -34,8 +34,11 @@ 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 %]"> @@ -44,6 +47,7 @@ <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 %] @@ -69,6 +73,7 @@ <div id="side"> + [% IF allow_creation %] <h1 class="big-green-banner">[% loc( 'Click map to report a problem' ) %]</h1> <p id="skip-this-step"> @@ -79,6 +84,7 @@ ) %] </p> + [% END %] <div class="shadow-wrap"> <ul id="key-tools" class="singleton"> @@ -87,23 +93,11 @@ </div> <section class="full-width"> - <menu id="problems-nav" class="tab-nav"> - <ul> - <li><a href="#current">[% loc('Problems on the map') %]</a></li> - <li><a href="#current_near">[% loc( 'Problems nearby' ) %]</a></li> - </ul> - </menu> - - <ul id="current" class="issue-list-a tab"> - [% INCLUDE "around/on_map_list_items.html" %] - </ul> - - <ul id="current_near" class="issue-list-a tab"> - [% INCLUDE "around/around_map_list_items.html" %] - </ul> + [% 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, @@ -111,6 +105,10 @@ report.name = c.user.name %] </div> + [% END %] + +[% IF allow_creation %] </form> +[% END %] [% INCLUDE 'footer.html' %] diff --git a/templates/web/fixmystreet/around/tabbed_lists.html b/templates/web/fixmystreet/around/tabbed_lists.html new file mode 100644 index 000000000..77c5a521b --- /dev/null +++ b/templates/web/fixmystreet/around/tabbed_lists.html @@ -0,0 +1,14 @@ +<menu id="problems-nav" class="tab-nav"> + <ul> + <li><a href="#current">[% loc('Problems on the map') %]</a></li> + <li><a href="#current_near">[% loc( 'Problems nearby' ) %]</a></li> + </ul> +</menu> + +<ul id="current" class="issue-list-a tab"> + [% INCLUDE "around/on_map_list_items.html" %] +</ul> + +<ul id="current_near" class="issue-list-a tab"> + [% INCLUDE "around/around_map_list_items.html" %] +</ul> diff --git a/templates/web/fixmystreet/header.html b/templates/web/fixmystreet/header.html index 6be57891a..4c1fd9968 100644 --- a/templates/web/fixmystreet/header.html +++ b/templates/web/fixmystreet/header.html @@ -35,7 +35,7 @@ <div class="table-cell"> <header id="site-header" role="banner"> <div class="container"> - <a href="/" id="site-logo">FixMyStreet</a> + <a href="/" id="site-logo">[% c.cobrand.site_title %]</a> <a href="#main-nav" id="nav-link">Main Navigation</a> </div> </header> diff --git a/templates/web/fixmystreet/index.html b/templates/web/fixmystreet/index.html index 04b23ca7f..5603bdc39 100644 --- a/templates/web/fixmystreet/index.html +++ b/templates/web/fixmystreet/index.html @@ -30,9 +30,7 @@ Modernizr.load({ <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"); + question = c.cobrand.enter_postcode_text(); %] <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html index 0f650b7c2..784c92a48 100644 --- a/templates/web/fixmystreet/report/display.html +++ b/templates/web/fixmystreet/report/display.html @@ -7,6 +7,8 @@ rss = [ loc('Updates to this problem, FixMyStreet'), "/rss/$problem.id" ] robots = 'index, nofollow' bodyclass = 'mappage' + + allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); %] [% map_html %] @@ -51,6 +53,7 @@ [% INCLUDE 'report/updates.html' %] +[% IF allow_creation %] <div id="update_form"> <h2>[% loc( 'Provide an update') %]</h2> @@ -172,7 +175,7 @@ </fieldset> </form> </div> - +[% END %] [% INCLUDE 'footer.html' %] |