diff options
Diffstat (limited to 'templates/web/base')
58 files changed, 650 insertions, 519 deletions
diff --git a/templates/web/base/admin/category_edit.html b/templates/web/base/admin/category_edit.html index b827a4b6d..c0bd43ef5 100644 --- a/templates/web/base/admin/category_edit.html +++ b/templates/web/base/admin/category_edit.html @@ -43,6 +43,9 @@ [% IF c.cobrand.moniker != 'zurich' %] <input type="checkbox" name="non_public" value="1" id="non_public"[% ' checked' IF contact.non_public %]> <label class="inline" for="non_public">[% loc('Private') %]</label> + [% ELSE %] + <input type="checkbox" name="photo_required" value="1" id="photo_required"[% ' checked' IF contact.get_extra_metadata('photo_required') %]> + <label class="inline" for="photo_required">[% loc('Photo required') %]</label> [% END %] </p> diff --git a/templates/web/base/admin/config_page.html b/templates/web/base/admin/config_page.html index 7c9b5e317..71c524fb3 100644 --- a/templates/web/base/admin/config_page.html +++ b/templates/web/base/admin/config_page.html @@ -42,7 +42,7 @@ running version <strong>[% git_version || 'unknown' %]</strong>. [% INCLUDE subsection heading="Display" %] <tr> <td>Site title</td> - <td colspan=2>[% PROCESS 'site-name.html' -%]</td> + <td colspan=2>[% site_name %]</td> </tr> [% allowed_conf = FOR k IN c.config.ALLOWED_COBRANDS %] [% IF k.keys %][% k.items.join(':') %][% ELSE %][% k %][% END %] diff --git a/templates/web/base/admin/footer.html b/templates/web/base/admin/footer.html index 4c891c4ff..59ef6a32c 100644 --- a/templates/web/base/admin/footer.html +++ b/templates/web/base/admin/footer.html @@ -1 +1 @@ -[% INCLUDE 'footer.html' %] +[% INCLUDE 'footer.html' admin = 1 %] diff --git a/templates/web/base/admin/header.html b/templates/web/base/admin/header.html index 6282bf383..145bb986d 100644 --- a/templates/web/base/admin/header.html +++ b/templates/web/base/admin/header.html @@ -7,7 +7,7 @@ dd { margin-left: 8em; } select { width: auto; } </style> - <p><strong>[% loc('FixMyStreet admin:') %]</strong> + <p><strong>[% tprintf(loc('%s admin:', "%s here is the site name"), site_name) %]</strong> [%- FOREACH link IN allowed_links %] <a href="[% c.uri_for( link ) %]">[% allowed_pages.$link.0 %]</a> [% IF NOT loop.last %]|[% END %] diff --git a/templates/web/base/admin/index.html b/templates/web/base/admin/index.html index c9d2b8deb..dde6523a3 100644 --- a/templates/web/base/admin/index.html +++ b/templates/web/base/admin/index.html @@ -1,7 +1,8 @@ [% INCLUDE 'admin/header.html' title=loc('Summary') -%] +[% PROCESS 'admin/report_blocks.html' %] <div class="fms-admin-info fms-admin-floated"> -This is the administration interface for [% PROCESS 'site-name.html' -%]. If you +This is the administration interface for [% site_name %]. If you need any help or guidance, there is <a href="http://fixmystreet.org/">plenty of online documentation</a>. The FixMyStreet Platform is <a href="https://github.com/mysociety/fixmystreet">actively supported</a> by @@ -20,11 +21,9 @@ and to receive notices of updates. [% END %] [%- BLOCK states -%] -<h2>[% title %]</h2> - -[%- FOREACH state IN object.keys.sort %] +[%- FOREACH state IN list %] [%- '<ul>' IF loop.first %] - <li>[% object.$state %] [% state %]</li> + <li>[% object.$state %] [% state_pretty.$state %]</li> [%- "\n</ul>" IF loop.last %] [%- END %] [% END -%] @@ -44,18 +43,28 @@ and to receive notices of updates. </p> [% END -%] -[% PROCESS states title=loc('Problem breakdown by state') object=problems %] +<h2>[% loc('Problem breakdown by state') %]</h2> +[% FOREACH group IN state_groups %] +[%- '<ul>' IF loop.first %] + <li><strong>[% group.0 %]</strong> + [% PROCESS states object=problems list=group.1 %] + </li> +[%- "\n</ul>" IF loop.last %] +[%- END %] -[% PROCESS states title=loc('Update breakdown by state') object=comments %] +<h2>[% loc('Update breakdown by state') %]</h2> +[% PROCESS states object=comments list=comments.keys.sort %] -[% FOREACH category IN categories %] - [% IF loop.first %] - <h2>[% loc('Category fix rate for problems > 4 weeks old') %]</h2> +[% IF categories.size %] + <h2 id="category-fix-rate">[% loc('Category fix rate for problems > 4 weeks old') %]</h2> <table> <tr><th>[% loc('Category') %]</th><th>[% loc('Total') %]</th><th>[% loc('Fixed') %]</th></tr> - [% END %] +[% FOREACH category IN categories %] <tr><td>[% category.key %]</td><td>[% category.value.total %]</td><td>[% category.value.fixed / category.value.total * 100 | format('%.1f') %]%</td></tr> - [% '</table>' IF loop.last %] +[% END %] + </table> +[% ELSE %] +<p><a href="?show_categories=1#category-fix-rate">[% loc('Category fix rate for problems > 4 weeks old') %]</a></p> [% END %] [% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/base/admin/list_updates.html b/templates/web/base/admin/list_updates.html index d3701bc1e..35f7adf66 100644 --- a/templates/web/base/admin/list_updates.html +++ b/templates/web/base/admin/list_updates.html @@ -34,7 +34,7 @@ <td>[% IF update.user.id == update.problem.user_id %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> <td>[% IF update.user.belongs_to_body( update.problem.bodies_str ) %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> <td>[% update.cobrand %]<br>[% update.cobrand_data | html %]</td> - <td>[% update.state %]<br><small> + <td>[% state_pretty.${update.state} %]<br><small> [% loc('Created:') %] [% PROCESS format_time time=update.created %] <br>[% loc('Confirmed:') %] [% PROCESS format_time time=update.confirmed %] </small></td> diff --git a/templates/web/base/admin/problem_row.html b/templates/web/base/admin/problem_row.html index 2413a6062..577e36992 100644 --- a/templates/web/base/admin/problem_row.html +++ b/templates/web/base/admin/problem_row.html @@ -30,7 +30,7 @@ [%- END -%] <br>[% problem.cobrand %]<br>[% problem.cobrand_data | html %] </td> - <td>[% problem.state %]<br><small> + <td>[% state_pretty.${problem.state} %]<br><small> [% loc('Created') %]: [% PROCESS format_time time=problem.created %] <br>[% loc('When sent') %]: [% PROCESS format_time time=problem.whensent %] [%- IF problem.is_visible %]<br>[% loc('Confirmed:' ) %] [% PROCESS format_time time=problem.confirmed %][% END -%] diff --git a/templates/web/base/admin/report_blocks.html b/templates/web/base/admin/report_blocks.html index c2cffc352..941bff821 100644 --- a/templates/web/base/admin/report_blocks.html +++ b/templates/web/base/admin/report_blocks.html @@ -1,3 +1,33 @@ +[% + +SET state_pretty = { + 'confirmed' = loc('Open') + 'investigating' = loc('Investigating') + 'planned' = loc('Planned') + 'in progress' = loc('In progress') + 'action scheduled' = loc('Action Scheduled') + 'fixed' = loc('Fixed') + 'fixed - user' = loc('Fixed - User') + 'fixed - council' = loc('Fixed - Council') + 'unable to fix' = loc('Unable to fix') + 'not responsible' = loc('Not Responsible') + 'duplicate' = loc('Duplicate') + 'closed' = loc('Closed') + 'internal referral' = loc('Internal referral') + 'hidden' = loc('Hidden') + 'partial' = loc('Partial') + 'unconfirmed' = loc('Unconfirmed') +}; + +SET state_groups = [ + [ loc('Open'), [ 'confirmed', 'investigating', 'planned', 'in progress', 'action scheduled' ] ], + [ loc('Fixed'), [ 'fixed', 'fixed - user', 'fixed - council' ] ], + [ loc('Closed'), [ 'unable to fix', 'not responsible', 'duplicate', 'closed', 'internal referral' ] ], + [ loc('Hidden'), [ 'hidden', 'partial', 'unconfirmed' ] ] +]; + +%] + [% BLOCK value_or_nbsp -%] [%- IF value %][% value | html %][% ELSE %] [% END %] [%- END %] diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html index d488dcadc..d04a1a82b 100644 --- a/templates/web/base/admin/report_edit.html +++ b/templates/web/base/admin/report_edit.html @@ -45,28 +45,10 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a> <li>[% loc('Property address:') %] [% problem.extra.address | html %]</li> [% END %] <li><label class="inline" for="state">[% loc('State:') %]</label> <select name="state" id="state"> -[% FOREACH group IN [ - [ loc('Open'), [ - [ 'confirmed', loc('Open') ], [ 'investigating', loc('Investigating') ], - [ 'planned', loc('Planned') ], [ 'in progress', loc('In progress') ], - [ 'action scheduled', loc('Action Scheduled') ], - ] ], - [ loc('Fixed'), [ - [ 'fixed', loc('Fixed') ], [ 'fixed - user', loc('Fixed - User') ], - [ 'fixed - council', loc('Fixed - Council') ] - ] ], - [ loc('Closed'), [ - [ 'unable to fix', loc('Unable to fix') ], [ 'not responsible', loc('Not Responsible') ], - [ 'duplicate', loc('Duplicate') ], [ 'closed', loc('Closed') ], - [ 'internal referral', loc('Internal referral') ], - ] ], - [ loc('Hidden'), [ - [ 'hidden', loc('Hidden') ], [ 'partial', loc('Partial') ], [ 'unconfirmed',loc('Unconfirmed') ] - ] ] -] %] +[% FOREACH group IN state_groups %] <optgroup label="[% group.0 %]"> [% FOREACH state IN group.1 %] - <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option> + <option [% 'selected ' IF state == problem.state %] value="[% state %]">[% state_pretty.$state %]</option> [% END %] </optgroup> [% END %] diff --git a/templates/web/base/alert/_list.html b/templates/web/base/alert/_list.html index 2ffcfae39..395948248 100644 --- a/templates/web/base/alert/_list.html +++ b/templates/web/base/alert/_list.html @@ -1,11 +1,13 @@ <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.') %] + [% 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' %] @@ -16,14 +18,15 @@ <p id="rss_local"> <input type="radio" name="feed" id="[% rss_feed_id %]" value="[% rss_feed_id %]"[% IF rss_feed_id == selected_feed || selected_feed == '' %] checked[% END %]> - <label for="[% rss_feed_id %]">[% tprintf( loc('Problems within %.1fkm of this location'), population_radius ) %]</label> - [% loc('(a default distance which covers roughly 200,000 people)') %] <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> + <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>) + [% SET distance_options = '<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>' %] + [% tprintf(loc('(alternatively the RSS feed can be customised, within %s)', "%s is a list of distance links, e.g. [2km] / [5km] / [10km] / [20km]"), distance_options) %] </p> <p> @@ -35,21 +38,20 @@ </p> [% IF reported_to_options %] - <div id="rss_list"> <p><strong> [% loc('Problems within the boundary of:') %] </strong></p> <ul class="plain-list"> [% ELSE %] - <div><ul id="rss_feed"> + <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 %]> - <label class="inline" for="[% option.id %]">[% option.text %]</label> <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> @@ -61,40 +63,31 @@ title="[% option.rss_text %]" alt="RSS feed" border="0"></a> [% 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 %]> - <label class="inline" for="[% option.id %]">[% option.text %]</label> <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 + [% tprintf(loc('%s 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.' ) %] +for the county council.', "%s is the site name"), site_name) %] </small></p> -</div> -<div id="rss_buttons"> [% END %] - <p> - <input type="submit" name="rss" value="[% loc('Give me an RSS feed') %]"> - <p> + <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 %] - <p> - [% loc('Your email:') %] <input type="text" id="rznvy" name="rznvy" value="[% rznvy | html %]" size="30"> - </p> + <label for="rznvy">[% loc('Your email') %]</label> + <input type="text" id="rznvy" name="rznvy" value="[% rznvy | html %]"> [% END %] - - <p> - <input type="submit" name="alert" value="[% loc('Subscribe me to an email alert') %]"> - </p> - </div> <!-- ???? --> + <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/base/alert/index.html b/templates/web/base/alert/index.html index 314008846..2b12182df 100644 --- a/templates/web/base/alert/index.html +++ b/templates/web/base/alert/index.html @@ -4,13 +4,13 @@ <p> [% IF c.cobrand.is_council %] -FixMyStreet has a variety of RSS feeds and email alerts for local problems, including -alerts for all problems within a particular ward, or all problems -within a certain distance of a particular location. +[% tprintf(loc('%s has a variety of RSS feeds and email alerts for local +problems, including alerts for all problems within a particular ward, or all +problems within a certain distance of a particular location.', "%s is the site name"), site_name) %] [% ELSE %] -[% loc('FixMyStreet has a variety of RSS feeds and email alerts for local problems, including +[% tprintf(loc('%s has a variety of RSS feeds and email alerts for local problems, including alerts for all problems within a particular ward or council, or all problems -within a certain distance of a particular location.') %] +within a certain distance of a particular location.', "%s is the site name"), site_name) %] [% END %] </p> @@ -22,12 +22,12 @@ within a certain distance of a particular location.') %] <p> [% IF c.cobrand.is_council %] -To find out what local alerts we have for you, please enter your [% c.cobrand.council_area %] postcode or street name and area: +[% tprintf(loc('To find out what local alerts we have for you, please enter your %s postcode or street name and area:'), c.cobrand.council_area) %] [% ELSE %] [% loc('To find out what local alerts we have for you, please enter your postcode or street name and area' ) %] [% END %] </p> -<form method="get" action="/alert/list" class="full-width"> +<form method="get" action="/alert/list" class="form-box"> <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) %]"> diff --git a/templates/web/base/around/_error_multiple.html b/templates/web/base/around/_error_multiple.html new file mode 100644 index 000000000..15089ba6b --- /dev/null +++ b/templates/web/base/around/_error_multiple.html @@ -0,0 +1,19 @@ +[% IF location_error %] + [% INCLUDE 'around/location_error.html' %] +[% END %] + +[% IF possible_location_matches %] + <p>[% loc('We found more than one match for that location. We show up to ten matches, please try a different search if yours is not here.') %]</p> + <ul class="pc_alternatives"> + [% FOREACH match IN possible_location_matches %] + <li><a href="/around?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %]">[% match.address | html %]</a></li> + [% END %] + </ul> +[% END %] + +[% IF partial_token %] + <p style="margin-top: 0; color: #cc0000;"> + <img align="right" src="/photo/[% partial_report.id %].jpeg" hspace="5"> + [% loc("Thanks for uploading your photo. We now need to locate your problem, so please enter a nearby street name or postcode in the box above :") %] + </p> +[% END %] diff --git a/templates/web/base/around/_main.html b/templates/web/base/around/_main.html new file mode 100644 index 000000000..1b832cb49 --- /dev/null +++ b/templates/web/base/around/_main.html @@ -0,0 +1,8 @@ +<form action="[% c.uri_for('/around') %]" method="get" name="mapForm" id="mapForm"> + <div id="side-form"> + <div id="report-a-problem-main"> + [% pre_container_extra %] + [% INCLUDE 'around/_error_multiple.html' %] + </div> + </div> +</form> diff --git a/templates/web/base/around/_report_banner.html b/templates/web/base/around/_report_banner.html index 024fe08d9..9fcfe3640 100755 --- a/templates/web/base/around/_report_banner.html +++ b/templates/web/base/around/_report_banner.html @@ -1,10 +1,6 @@ -<p id="text_map" class="banner"> - [% loc( 'To <strong>report a problem</strong>, click on the map at the correct location.' ) %] - [% - tprintf( - loc("<small>If you cannot see the map, <a href='%s' rel='nofollow'>skip this step</a>.</small>"), - url_skip - ) - %] - <span id="text_map_arrow"></span> -</p> +<h1 class="big-green-banner"> + [% loc( 'Click map to report a problem' ) %] +</h1> +<a id="skip-this-step" href="[% url_skip %]" rel="nofollow"> + [% loc("Can't see the map? <em>Skip this step</em>") %] +</a> diff --git a/templates/web/base/around/around_index.html b/templates/web/base/around/around_index.html deleted file mode 100644 index 3b2714643..000000000 --- a/templates/web/base/around/around_index.html +++ /dev/null @@ -1,27 +0,0 @@ -[% - SET bodyclass = 'mappage'; - INCLUDE 'header.html', title => loc('Reporting a problem') -%] - -<form action="[% c.uri_for('/around') %]" method="get" name="mapForm" id="mapForm"> - <div id="side-form"> - <div id="report-a-problem-main"> - [% INCLUDE 'around/postcode_form.html' %] - - [% IF location_error %] - [% INCLUDE 'around/location_error.html' %] - [% END %] - - [% IF possible_location_matches %] - <p>[% loc('We found more than one match for that location. We show up to ten matches, please try a different search if yours is not here.') %]</p> - <ul class="pc_alternatives"> - [% FOREACH match IN possible_location_matches %] - <li><a href="/around?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %]">[% match.address | html %]</a></li> - [% END %] - </ul> - [% END %] - </div> - </div> -</form> - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/base/around/around_map_list_items.html b/templates/web/base/around/around_map_list_items.html deleted file mode 100644 index da75561b5..000000000 --- a/templates/web/base/around/around_map_list_items.html +++ /dev/null @@ -1,18 +0,0 @@ -[% IF around_map.size %] - [% FOREACH p IN around_map %] - - [% dist = tprintf("%.1f", (p.distance || 0) ) %] - - <li> - <a href="[% c.uri_for('/report', p.problem.id ) %]">[% p.problem.title | html %]</a> - <small>[% prettify_dt( p.problem.confirmed, 1 ) %], [% dist %]km</small> - [% IF p.problem.is_fixed %] - <small>[% loc('(fixed)') %]</small> - [% ELSIF p.problem.is_closed %] - <small>[% loc('(closed)') %]</small> - [% END %] - </li> - [% END %] -[% ELSE %] - <li>[% loc('No problems found.') %]</li> -[% END %] diff --git a/templates/web/base/around/display_location.html b/templates/web/base/around/display_location.html index 3f4ec8881..d38ae6754 100755 --- a/templates/web/base/around/display_location.html +++ b/templates/web/base/around/display_location.html @@ -30,7 +30,7 @@ PROCESS "maps/${map.type}.html" around_page = 1; SET bodyclass = 'mappage'; - SET rss = [ loc('Recent local problems, FixMyStreet'), rss_url ] IF c.cobrand.moniker != 'emptyhomes'; + SET rss = [ tprintf(loc('Recent local problems, %s', "%s is the site name"), site_name), rss_url ] IF c.cobrand.moniker != 'emptyhomes'; INCLUDE 'header.html', title => loc('Viewing a location') robots => 'noindex,nofollow'; diff --git a/templates/web/base/around/index.html b/templates/web/base/around/index.html new file mode 100644 index 000000000..f2be5575c --- /dev/null +++ b/templates/web/base/around/index.html @@ -0,0 +1,13 @@ +[% pre_container_extra = INCLUDE 'around/postcode_form.html' %] +[% INCLUDE 'header.html', title = loc('Reporting a problem'), bodyclass = 'frontpage fullwidthpage' %] + +[% + # NOTE ON PARTIAL REPORTS: + # + # partial reports get a bit of extra text added, the form goes to + # '/report/new' and the partial hidden field is added to the form. +%] + +[% INCLUDE 'around/_main.html' %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/base/around/intro.html b/templates/web/base/around/intro.html new file mode 100644 index 000000000..d71dad1d5 --- /dev/null +++ b/templates/web/base/around/intro.html @@ -0,0 +1,2 @@ + <h1>[% loc('Report, view, or discuss local problems') %]</h1> + <h2>[% loc('(like graffiti, fly tipping, broken paving slabs, or street lighting)') %]</h2> diff --git a/templates/web/base/around/location_error.html b/templates/web/base/around/location_error.html index 9b907b64b..fc9b2b8ce 100644 --- a/templates/web/base/around/location_error.html +++ b/templates/web/base/around/location_error.html @@ -1 +1 @@ -<p class="error">[% location_error %]</p> +<p class="form-error">[% location_error %]</p> diff --git a/templates/web/base/around/on_map_list_items.html b/templates/web/base/around/on_map_list_items.html index 70a071406..b7257030d 100644 --- a/templates/web/base/around/on_map_list_items.html +++ b/templates/web/base/around/on_map_list_items.html @@ -1,15 +1,14 @@ -[% IF on_map.size %] - [% FOREACH p IN on_map %] - <li> - <a href="[% c.uri_for('/report', p.id ) %]">[% p.title | html %]</a> - <small>[% prettify_dt( p.confirmed, 1 ) %]</small> - [% IF p.is_fixed %] - <small>[% loc('(fixed)') %]</small> - [% ELSIF p.is_closed %] - <small>[% loc('(closed)') %]</small> - [% END %] - </li> +[% all_reports = on_map.merge(around_map) %] +[% IF all_reports.size %] + [% FOREACH problem IN all_reports %] + [% UNLESS problem.title; + dist = tprintf("%.1f", (problem.distance || 0) ); + problem = problem.problem; + END %] + [% INCLUDE 'reports/_list-entry.html' %] [% END %] [% ELSE %] - <li>[% loc('No problems have been reported yet.') %]</li> + <li class="item-list__item item-list__item--empty"> + <p>[% loc('There are no reports to show.') %]</p> + </li> [% END %] diff --git a/templates/web/base/around/postcode_form.html b/templates/web/base/around/postcode_form.html index f58d7285d..601f0ee9e 100644 --- a/templates/web/base/around/postcode_form.html +++ b/templates/web/base/around/postcode_form.html @@ -1,13 +1,26 @@ -[% - question = c.cobrand.enter_postcode_text || loc('Enter a nearby 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="[% pc | html %]" id="pc" size="10" maxlength="200"> - <input type="submit" value="[% loc('Go') %]" id="sub"> - </span> - [% IF partial_token %] - <input type="hidden" name="partial" value="[% partial_token.token %]"> - [% END %] -</form> +<div id="front-main"> + <div id="front-main-container"> + [% INCLUDE 'around/intro.html' %] + + [% + question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area'); + %] + + [% IF c.cobrand.moniker == 'fixmybarangay' %] + [% INCLUDE '_barangay_buttons.html' %] + [% ELSE %] + <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> + <label for="pc">[% question %]:</label> + <div> + <input type="text" name="pc" value="[% pc | html %]" 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="sub"> + </div> + + [% IF partial_token %] + <input type="hidden" name="partial" value="[% partial_token.token %]"> + [% END %] + + </form> + [% END %] + </div> +</div> diff --git a/templates/web/base/around/tabbed_lists.html b/templates/web/base/around/tabbed_lists.html index 4ad7b35fc..b0d46444d 100755 --- a/templates/web/base/around/tabbed_lists.html +++ b/templates/web/base/around/tabbed_lists.html @@ -1,23 +1,5 @@ -<div id="nearby_lists"> - - <h2>[% loc('Reports on and around the map') %]</h2> - - <ul id="current"> - [% INCLUDE "around/on_map_list_items.html" %] - </ul> - - <h2> - [% - tprintf( - loc( 'Closest nearby problems <small>(within %skm)</small>' ), - distance - ) - %] - </h2> - - <ul id="current_near"> - [% INCLUDE "around/around_map_list_items.html" %] - </ul> - -</div> +[% INCLUDE "reports/_list-filters.html" %] +<ul id="current" class="item-list item-list--reports"> + [% INCLUDE "around/on_map_list_items.html" %] +</ul> diff --git a/templates/web/base/auth/general.html b/templates/web/base/auth/general.html index f5e2e423f..6e1db86fe 100644 --- a/templates/web/base/auth/general.html +++ b/templates/web/base/auth/general.html @@ -1,83 +1,70 @@ -[% INCLUDE 'header.html', title = loc('Sign in or create an account') %] +[% INCLUDE 'header.html', bodyclass='authpage', 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"> -<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 %] - - [% IF loc_email_error %] + <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 %] + [% 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 %] - - <div class="form-field"> - <label class="n" for="email">[% loc('Your email address:') %]</label> - <input type="email" class="required email" size="30" id="email" name="email" value="[% email | html %]"> - </div> - -<div id="form_sign_in"> - <h3>[% loc("Do you have a FixMyStreet password?") %]</h3> - - <div id="form_sign_in_yes"> - - <p> - <label class="n" for="password_sign_in">[% loc('<strong>Yes</strong> I have a password') %]</label> - <input type="password" name="password_sign_in" id="password_sign_in" value=""> - </p> - - <p> - <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> - <label class="n" for="remember_me"> - [% loc('Keep me signed in on this computer') %] - </label> - </p> - - <p> - <input type="submit" name="sign_in" value="[% loc('Sign in') %]"> - </p> - - </div> - <div id="form_sign_in_no"> - - <p>[% loc('<strong>No</strong>, I do not, let me sign in by email:') %]</p> - - <div class="fieldset"> - <div class="form-field"> - <label for="name">[% loc('Your name:') %]</label> - <input type="text" name="name" value=""> - </div> + [% END %] + <input type="email" class="required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]" autofocus> + + <div id="form_sign_in"> + <h3>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</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('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 class="form-field"> - <label for="password_register">[% loc('Enter a new password:') %]</label> - <input type="password" name="password_register" id="password_register" value=""> </div> - </div> + <div id="form_sign_in_no" class="form-box"> + <h5>[% loc('<strong>No</strong> let me sign in by email') %]</h5> - <p><small>Providing a name and password is optional, but doing so - will allow you to more easily report problems, leave updates and - manage your reports.</small></p> + <label for="name">[% loc('Name') %]</label> + <input type="text" name="name" value="" placeholder="[% loc('Your name') %]"> - <p> - <input type="submit" name="email_sign_in" value="[% loc('Sign in by email') %]"> - </p> + <label for="password_register">[% loc('Password (optional)') %]</label> - </div> + <div class="general-notes"> + <p>[% loc('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> + + <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> -</div> - + </fieldset> </form> diff --git a/templates/web/base/auth/token.html b/templates/web/base/auth/token.html index 361d4fbd5..a4dedcec3 100644 --- a/templates/web/base/auth/token.html +++ b/templates/web/base/auth/token.html @@ -1,25 +1,27 @@ -[% INCLUDE 'header.html', title => loc('Confirm account') %] +[% INCLUDE 'header.html', bodyclass = 'fullwidthpage', title = loc('Confirm account') %] [% IF token_not_found %] +[%# Shown whenever there's an invalid token, eg while confirming a report or logging in without a password %] -<h1>[% loc('Error') %]</h1> + <div class="confirmation-header confirmation-header--failure"> -<p> - [% loc('We have not been able to confirm your account - sorry.') %] - [% loc('This may be because the link is too old or already used, or the address was not copied correctly.') %] -</p> + <h1>[% loc('Sorry, that wasn’t a valid link') %]</h1> + <p>[% loc('The link might have expired, or maybe you didn’t quite copy and paste it correctly.') %]</p> + + </div> [% ELSE %] -<h1>[% loc('Please check your email') %]</h1> + <div class="confirmation-header confirmation-header--inbox"> -<p>[% loc("We have sent you an email containing a link to confirm your account.") %]</p> + <h1>[% loc("Nearly done! Now check your email…") %]</h1> + <p>[% loc("Click the link in our confirmation email to sign in.") %]</p> -[% IF c.cobrand.moniker != 'zurich' %] -<p>[% loc("The confirmation email <strong>may</strong> take a few minutes to arrive — <em>please</em> be patient.") %]</p> -[% END %] + <p> + [% loc("Can’t find our email? Check your spam folder – that’s the solution 99% of the time.") %] + </p> -<p>[% loc("If you use web-based email or have 'junk mail' filters, you may wish to check your bulk/spam mail folders: sometimes, our messages are marked that way.") %]</p> + </div> [% END %] diff --git a/templates/web/base/common_header_tags.html b/templates/web/base/common_header_tags.html index 16098b7f5..0ad3ffb5f 100644 --- a/templates/web/base/common_header_tags.html +++ b/templates/web/base/common_header_tags.html @@ -42,5 +42,5 @@ <title> [% "$title :: " | html IF title %] - [% PROCESS 'site-name.html' -%] + [% site_name -%] </title> diff --git a/templates/web/base/contact/blurb.html b/templates/web/base/contact/blurb.html index 22c9a3cef..463813449 100644 --- a/templates/web/base/contact/blurb.html +++ b/templates/web/base/contact/blurb.html @@ -1,6 +1,6 @@ <p> [% loc('Please do <strong>not</strong> report problems through this form; messages go to -the team behind FixMyStreet, not a council. To report a problem, +the team behind this site, not a council. To report a problem, please <a href="/">go to the front page</a> and follow the instructions.') %] </p> diff --git a/templates/web/base/email_sent.html b/templates/web/base/email_sent.html index 8d7b35a58..7d38f9d67 100644 --- a/templates/web/base/email_sent.html +++ b/templates/web/base/email_sent.html @@ -1,34 +1,23 @@ -[% INCLUDE 'header.html', bodyclass = 'twothirdswidthpage', title = loc('Create a report') %] +[% INCLUDE 'header.html', bodyclass = 'fullwidthpage', title = loc('Create a report') %] -<h1>[% loc("Nearly Done! Now check your email...") %]</h1> +<div class="confirmation-header confirmation-header--inbox"> -[% IF c.cobrand.moniker != 'zurich' %] - <p>[% loc("The confirmation email <strong>may</strong> take a few minutes to arrive — <em>please</em> be patient.") %]</p> -[% END %] + <h1>[% loc("Nearly done! Now check your email…") %]</h1> -<p>[% loc("If you use web-based email or have 'junk mail' filters, you may wish to check your bulk/spam mail folders: sometimes, our messages are marked that way.") %]</p> - -[% IF c.cobrand.moniker != 'zurich' %] <p> - [% loc("You must now click the link in the email we've just sent you.") %] [% IF email_type == 'problem' %] - [% loc("If you do not, your problem will not be posted.") %] + [% loc("Click the link in our confirmation email to publish your problem.") %] [% ELSIF email_type == 'update' %] - [% loc("If you do not, your update will not be posted.") %] + [% loc("Click the link in our confirmation email to publish your update.") %] [% ELSIF email_type == 'alert' %] - [% loc("If you do not, your alert will not be activated.") %] + [% loc("Click the link in our confirmation email to activate your alert.") %] [% END %] </p> <p> - [% IF email_type == 'problem' %] - [% loc("(Don't worry — we'll hang on to your problem report while you're checking your email.)") %] - [% ELSIF email_type == 'update' %] - [% loc("(Don't worry — we'll hang on to your update while you're checking your email.)") %] - [% ELSIF email_type == 'alert' %] - [% loc("(Don't worry — we'll hang on to your alert while you're checking your email.)") %] - [% END %] + [% loc("Can’t find our email? Check your spam folder – that’s the solution 99% of the time.") %] </p> -[% END %] + +</div> [% INCLUDE 'footer.html' %] diff --git a/templates/web/base/faq/faq-en-gb.html b/templates/web/base/faq/faq-en-gb.html index e1e07a8d7..b60f1102a 100755 --- a/templates/web/base/faq/faq-en-gb.html +++ b/templates/web/base/faq/faq-en-gb.html @@ -3,27 +3,27 @@ <div class="sticky-sidebar"> <aside> <ul class="plain-list"> - <li><strong>Frequently Asked Questions</strong></li> - <li><a href="/privacy">Privacy and cookies</a></li> - <li><a href="/contact">Contact [% PROCESS 'site-name.html' -%]</a></li> + <li><strong>[% loc('Frequently Asked Questions') %]</strong></li> + <li><a href="/privacy">[% loc('Privacy and cookies') %]</a></li> + <li><a href="/contact">[% tprintf(loc("Contact %s", "%s is the site name"), site_name) %]</a></li> </ul> </aside> </div> -<h1><a name="faq"></a>Frequently Asked Questions</h1> +<h1><a name="faq"></a>[% loc('Frequently Asked Questions') %]</h1> <dl> <dt>What is this site?</dt> - <dd>[% PROCESS 'site-name.html' -%] is a site to help people report to their + <dd>[% site_name %] is a site to help people report to their local authority, view, or discuss local issues they’ve found, by simply locating them on a map.</dd> - <dt>How do I get in touch with [% PROCESS 'site-name.html' -%]?</dt> + <dt>How do I get in touch with [% site_name %]?</dt> <dd>Here’s our <a href="/contact">contact page</a>.</dd> - <dt>What sort of problems should I report with [% PROCESS 'site-name.html' -%]?</dt> - <dd>This depends upon the precise purpose of [% PROCESS 'site-name.html' -%]; + <dt>What sort of problems should I report with [% site_name %]?</dt> + <dd>This depends upon the precise purpose of [% site_name %]; in the UK, FixMyStreet is primarily for reporting things which are <strong>broken or dirty or damaged or dumped, and need fixing, cleaning or clearing</strong>, such as: @@ -38,8 +38,8 @@ </ul> </dd> - <dt>What isn’t [% PROCESS 'site-name.html' -%] for?</dt> - <dd>[% PROCESS 'site-name.html' -%] is not a way of getting in touch with your + <dt>What isn’t [% site_name %] for?</dt> + <dd>[% site_name %] is not a way of getting in touch with your authority for all issues – please use this site only for problems such as the above. We often route problem reports via cleansing services or highways and so using this site for other matters may result in a delay in @@ -75,9 +75,9 @@ a registered charity, so if you want to make a contribution, <a href="https://www.mysociety.org/donate/">please do</a>.</dd> - <dt>Can I use [% PROCESS 'site-name.html' -%] on my mobile?</dt> + <dt>Can I use [% site_name %] on my mobile?</dt> <dd> - <p>The [% PROCESS 'site-name.html' -%] website will already work on your mobile + <p>The [% site_name %] website will already work on your mobile phone, adapting to the size of your screen automatically.</p> </dd> </dl> @@ -90,18 +90,18 @@ to find out where reports go at the moment. Also <a href="/contact">contact us</a> to update the address or addresses we use.</dd> - <dt>I’m from an authority, can we have [% PROCESS 'site-name.html' -%] + <dt>I’m from an authority, can we have [% site_name %] on our website?</dt> <dd>Quite possibly – contact the people who run this site.</dd> <dt>Do you remove silly or illegal content?</dt> - <dd>[% PROCESS 'site-name.html' -%] is not responsible for the content and + <dd>[% site_name %] is not responsible for the content and accuracy of material submitted by its users. We reserve the right to edit or remove any problems or updates which we consider to be inappropriate upon being informed by a user of the site.</dd> <dt>Why can’t I zoom out more on the reporting map?</dt> - <dd>We want to keep [% PROCESS 'site-name.html' -%] locally focused, so restrict + <dd>We want to keep [% site_name %] locally focused, so restrict the ability to move radically between areas. The map on Your Reports will let you see all the reports you’ve made, wherever they are. If you’re from the authority then the emailed version of the problem @@ -111,7 +111,7 @@ to update the address or addresses we use.</dd> <h2><a name="organisation"></a>Organisation Questions</h2> <dl> - <dt>Who built [% PROCESS 'site-name.html' -%]?</dt> + <dt>Who built [% site_name %]?</dt> <dd>This will depend upon the installation of the FixMyStreet Platform, who should create their own <code>faq/</code> template in their cobrand directory to replace this default one. The FixMyStreet Platform was diff --git a/templates/web/base/footer.html b/templates/web/base/footer.html index a58a3e696..3f4e5b551 100644 --- a/templates/web/base/footer.html +++ b/templates/web/base/footer.html @@ -21,11 +21,9 @@ <div id="footer"> - <p><a href="/contact">[% loc("Contact FixMyStreet") | replace(' ', ' ') %]</a></p> + <p><a href="/contact">[% tprintf(loc("Contact %s", "%s is the site name"), site_name) | replace(' ', ' ') %]</a></p> - <p>[% loc('Are you a <strong>developer</strong>? Would you like to contribute to FixMyStreet?') %] - [% loc('Our code is open source and <a href="http://github.com/mysociety/fixmystreet">available on GitHub</a>.') %] - </p> + [% INCLUDE 'front/footer-marketing.html' %] </div> diff --git a/templates/web/base/front/_list-entry.html b/templates/web/base/front/_list-entry.html new file mode 100755 index 000000000..2fcf5f296 --- /dev/null +++ b/templates/web/base/front/_list-entry.html @@ -0,0 +1 @@ +[% INCLUDE 'report/_item.html' no_fixed = 1 %] diff --git a/templates/web/base/front/footer-marketing.html b/templates/web/base/front/footer-marketing.html new file mode 100644 index 000000000..c0c9b4168 --- /dev/null +++ b/templates/web/base/front/footer-marketing.html @@ -0,0 +1,21 @@ + <div class="tablewrapper bordered"> + <div id="footer-mobileapps"> + <!-- + <h4></h4> + <p> + </p> + --> + </div> + + <div id="footer-help"> + <p> + [% loc('Powered by <a class="platform-logo" href="http://fixmystreet.org/">FixMyStreet Platform</a>') %] + </p> + <ul> + <li> + <h4>[% loc('Are you a developer?') %]</h4> + <p>[% loc('Would you like to contribute to FixMyStreet? Our code is open source and <a href="http://fixmystreet.org">available at fixmystreet.org</a>.') %]</p> + </li> + </ul> + </div> + </div> diff --git a/templates/web/base/front/javascript.html b/templates/web/base/front/javascript.html new file mode 100644 index 000000000..13aa5216c --- /dev/null +++ b/templates/web/base/front/javascript.html @@ -0,0 +1,15 @@ +[%# Assume using OpenStreetMap maps %] +<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-OpenStreetMap.js') %]", + "preload![% version('/js/jquery.ba-hashchange.min.js') %]" + ] +}); +</script> diff --git a/templates/web/base/front/recent.html b/templates/web/base/front/recent.html new file mode 100644 index 000000000..cb83c51b8 --- /dev/null +++ b/templates/web/base/front/recent.html @@ -0,0 +1,23 @@ +[% + recent_photos = c.cobrand.recent_photos('front', 5); +%] + +[% IF recent_photos.size %] +<div id="front-recently"> + <h2> + [%- IF c.cobrand.moniker == 'hart' %] + Recently reported + [% ELSE %] + [% loc('Recently reported problems') %] + [% END -%] + </h2> + + <section class="full-width"> + <ul class="item-list item-list--reports item-list--front-page"> + [% FOREACH problem IN recent_photos %] + [% INCLUDE 'front/_list-entry.html' %] + [% END %] + </ul> + </section> +</div> +[% END %] diff --git a/templates/web/base/header.html b/templates/web/base/header.html index e6362a449..1d7960661 100644 --- a/templates/web/base/header.html +++ b/templates/web/base/header.html @@ -1,7 +1,7 @@ <!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 lt IE 7]><html class="no-js ie6 iel8" lang="[% lang_code %]"><![endif]--> +<!--[if IE 7]> <html class="no-js ie7 iel8" lang="[% lang_code %]"><![endif]--> +<!--[if IE 8]> <html class="no-js ie8 iel8" 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"> @@ -11,6 +11,8 @@ <meta name="HandHeldFriendly" content="true"> <meta name="mobileoptimized" content="0"> + [% INCLUDE 'header_opengraph.html' %] + <link rel="stylesheet" href="[% version('/css/core.css') %]"> [% INCLUDE 'common_header_tags.html' %] @@ -24,14 +26,16 @@ %][% loc('FixMyStreet') %] [%- 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> + [% IF c.user_exists %] + <div id="user-meta"> + <p> + [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + <a href="/auth/sign_out">[% loc('sign out') %]</a> + </p> + </div> + [% END %] + + [% pre_container_extra %] <div id="mysociety" class="container" role="main"> diff --git a/templates/web/base/header_opengraph.html b/templates/web/base/header_opengraph.html index e69de29bb..f728d083f 100644 --- a/templates/web/base/header_opengraph.html +++ b/templates/web/base/header_opengraph.html @@ -0,0 +1,6 @@ + <meta property="og:url" content="[% c.cobrand.base_url %][% c.req.uri.path %]"> + <meta property="og:title" content="[% title || site_name %]"> + <meta property="og:site_name" content="[% site_name %]"> + [% IF c.req.uri.path == '/' %]<meta property="og:description" content="Report, view, and discuss local street-related problems.">[% END %] + <meta property="og:type" content="website"> + [% INCLUDE 'header_opengraph_image.html' %] diff --git a/templates/web/base/header_opengraph_image.html b/templates/web/base/header_opengraph_image.html new file mode 100644 index 000000000..7ec1aabb0 --- /dev/null +++ b/templates/web/base/header_opengraph_image.html @@ -0,0 +1,4 @@ + <meta property="og:image" content="[% c.cobrand.base_url %]/cobrands/fixmystreet/images/fms-og_image.jpg"> + <meta property="og:image:type" content="image/jpeg"> + <meta property="og:image:width" content="1200"> + <meta property="og:image:height" content="630"> diff --git a/templates/web/base/index.html b/templates/web/base/index.html index cea0f832a..0441b3efb 100644 --- a/templates/web/base/index.html +++ b/templates/web/base/index.html @@ -1,55 +1,20 @@ -[% INCLUDE 'header.html', title = '' %] +[% map_js = PROCESS 'front/javascript.html' %] + +[% pre_container_extra = PROCESS 'around/postcode_form.html' %] +[% INCLUDE 'header.html', title = '', bodyclass = 'frontpage fullwidthpage' %] [% IF error %] - <p class="error">[% error %]</p> + <p class="form-error">[% error %]</p> [% END %] -<p id="expl"> - [% - subhead = 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> - -[% PROCESS 'around/postcode_form.html' %] - -<div id="front_intro"> - [% INCLUDE 'index-steps.html' %] -</div> - -[% - recent_photos = c.cobrand.recent_photos('front', 3); - probs = c.cobrand.recent(); -%] +[% TRY %][% PROCESS 'front/pre-steps.html' %][% CATCH file %][% END %] -[% 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; - photo = p.get_photo_params; - %] - <a href="/report/[% p.id %]"><img border="0" height="100" - src="[% photo.url_tn %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a> - [% END %] - </p> - [% END %] +<div class="tablewrapper"> + <div id="front-howto"> + [% INCLUDE 'index-steps.html' %] + </div> - [% IF probs.size %] - <ul id="nearby_lists"> - [% FOREACH p IN probs %] - <li> - <a href="/report/[% p.id %]">[% p.title | html %]</a> - <small>[% prettify_dt( p.confirmed, 1 ) %]</small> - </li> - [% END %] - </ul> - [% END %] + [% INCLUDE 'front/recent.html' %] </div> -[% END %] -[% INCLUDE 'footer.html' %] +[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/base/maps/google-ol.html b/templates/web/base/maps/google-ol.html index ce22fc94c..021570df1 100644 --- a/templates/web/base/maps/google-ol.html +++ b/templates/web/base/maps/google-ol.html @@ -1,5 +1,5 @@ [% map_js = BLOCK %] -<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> +<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.20"></script> <script type="text/javascript" src="[% version('/js/OpenLayers.fixmystreet.google.js') %]"></script> <script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script> <script type="text/javascript" src="[% version('/js/map-google-ol.js') %]"></script> @@ -10,7 +10,7 @@ [% END %] [% map_sub_links = BLOCK %] -<a class="hidden-nojs" id="map_layer_toggle" href="">[% loc('Map') %]</a> +<a class="hidden-nojs" id="map_layer_toggle" href="">[% loc('Satellite') %]</a> [% END %] [% map_html = BLOCK %] diff --git a/templates/web/base/maps/noscript_map.html b/templates/web/base/maps/noscript_map.html new file mode 100644 index 000000000..aaaa217c9 --- /dev/null +++ b/templates/web/base/maps/noscript_map.html @@ -0,0 +1,64 @@ +<div class="noscript"> + <div id="[% nsm_prefix %]drag"> + <[% map.img_type %] + alt="NW map tile" id="[% nsm_prefix %]t2.2" + name="tile_[% map.x_tile - 1 %].[% map.y_tile - 1 %]" + src="[% map.tiles.0 %]" + style="top:0; left:0;"> + <[% map.img_type %] + alt="NE map tile" id="[% nsm_prefix %]t2.3" + name="tile_[% map.x_tile %].[% map.y_tile - 1 %]" + src="[% map.tiles.1 %]" + style="top:0px; left:256px;"> + <br> + <[% map.img_type %] + alt="SW map tile" id="[% nsm_prefix %]t3.2" + name="tile_[% map.x_tile - 1 %].[% map.y_tile %]" + src="[% map.tiles.2 %]" + style="top:256px; left:0;"> + <[% map.img_type %] + alt="SE map tile" id="[% nsm_prefix %]t3.3" + name="tile_[% map.x_tile %].[% map.y_tile %]" + src="[% map.tiles.3 %]" + style="top:256px; left:256px;"> + </div> + <div id="[% nsm_prefix %]pins">[% FOR pin IN map.pins %][% INCLUDE pin %][% END %]</div> + [% INCLUDE compass %] +</div> + +[% BLOCK compass %] +[% + north = c.uri_with( { lat = map.compass.north.0, lon = map.compass.north.1, zoom = map.zoom } ) + south = c.uri_with( { lat = map.compass.south.0, lon = map.compass.south.1, zoom = map.zoom } ) + east = c.uri_with( { lat = map.compass.east.0, lon = map.compass.east.1, zoom = map.zoom } ) + west = c.uri_with( { lat = map.compass.west.0, lon = map.compass.west.1, zoom = map.zoom } ) + world = c.uri_with( { zoom = 0 } ); + SET zoom_in = c.uri_with( { lat = map.latitude, lon = map.longitude, zoom = map.zoom + 1 } ) IF map.zoom < map.numZoomLevels - 1; + SET zoom_out = c.uri_with( { lat = map.latitude, lon = map.longitude, zoom = map.zoom - 1 } ) IF map.zoom > 0; + SET zoom_in = '#' IF map.zoom >= map.numZoomLevels - 1; + SET zoom_out = '#' IF map.zoom <= 0; +%] +<div style="position: absolute; left: 4px; top: 4px;" class="olControlPanZoom olControlNoSelect" unselectable="on"> + <div style="position: absolute; left: 13px; top: 4px; width: 18px; height: 18px;"><a rel="nofollow" href="[% north %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/north-mini.png" border="0"></a></div> + <div style="position: absolute; left: 4px; top: 22px; width: 18px; height: 18px;"><a rel="nofollow" href="[% west %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/west-mini.png" border="0"></a></div> + <div style="position: absolute; left: 22px; top: 22px; width: 18px; height: 18px;"><a rel="nofollow" href="[% east %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/east-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 40px; width: 18px; height: 18px;"><a rel="nofollow" href="[% south %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/south-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 63px; width: 18px; height: 18px;"><a rel="nofollow" href="[% zoom_in %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/zoom-plus-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 81px; width: 18px; height: 18px;"><a rel="nofollow" href="[% world %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/zoom-world-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 99px; width: 18px; height: 18px;"><a rel="nofollow" href="[% zoom_out %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/zoom-minus-mini.png" border="0"></a></div> +</div> +[% END %] + + +[% BLOCK pin %] + +[% IF pin.id %] +<a title="[% pin.title | html %]" href="[% c.uri_for('/report/' _ pin.id) %]"> +[%- END -%] +<img border="0" class="pin" src="[% c.uri_for( c.cobrand.path_to_pin_icons _ 'pin-' _ pin.colour _ '.png') %]" + alt="[% loc('Problem') %]" style="top:[% pin.py - 64 %]px; left:[% pin.px - 24 %]px; position: absolute;"> +[%- IF pin.id -%] +</a> +[% END %] + +[% END %] diff --git a/templates/web/base/maps/openlayers.html b/templates/web/base/maps/openlayers.html index 27c71f42f..1e7ae5ce8 100644 --- a/templates/web/base/maps/openlayers.html +++ b/templates/web/base/maps/openlayers.html @@ -28,67 +28,12 @@ var fixmystreet = { 'pins': [% INCLUDE maps/pins_js.html %] } </script> -<div id="map_box"> +<div id="map_box" aria-hidden="true"> [% pre_map %] - <div id="map"><noscript> - <div id="drag"><[% map.img_type %] - alt="NW map tile" id="t2.2" - name="tile_[% map.x_tile - 1 %].[% map.y_tile - 1 %]" - src="[% map.tiles.0 %]" - style="top:0; left:0;"><[% map.img_type %] - alt="NE map tile" id="t2.3" - name="tile_[% map.x_tile %].[% map.y_tile - 1 %]" - src="[% map.tiles.1 %]" - style="top:0px; left:256px;"><br><[% map.img_type %] - alt="SW map tile" id="t3.2" - name="tile_[% map.x_tile - 1 %].[% map.y_tile %]" - src="[% map.tiles.2 %]" - style="top:256px; left:0;"><[% map.img_type %] - alt="SE map tile" id="t3.3" - name="tile_[% map.x_tile %].[% map.y_tile %]" - src="[% map.tiles.3 %]" - style="top:256px; left:256px;"></div> - <div id="pins">[% FOR pin IN map.pins %][% INCLUDE pin %][% END %]</div> - [% INCLUDE compass %] - </noscript></div> + <div id="map"> + [% INCLUDE 'maps/noscript_map.html' %] + </div> [% IF map.copyright %] <div class="olControlAttribution" style="position: absolute;">[% map.copyright %]</div> [% END %] - -[% BLOCK compass %] -[% - north = c.uri_with( { lat = map.compass.north.0, lon = map.compass.north.1, zoom = map.zoom } ) - south = c.uri_with( { lat = map.compass.south.0, lon = map.compass.south.1, zoom = map.zoom } ) - east = c.uri_with( { lat = map.compass.east.0, lon = map.compass.east.1, zoom = map.zoom } ) - west = c.uri_with( { lat = map.compass.west.0, lon = map.compass.west.1, zoom = map.zoom } ) - world = c.uri_with( { zoom = 0 } ); - SET zoom_in = c.uri_with( { lat = map.latitude, lon = map.longitude, zoom = map.zoom + 1 } ) IF map.zoom < map.numZoomLevels - 1; - SET zoom_out = c.uri_with( { lat = map.latitude, lon = map.longitude, zoom = map.zoom - 1 } ) IF map.zoom > 0; - SET zoom_in = '#' IF map.zoom >= map.numZoomLevels - 1; - SET zoom_out = '#' IF map.zoom <= 0; -%] -<div style="position: absolute; left: 4px; top: 4px;" class="olControlPanZoom olControlNoSelect" unselectable="on"> - <div style="position: absolute; left: 13px; top: 4px; width: 18px; height: 18px;"><a rel="nofollow" href="[% north %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/north-mini.png" border="0"></a></div> - <div style="position: absolute; left: 4px; top: 22px; width: 18px; height: 18px;"><a rel="nofollow" href="[% west %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/west-mini.png" border="0"></a></div> - <div style="position: absolute; left: 22px; top: 22px; width: 18px; height: 18px;"><a rel="nofollow" href="[% east %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/east-mini.png" border="0"></a></div> - <div style="position: absolute; left: 13px; top: 40px; width: 18px; height: 18px;"><a rel="nofollow" href="[% south %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/south-mini.png" border="0"></a></div> - <div style="position: absolute; left: 13px; top: 63px; width: 18px; height: 18px;"><a rel="nofollow" href="[% zoom_in %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/zoom-plus-mini.png" border="0"></a></div> - <div style="position: absolute; left: 13px; top: 81px; width: 18px; height: 18px;"><a rel="nofollow" href="[% world %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/zoom-world-mini.png" border="0"></a></div> - <div style="position: absolute; left: 13px; top: 99px; width: 18px; height: 18px;"><a rel="nofollow" href="[% zoom_out %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/zoom-minus-mini.png" border="0"></a></div> -</div> -[% END %] - - -[% BLOCK pin %] - -[% IF pin.id %] -<a title="[% pin.title | html %]" href="[% c.uri_for('/report/' _ pin.id) %]"> -[%- END -%] -<img border="0" class="pin" src="[% c.uri_for( c.cobrand.path_to_pin_icons _ 'pin-' _ pin.colour _ '.png') %]" - alt="[% loc('Problem') %]" style="top:[% pin.py - 64 %]px; left:[% pin.px - 24 %]px; position: absolute;"> -[%- IF pin.id -%] -</a> -[% END %] - -[% END %] diff --git a/templates/web/base/my/_problem-list.html b/templates/web/base/my/_problem-list.html new file mode 100644 index 000000000..e74dd25ec --- /dev/null +++ b/templates/web/base/my/_problem-list.html @@ -0,0 +1,25 @@ +<ul class='item-list item-list--reports full-width'> + [% IF problems.size %] + [% FOREACH problem = problems %] + [% INCLUDE 'reports/_list-entry.html' no_fixed = 1 %] + [% END %] + [% ELSE %] + <li class="item-list__item item-list__item--empty"> + <p>[% loc('There are no reports to show.') %]</p> + </li> + [% END %] +</ul> + +[% IF ! problems.size %] +<!-- Preserve behaviour of map filters despite map not being shown --> +<script type="text/javascript"> + (function($) { + $(function() { + $(".report-list-filters [type=submit]").hide(); + $(".report-list-filters select").change(function() { + $(this).closest("form").submit(); + }); + }) + })(window.jQuery); +</script> +[% END %] diff --git a/templates/web/base/my/my.html b/templates/web/base/my/my.html index f3ad3f2fe..9be4edfca 100644 --- a/templates/web/base/my/my.html +++ b/templates/web/base/my/my.html @@ -21,32 +21,20 @@ c.uri_for('/') ) %] [% END %] +[% IF c.cobrand.moniker == 'fixmybarangay' %] + [% INCLUDE '_barangay_buttons.html' %] +[% ELSIF c.cobrand.moniker == 'hart' %] + [% INCLUDE '_hart_hants_note.html' %] +[% END %] + +[% INCLUDE "reports/_list-filters.html", use_section_wrapper = 1 %] + [% INCLUDE 'pagination.html', pager = problems_pager, param = 'p' %] -[% FOREACH p = problems.confirmed %] - [% IF loop.first %]<h2>[% loc('Open reports') %]</h2>[% END %] - [% INCLUDE problem %] -[% END %] - -[% FOREACH p = problems.fixed %] - [% IF loop.first %]<h2>[% loc('Fixed reports') %]</h2>[% END %] - [% INCLUDE problem %] -[% END %] - -[% FOREACH p = problems.closed %] - [% IF loop.first %]<h2>[% loc('Closed reports') %]</h2>[% END %] - [% INCLUDE problem %] -[% END %] - -[%# FOREACH p = problems.unconfirmed; - IF loop.first; - '<h2>' _ loc('Unconfirmed reports') _ '</h2>'; - END; - INCLUDE problem; -END %] +[% INCLUDE 'my/_problem-list.html' %] [% FOREACH u IN updates %] [% IF loop.first %] @@ -55,14 +43,14 @@ END %] pager = updates_pager, param = 'u' %] - <ul class="issue-list full-width"> + <ul class="item-list item-list--updates full-width"> [% END %] <li>“[% u.text | html %]” – <a href="[% c.uri_for( '/report', u.problem_id ) %]#update_[% u.id %]">[% u.problem.title | html %]</a>. - <em class="council_sent_info"> + <p><small class="council_sent_info"> [% tprintf( loc("Added %s"), prettify_dt( u.confirmed, 'date' ) ) %] - </em> + </small></p> </li> [% "</ul>" IF loop.last %] [% END %] @@ -70,20 +58,3 @@ END %] </div> [% INCLUDE 'footer.html' %] - -[% BLOCK problem %] - [% "<ul class='issue-list-a full-width'>" IF loop.first %] - - <li><a href="[% c.uri_for( '/report', p.id ) %]">[% p.title | html %]</a> - <em class="council_sent_info"> – - [% IF p.whensent %] - [% tprintf( loc("Reported %s, to %s"), prettify_dt( p.confirmed, 'date' ), p.body(c) ) %] - [% ELSE %] - [% tprintf( loc("Reported %s"), prettify_dt( p.confirmed, 'date' ) ) %] - [% END %] - </em> - </li> - - [% "</ul>" IF loop.last %] -[% END %] - diff --git a/templates/web/base/open311/index.html b/templates/web/base/open311/index.html index 502b1a69a..d42cc2106 100644 --- a/templates/web/base/open311/index.html +++ b/templates/web/base/open311/index.html @@ -3,9 +3,9 @@ <div class="sticky-sidebar"> <aside> <ul class="plain-list"> - <li><a href="/faq">Frequently Asked Questions</a></li> - <li><a href="/privacy">Privacy and cookies</a></li> - <li><a href="/contact">Contact FixMyStreet</a></li> + <li><a href="/faq">[% loc('Frequently Asked Questions') %]</a></li> + <li><a href="/privacy">[% loc('Privacy and cookies') %]</a></li> + <li><a href="/contact">[% tprintf(loc("Contact %s", "%s is the site name"), site_name) %]</a></li> </ul> </aside> </div> diff --git a/templates/web/base/questionnaire/index.html b/templates/web/base/questionnaire/index.html index 2daaaab3a..ab3bde9ad 100644 --- a/templates/web/base/questionnaire/index.html +++ b/templates/web/base/questionnaire/index.html @@ -1,18 +1,32 @@ [% - pre_map = INCLUDE 'report/_main.html'; + SET bodyclass = 'mappage'; + PROCESS "report/photo-js.html"; PROCESS "maps/${map.type}.html"; - INCLUDE 'header.html', title = loc('Questionnaire') + INCLUDE 'header.html', title = loc('Questionnaire'); %] [% map_html %] -[% INCLUDE 'report/updates.html' %] - </div> -<div id="side"> <h1>[% loc('Questionnaire') %]</h1> +<h2 class="questionnaire-report-header">Your report</h2> +<div class="questionnaire-report-reminder"> + [% INCLUDE 'report/photo.html' object=problem %] + <h3 class="questionnaire-report-reminder__report-title"> + <a href="/report/[% problem.id %]">[% problem.title | html %]</a> + </h3> + <p class="questionnaire-report-reminder__report-meta">[% problem.meta_line(c) | html %]</p> + [% IF updates.size %] + <p class="questionnaire-report-reminder__last-update-header"> + <strong>Last update</strong> + <a href="/report/[% problem.id %]">Show all updates</a> + </p> + <p class="questionnaire-report-reminder__last-update">“[% add_links( updates.last.text ) %]”</p> + [% END %] +</div> + <form method="post" action="/questionnaire/submit" id="questionnaire" [%- IF c.cobrand.allow_photo_upload -%] enctype="multipart/form-data" @@ -21,13 +35,8 @@ <input type="hidden" name="token" value="[% token | html %]"> -<p> -[% loc('The details of your problem are available on the right hand side of this page.') %] -[% loc('Please take a look at the updates that have been left.') IF updates %] -</p> - [% IF errors %] -<ul class="error"> +<ul class="error questionnaire-errors"> <li>[% errors.join("</li>\n<li>") %]</li> </ul> [% END %] @@ -37,50 +46,50 @@ [% loc('Has this problem been fixed?') %] </p> -<p> -<input type="radio" name="been_fixed" id="been_fixed_yes" value="Yes"[% ' checked' IF been_fixed == 'Yes' %]> -<label for="been_fixed_yes">[% loc('Yes') %]</label> -<input type="radio" name="been_fixed" id="been_fixed_no" value="No"[% ' checked' IF been_fixed == 'No' %]> -<label for="been_fixed_no">[% loc('No') %]</label> -<input type="radio" name="been_fixed" id="been_fixed_unknown" value="Unknown"[% ' checked' IF been_fixed == 'Unknown' %]> -<label for="been_fixed_unknown">[% loc('Don’t know') %]</label> +<p class="radio-segmented-control"> + <input type="radio" name="been_fixed" id="been_fixed_yes" value="Yes"[% ' checked' IF been_fixed == 'Yes' %]> + <label class="inline" for="been_fixed_yes">[% loc('Yes') %]</label> + <input type="radio" name="been_fixed" id="been_fixed_no" value="No"[% ' checked' IF been_fixed == 'No' %]> + <label class="inline" for="been_fixed_no">[% loc('No') %]</label> + <input type="radio" name="been_fixed" id="been_fixed_unknown" value="Unknown"[% ' checked' IF been_fixed == 'Unknown' %]> + <label class="inline" for="been_fixed_unknown">[% loc('Don’t know') %]</label> </p> [% UNLESS answered_ever_reported %] <p>[% loc('Have you ever reported a problem to a council before, or is this your first time?') %]</p> -<p> -<input type="radio" name="reported" id="reported_yes" value="Yes"[% ' checked' IF reported == 'Yes' %]> -<label for="reported_yes">[% loc('Reported before') %]</label> -<input type="radio" name="reported" id="reported_no" value="No"[% ' checked' IF reported == 'No' %]> -<label for="reported_no">[% loc('First time') %]</label> +<p class="radio-segmented-control"> + <input type="radio" name="reported" id="reported_yes" value="Yes"[% ' checked' IF reported == 'Yes' %]> + <label class="inline" for="reported_yes">[% loc('Reported before') %]</label> + <input type="radio" name="reported" id="reported_no" value="No"[% ' checked' IF reported == 'No' %]> + <label class="inline" for="reported_no">[% loc('First time') %]</label> </p> [% END %] <p>[% loc('If you wish to leave a public update on the problem, please enter it here -(please note it will not be sent to the council). For example, what was -your experience of getting the problem fixed?') %]</p> +(please note it will not be sent to the council).') %]</p> -<p><textarea name="update" style="max-width:90%" rows="7" cols="30">[% update | html %]</textarea></p> +<p><textarea name="update" rows="7" cols="30" placeholder="[% loc('What was your experience of getting the problem fixed?') %]">[% update | html %]</textarea></p> [% IF c.cobrand.allow_photo_upload %] -<div id="fileupload_normalUI"> +<p id="fileupload_normalUI"> [% IF upload_fileid %] + <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt=""> <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p> <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> [% END %] <label for="form_photo">[% loc('Photo:') %]</label> <input type="file" name="photo" id="form_photo"> -</div> +</p> [% END %] [% IF c.cobrand.moniker != 'emptyhomes' %] -<div id="another_qn"> +<div class="js-another-questionnaire"> <p>[% loc('Would you like to receive another questionnaire in 4 weeks, reminding you to check the status?') %]</p> - <p> + <p class="radio-segmented-control"> <input type="radio" name="another" id="another_yes" value="Yes"[% ' checked' IF another == 'Yes' %]> - <label for="another_yes">[% loc('Yes') %]</label> + <label class="inline" for="another_yes">[% loc('Yes') %]</label> <input type="radio" name="another" id="another_no" value="No"[% ' checked' IF another == 'No' %]> - <label for="another_no">[% loc('No') %]</label> + <label class="inline" for="another_no">[% loc('No') %]</label> </p> </div> [% END %] @@ -89,7 +98,4 @@ your experience of getting the problem fixed?') %]</p> </form> -</div> - [% INCLUDE 'footer.html' %] - diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html new file mode 100644 index 000000000..d79a4e9f3 --- /dev/null +++ b/templates/web/base/report/_item.html @@ -0,0 +1,30 @@ +<li class="item-list__item item-list--reports__item [% item_extra_class %]"> +<a href="[% c.uri_for('/report', problem.id ) %]"> + [% IF problem.photo; + photo = problem.get_photo_params + %] + <img class="img" height="60" width="90" src="[% photo.url_fp %]" alt=""> + [% END %] + <h4>[% problem.title | html %]</h4> + <small> + [%- IF c.cobrand.moniker != 'fixamingata' %] [%# Default: %] + [%- prettify_dt( problem.confirmed, 1 ) %] + [%- ELSE %] [%# Swedish cobrand fixamingata: %] + [%- prettify_dt( problem.confirmed) %] + [%- END %] + [%- IF dist %], [% dist %]km[% END %] + [%- IF problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %], + [% tprintf(loc('last updated %s'), prettify_dt( problem.lastupdate, 1 ) ) %] + [%- END %] + [% IF include_sentinfo %] + [% IF problem.bodies_str_ids.size > 1 %] [% loc('(sent to both)') %] + [% ELSIF problem.bodies_str_ids.size == 0 %] [% loc('(not sent to council)') %] + [% END %] + [% END %] + [% IF NOT no_fixed AND problem.is_fixed %] + [% loc('(fixed)') %] + [% ELSIF NOT no_fixed AND problem.is_closed %] + [% loc('(closed)') %] + [% END %]</small> +</a> +</li> diff --git a/templates/web/base/report/display.html b/templates/web/base/report/display.html index 0731d9f0e..329614488 100644 --- a/templates/web/base/report/display.html +++ b/templates/web/base/report/display.html @@ -2,7 +2,7 @@ PROCESS "maps/${map.type}.html"; problem_title = problem.title_safe _ ' - ' _ loc('Viewing a problem'); - SET rss = [ loc('Updates to this problem, FixMyStreet'), "/rss/$problem.id" ] IF c.cobrand.moniker != 'emptyhomes'; + SET rss = [ tprintf(loc('Updates to this problem, %s', "%s is the site name"), site_name), "/rss/$problem.id" ] IF c.cobrand.moniker != 'emptyhomes'; SET robots = 'index, nofollow'; SET robots = 'noindex, nofollow' IF c.cobrand.moniker == 'emptyhomes'; INCLUDE 'header.html' diff --git a/templates/web/base/report/new/category_extras.html b/templates/web/base/report/new/category_extras.html index c0f6a7bae..12ef1486f 100644 --- a/templates/web/base/report/new/category_extras.html +++ b/templates/web/base/report/new/category_extras.html @@ -6,7 +6,7 @@ [%- END %] [%- IF report_meta %] - <h4>Additional Information</h4> + <h4>[% loc('Additional Information') %]</h4> [%- FOR meta IN category_extras.$category %] [%- meta_name = meta.code -%] diff --git a/templates/web/base/report/new/fill_in_details_form.html b/templates/web/base/report/new/fill_in_details_form.html index d1431ffd3..ee219d563 100644 --- a/templates/web/base/report/new/fill_in_details_form.html +++ b/templates/web/base/report/new/fill_in_details_form.html @@ -110,7 +110,8 @@ [% INCLUDE 'report/new/notes.html' %] <div id="form_sign_in"> - <h3>[% loc("Now to submit your report… do you have a FixMyStreet password?") %]</h3> + <h3>[% loc("Now to submit your report…") %]</h3> + <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2> <div id="form_sign_in_yes"> diff --git a/templates/web/base/report/photo-js.html b/templates/web/base/report/photo-js.html new file mode 100644 index 000000000..9075ce005 --- /dev/null +++ b/templates/web/base/report/photo-js.html @@ -0,0 +1,8 @@ +[% IF c.cobrand.allow_photo_display(problem) %] + [% extra_css = BLOCK %] + <link rel="stylesheet" href="[% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]"> + [% END %] + [% extra_js = BLOCK %] + <script src="[% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script> + [% END %] +[% END %] diff --git a/templates/web/base/report/photo.html b/templates/web/base/report/photo.html index c463c34c4..094f677d8 100644 --- a/templates/web/base/report/photo.html +++ b/templates/web/base/report/photo.html @@ -1,8 +1,21 @@ [% IF c.cobrand.allow_photo_display(object) && object.photo %] -[% photo = object.get_photo_params %] -<div class="update-img"> - [% IF photo.url_full %]<a href="[% photo.url_full %]" rel="fancy">[% END - %]<img alt="Photo of this report" [% IF photo.height %]height="[% photo.height %]" width="[% photo.width %]"[% END %] src="[% photo.url %]"> - [%- IF photo.url_full %]<span>zoom</span></a>[% END %] -</div> + [% IF object.can('get_photoset') %] + [% FOR photo IN object.get_photoset(c).images %] + <div class="update-img"> + <a href="[% c.cobrand.base_url %]/photo/[% object.id %].[% loop.index %].full.jpeg?[% photo.0 %]" rel="fancy"> + <img alt="Photo of this report" src="[% c.cobrand.base_url %]/photo/[% object.id %].[% loop.index %].jpeg?[% photo.0 %]"> + <span>zoom</span></a> + </div> + [% END %] + [% ELSE %] + [%# e.g. comments %] + [% photo = object.get_photo_params %] + <div class="update-img"> + [% IF photo.url_full %]<a href="[% photo.url_full %]" rel="fancy">[% END %] + <img alt="Photo of this report" + [%- IF photo.height %]height="[% photo.height %]" width="[% photo.width %]"[% END -%] + src="[% photo.url %]"> + [%- IF photo.url_full %]<span>zoom</span></a>[% END %] + </div> + [% END %] [% END %] diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html index 4e762a9a5..3115855d3 100644 --- a/templates/web/base/report/update-form.html +++ b/templates/web/base/report/update-form.html @@ -83,7 +83,8 @@ </div> <div id="form_sign_in"> - <h3>[% loc("Now to submit your update… do you have a FixMyStreet password?") %]</h3> + <h3>[% loc("Now to submit your update…") %]</h3> + <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2> <div id="form_sign_in_yes"> diff --git a/templates/web/base/reports/_list-entry.html b/templates/web/base/reports/_list-entry.html index 445a5315f..dbf0a576e 100755 --- a/templates/web/base/reports/_list-entry.html +++ b/templates/web/base/reports/_list-entry.html @@ -1,6 +1 @@ -<li><a href="[% c.uri_for('/report/' _ problem.id) %]">[% problem.title | html %]</a> - [% IF problem.bodies_str_ids.size > 1 %] <small>[% loc('(sent to both)') %]</small> [% END %] - [% IF c.cobrand.moniker != 'emptyhomes' %] - [% IF problem.bodies_str_ids.size == 0 %] <small>[% loc('(not sent to council)') %]</small> [% END %] - [% END %] -</li> +[% INCLUDE 'report/_item.html' %] diff --git a/templates/web/base/reports/_list-filters.html b/templates/web/base/reports/_list-filters.html index e69de29bb..4dd270dc6 100644 --- a/templates/web/base/reports/_list-filters.html +++ b/templates/web/base/reports/_list-filters.html @@ -0,0 +1,34 @@ +[% select_status = BLOCK %] + <select name="status" id="statuses"> + <option value="all"[% ' selected' IF filter_status == 'all' %]>[% loc('all reports') %]</option> + <option value="open"[% ' selected' IF filter_status == 'open' %]>[% loc('unfixed reports') %]</option> + <option value="closed"[% ' selected' IF filter_status == 'closed' %]>[% loc('closed reports') %]</option> + <option value="fixed"[% ' selected' IF filter_status == 'fixed' %]>[% loc('fixed reports') %]</option> + </select> +[% END %] + +[% select_category = BLOCK %] + <select name="filter_category" id="filter_categories"> + <option value="">[% loc('Everything') %]</option> + [% FOR category IN filter_categories %] + <option value="[% category | html %]"[% ' selected' IF filter_category == category %]> + [% category | html %] + </option> + [% END %] + </select> +[% END %] + +[% IF use_section_wrapper %] +<section class="full-width"> + <form method="get" action=""> +[% END %] + + <p class="report-list-filters"> + [% tprintf(loc('<label>Show %s</label> <label>about %s</label>', 'The first %s is a dropdown of all/fixed/etc, the second is a dropdown of categories'), select_status, select_category) %] + <input type="submit" value="[% loc('Go') %]"> + </p> + +[% IF use_section_wrapper %] + </form> +</section> +[% END %] diff --git a/templates/web/base/reports/_problem-list.html b/templates/web/base/reports/_problem-list.html index 45746e309..4da9e1bb6 100644 --- a/templates/web/base/reports/_problem-list.html +++ b/templates/web/base/reports/_problem-list.html @@ -5,13 +5,13 @@ </section> [% BLOCK column %] - <ul class="issue-list-a"> + <ul class="item-list item-list--reports"> [% IF problems %] [% FOREACH problem IN problems %] - [% INCLUDE 'reports/_list-entry.html' %] + [% INCLUDE 'reports/_list-entry.html' include_sentinfo = 1 include_lastupdate = 1 %] [% END %] [% ELSE %] - <li class="empty"> + <li class="item-list__item item-list__item--empty"> <p>[% loc('There are no reports to show.') %]</p> </li> [% END %] diff --git a/templates/web/base/reports/body.html b/templates/web/base/reports/body.html index b98c5bec6..dfaa98d6a 100755 --- a/templates/web/base/reports/body.html +++ b/templates/web/base/reports/body.html @@ -21,7 +21,7 @@ SET bodyclass = 'mappage'; INCLUDE 'header.html', title = tprintf(loc('%s - Summary reports'), name) - rss = [ tprintf(loc('Problems within %s, FixMyStreet'), name), rss_url ] + rss = [ tprintf(loc('Problems within %s, %s', "First %s is the body name, second %s the site name"), name, site_name), rss_url ] %] [% map_html %] @@ -43,8 +43,8 @@ [% INCLUDE '_hart_hants_note.html' %] [% END %] -[% IF NOT body.areas.size AND c.cobrand.moniker == 'fixmystreet' %] - [% INCLUDE 'reports/_body_gone.html' %] +[% IF NOT body.areas.size %] + [% TRY %][% INCLUDE 'reports/_body_gone.html' %][% CATCH file %][% END %] [% ELSE %] [% INCLUDE 'reports/_rss.html' %] [% END %] diff --git a/templates/web/base/static/privacy.html b/templates/web/base/static/privacy.html index 36720207b..11ab65311 100755 --- a/templates/web/base/static/privacy.html +++ b/templates/web/base/static/privacy.html @@ -1,13 +1,13 @@ [% INCLUDE 'header.html', - title = loc('Frequently Asked Questions'), + title = loc('Privacy and cookies'), bodyclass = 'twothirdswidthpage' %] <div class="sticky-sidebar"> <aside> <ul class="plain-list"> - <li><a href="/faq">Frequently Asked Questions</a></li> - <li><strong>Privacy and cookies</strong></li> - <li><a href="/contact">Contact [% PROCESS 'site-name.html' -%]</a></li> + <li><a href="/faq">[% loc('Frequently Asked Questions') %]</a></li> + <li><a href="/privacy">[% loc('Privacy and cookies') %]</a></li> + <li><a href="/contact">[% tprintf(loc("Contact %s", "%s is the site name"), site_name) %]</a></li> </ul> </aside> </div> diff --git a/templates/web/base/status/index.html b/templates/web/base/status/index.html new file mode 100644 index 000000000..9ed4292b7 --- /dev/null +++ b/templates/web/base/status/index.html @@ -0,0 +1,19 @@ +[% INCLUDE 'header.html' title=loc('Summary') bodyclass='fullwidthpage' %] + +<h1>[% loc('Summary') %]</h1> + +<dl> + <dt>Version</dt> + <dd>[% git_version || 'unknown' %]</dd> +</dl> + +<ul> + <li>[% tprintf( loc('<strong>%d</strong> live problems'), total_problems_live ) %]</li> + <li>[% tprintf( loc('%d live updates'), comments.confirmed || 0 ) %]</li> + <li>[% tprintf( loc('%d confirmed alerts, %d unconfirmed'), alerts.1, alerts.0) %]</li> + <li>[% tprintf( loc('%d questionnaires sent – %d answered (%s%%)'), questionnaires.total, questionnaires.1, questionnaires_pc) %]</li> + <li>[% tprintf( '%d bodies', total_bodies) %], + [% tprintf( loc('%d council contacts – %d confirmed, %d unconfirmed'), contacts.total, contacts.1, contacts.0) %]</li> +</ul> + +[% INCLUDE 'footer.html' %] |