diff options
Diffstat (limited to 'templates')
138 files changed, 1782 insertions, 1752 deletions
diff --git a/templates/email/default/submit.html b/templates/email/default/submit.html index 85511b2e4..582670f98 100644 --- a/templates/email/default/submit.html +++ b/templates/email/default/submit.html @@ -27,7 +27,13 @@ of a local problem that they believe might require your attention.</p> </tr> <tr> <th style="[% contact_th_style %]">Email</th> - <td style="[% contact_td_style %]"><a href="mailto:[% email | html %]">[% email | html %]</a></td> + <td style="[% contact_td_style %]"> + [%~ IF email ~%] + <a href="mailto:[% email | html %]">[% email | html %]</a> + [%~ ELSE ~%] + <strong>No email address provided, only phone number</strong> + [%~ END ~%] + </td> </tr> [%~ IF phone %] <tr> diff --git a/templates/email/default/submit.txt b/templates/email/default/submit.txt index 5d79f3b41..8c88a17f8 100644 --- a/templates/email/default/submit.txt +++ b/templates/email/default/submit.txt @@ -15,9 +15,11 @@ please visit the following link: Name: [% name %] -Email: [% email %] +Email: [% email OR "None provided" %] -[% phone_line %][% category_line %]Subject: [% title %] +Phone: [% phone OR "None provided" %] + +[% category_line %]Subject: [% title %] Details: [% detail %] diff --git a/templates/email/fiksgatami/nn/submit.txt b/templates/email/fiksgatami/nn/submit.txt index 32a895632..dfbdd9457 100644 --- a/templates/email/fiksgatami/nn/submit.txt +++ b/templates/email/fiksgatami/nn/submit.txt @@ -15,9 +15,11 @@ problemet, ver venleg og besøk følgjande lenkje: Namn: [% name %] -E-post: [% email %] +E-post: [% email OR '-' %] -[% phone_line %][% category_line %]Tema: [% title %] +Telefon: [% phone OR '-' %] + +[% category_line %]Tema: [% title %] Detaljer: [% detail %] diff --git a/templates/email/fiksgatami/submit.txt b/templates/email/fiksgatami/submit.txt index a0e0687eb..165b804f1 100644 --- a/templates/email/fiksgatami/submit.txt +++ b/templates/email/fiksgatami/submit.txt @@ -15,9 +15,11 @@ vennligst besøk følgende lenke: Navn: [% name %] -E-post: [% email %] +E-post: [% email OR '-' %] -[% phone_line %][% category_line %]Tema: [% title %] +Telefon: [% phone OR '-' %] + +[% category_line %]Tema: [% title %] Detajer: [% detail %] diff --git a/templates/email/fixamingata/submit.html b/templates/email/fixamingata/submit.html index da4e7f48f..65a692058 100644 --- a/templates/email/fixamingata/submit.html +++ b/templates/email/fixamingata/submit.html @@ -27,7 +27,12 @@ tror medborgaren behöver er uppmärksamhet.</p> </tr> <tr> <th style="[% contact_th_style %]">Epost</th> - <td style="[% contact_td_style %]"><a href="mailto:[% email | html %]">[% email | html %]</a></td> + <td style="[% contact_td_style %]"> + [%~ IF email ~%] + <a href="mailto:[% email | html %]">[% email | html %]</a> + [%~ ELSE ~%] + [%~ END ~%] + </td> </tr> [%~ IF phone %] <tr> diff --git a/templates/email/fixamingata/submit.txt b/templates/email/fixamingata/submit.txt index 95365b87e..fc8b65886 100644 --- a/templates/email/fixamingata/submit.txt +++ b/templates/email/fixamingata/submit.txt @@ -16,9 +16,11 @@ tror medborgaren behöver er uppmärksamhet. Namn: [% name %] -Epost: [% email %] +Epost: [% email OR '-' %] -[% phone_line %]** Information om ärendet +Telefonnummer: [% phone OR '-' %] + +** Information om ärendet ID: [% id %] diff --git a/templates/email/fixmystreet.com/_submit_footer.html b/templates/email/fixmystreet.com/_submit_footer.html index 94b79fed2..346ab8b66 100644 --- a/templates/email/fixmystreet.com/_submit_footer.html +++ b/templates/email/fixmystreet.com/_submit_footer.html @@ -1,9 +1,50 @@ -This message was sent via FixMyStreet, a project of UKCOD, registered charity -number 1076346. If there is a more appropriate email address for messages about -[% category_footer %], please <a href="https://www.fixmystreet.com/contact">let -us know</a>. This will help improve the service for local people. We also -welcome any other feedback you may have. -<br><br> -FixMyStreet is now available for full integration into council websites, making -life easier for both you and your residents. -<a href="https://www.fixmystreet.com/about/professional">Read more</a> +[% + +submit_footer_td_style = "text-align: left; vertical-align: top; font-weight: normal; color: #fff;" +submit_footer_h2_style = "font-size: 16px; line-height: 18px; margin: 0 0 10px 0;"; +submit_footer_link_style = "color: #9CD0EA;"; + +%] + +<table [% table_reset %]> + <tr> + <th style="[% td_style %] padding: [% column_padding %]px; background-color: [% color_yellow %]; color: [% color_black %];"> + <h2 style="[% h2_style %] margin-bottom: 15px;"> + Never retype another FixMyStreet report + </h2> + <p style="margin: 0;"> + Good news: we can now send these reports from FixMyStreet + directly into your customer service queue. + <a href="https://www.fixmystreet.com/pro/">Find out how</a>. + </p> + </th> + </tr> +</table> + +<table [% table_reset %] style="table-layout: fixed;"> + <tr> + <th style="[% submit_footer_td_style %] padding: [% column_padding %]px 40px 0 0;"> + <h2 style="[% submit_footer_h2_style %]"> + Where did this report come from? + </h2> + <p> + <a href="https://www.fixmystreet.com" style="[% submit_footer_link_style %]">FixMyStreet</a> + is the website and app that makes it easy for anyone to report + street faults, anywhere in the UK. + <a href="https://www.mysociety.org/better-cities/fixmystreet-in-the-uk/" style="[% submit_footer_link_style %]">Find out more</a>. + </p> + </th> + <th style="[% submit_footer_td_style %] padding: [% column_padding %]px 0 0 0;"> + <h2 style="[% submit_footer_h2_style %]"> + Is there a better contact address? + </h2> + <p> + Are reports about [% category_footer %] best sent to a + different address? Please let us know by visiting + <a href="https://www.fixmystreet.com/contact" style="[% submit_footer_link_style %]">fixmystreet.com/contact</a>, + and help make the service smoother for your residents. + We also welcome any other feedback you may have. + </p> + </th> + </tr> +</table> diff --git a/templates/email/fixmystreet.com/submit.html b/templates/email/fixmystreet.com/submit.html index fc2b6c095..24bb5f86f 100644 --- a/templates/email/fixmystreet.com/submit.html +++ b/templates/email/fixmystreet.com/submit.html @@ -1,11 +1,11 @@ [% +PROCESS '_email_settings.html'; + email_summary = "A new problem in your area has been reported by a " _ site_name _ " user."; email_footer = PROCESS '_submit_footer.html'; email_columns = 2; -PROCESS '_email_settings.html'; - INCLUDE '_email_top.html'; %] @@ -27,7 +27,13 @@ of a local problem that they believe might require your attention.</p> </tr> <tr> <th style="[% contact_th_style %]">Email</th> - <td style="[% contact_td_style %]"><a href="mailto:[% email | html %]">[% email | html %]</a></td> + <td style="[% contact_td_style %]"> + [%~ IF email ~%] + <a href="mailto:[% email | html %]">[% email | html %]</a> + [%~ ELSE ~%] + <strong>No email address provided, only phone number</strong> + [%~ END ~%] + </td> </tr> [%~ IF phone %] <tr> @@ -42,7 +48,7 @@ of a local problem that they believe might require your attention.</p> [% WRAPPER '_email_sidebar.html' object = report %] <h2 style="[% h2_style %]">[% title | html %]</h2> [%~ IF category_line %] - <p style="[% secondary_p_style %]">[% category | html %]</p> + <p style="[% secondary_p_style %]"><strong>Category:</strong> [% category | html %]</p> [%~ END %] <p style="[% secondary_p_style %]">[% detail | html %]</p> [%~ IF additional_information %] diff --git a/templates/email/fixmystreet.com/submit.txt b/templates/email/fixmystreet.com/submit.txt index aa05316bf..5bcbef87b 100644 --- a/templates/email/fixmystreet.com/submit.txt +++ b/templates/email/fixmystreet.com/submit.txt @@ -15,9 +15,11 @@ please visit the following link: Name: [% name %] -Email: [% email %] +Email: [% email OR 'None provided' %] -[% phone_line %][% category_line %]Subject: [% title %] +Phone: [% phone OR 'None provided' %] + +[% category_line %]Subject: [% title %] Details: [% detail %] @@ -39,13 +41,26 @@ Replies to this email will go to the user who submitted the problem. [% signature %] -This message was sent via FixMyStreet, a project of UKCOD, registered charity -number 1076346. If there is a more appropriate email address for messages about -[% category_footer %], please let us know by visiting <https://www.fixmystreet.com/contact>. -This will help improve the service for local people. We -also welcome any other feedback you may have. +---------- + +Never retype another FixMyStreet report + +Good news: we can now send these reports from FixMyStreet +directly into your customer service queue. Find out how: + + https://www.fixmystreet.com/pro + +---------- + +Where did this report come from? + +FixMyStreet is the website and app that makes it easy for anyone +to report street faults, anywhere in the UK. Find out more: + + https://www.mysociety.org/better-cities/fixmystreet-in-the-uk/ -FixMyStreet is now available for full integration into council -websites, making life easier for both you and your residents. -Read more here: https://www.fixmystreet.com/pro +Are reports about [% category_footer %] best sent to a different address? +Please let us know by visiting <https://www.fixmystreet.com/contact> +and help make the service smoother for your residents. We also welcome +any other feedback you may have. diff --git a/templates/email/oxfordshire/rdi.txt b/templates/email/oxfordshire/rdi.txt index f12467d68..9dcf24186 100644 --- a/templates/email/oxfordshire/rdi.txt +++ b/templates/email/oxfordshire/rdi.txt @@ -1,8 +1,11 @@ -Subject: RDI report for [% user.name %] +Subject:[% IF staging_site %] [STAGING][% END %] RDI report for [% user.name %] Please find attached RDI file for [% start_date %] to [% end_date %]. - +[% IF staging_site %] +NB: This RDI file was generated on a staging site and is for testing +purposes only. +[% END %] ---- The mySociety team and Oxfordshire County Council diff --git a/templates/email/seesomething/confirm_report_sent.txt b/templates/email/seesomething/confirm_report_sent.txt deleted file mode 100644 index d62a50c49..000000000 --- a/templates/email/seesomething/confirm_report_sent.txt +++ /dev/null @@ -1,10 +0,0 @@ -Subject: See Something, Say Something report sent - -Thank you for your report. It will help us to direct our policing activity to make public transport even safer. Find out more of what we are doing at: - -Safer Travel Partnership - -http://www.safertravel.info - -Follow us on Twitter: https://www.twitter.com/ST_Police -or on Facebook: http://www.facebook.com/safertravelpolice diff --git a/templates/email/seesomething/submit.txt b/templates/email/seesomething/submit.txt deleted file mode 100644 index 1f2adc11d..000000000 --- a/templates/email/seesomething/submit.txt +++ /dev/null @@ -1,27 +0,0 @@ -Subject: Report on See Something, Say Something - -A user of -See Something, Say Something has submitted the following report -of a problem that they believe might require your attention. - -[% image_url %] ----------- - -[% user_details %] - -[% phone_line %][% category_line %][% subcategory_line %] - -Details: [% detail %] - -Easting/Northing: [% easting %]/[% northing %] - -Latitude: [% latitude %] - -Longitude: [% longitude %] - -[% closest_address %]---------- - -Replies to this email will go to the user who submitted the problem -unless it is an anonymous report in which case they will be discarded. - -[% signature %] diff --git a/templates/web/angus/header.html b/templates/web/angus/header.html index c1d9870cd..1814045cb 100644 --- a/templates/web/angus/header.html +++ b/templates/web/angus/header.html @@ -16,13 +16,7 @@ <meta name="mobileoptimized" content="0"> [% INCLUDE 'header_opengraph.html' %] - <link rel="stylesheet" href="[% version('/cobrands/angus/base.css') %]"> - <link rel="stylesheet" href="[% version('/cobrands/angus/layout.css') %]" media="(min-width:48em)"> - [% extra_css %] - <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/angus/layout.css') %]"> - <![endif]--> - + [% INCLUDE 'header/css.html' %] [% INCLUDE 'common_header_tags.html' %] [% IF c.req.uri.host == 'osm.fixmystreet.com' %] diff --git a/templates/web/angus/maps/fms.html b/templates/web/angus/maps/fms.html deleted file mode 100644 index 61c56f121..000000000 --- a/templates/web/angus/maps/fms.html +++ /dev/null @@ -1,11 +0,0 @@ -[% -map_js = [ - version('/vendor/OpenLayers/OpenLayers.angus.js'), - version('/js/map-OpenLayers.js'), - version('/js/map-bing-ol.js'), - version('/js/map-fms.js'), - version('/cobrands/fixmystreet/assets.js'), - version('/cobrands/angus/js.js'), -]; -map_html = INCLUDE maps/openlayers.html include_key = 1 -%] diff --git a/templates/web/base/admin/body-form.html b/templates/web/base/admin/body-form.html index 55d0e500c..54445a282 100644 --- a/templates/web/base/admin/body-form.html +++ b/templates/web/base/admin/body-form.html @@ -75,8 +75,7 @@ </div> <p> <label for="area_ids">[% loc('Area covered') %]</label> - <select class="form-control" name="area_ids" id="area_ids" multiple> - <option value=""> -- [% loc('Select an area') %] -- </option> + <select class="form-control js-multiple" name="area_ids" id="area_ids" multiple data-none="-- [% loc('Select an area') %] --"> [% SET body_areas = body.areas %] [% FOR area IN areas %] [% SET aid = area.id %] diff --git a/templates/web/base/admin/config_page.html b/templates/web/base/admin/config_page.html index 87032b0b6..d448d2a63 100644 --- a/templates/web/base/admin/config_page.html +++ b/templates/web/base/admin/config_page.html @@ -55,7 +55,7 @@ running version <strong>[% git_version || 'unknown' %]</strong>. </tr> [% INCLUDE with_cobrand value="MAP_TYPE" cob=c.cobrand.map_type %] [% INCLUDE with_cobrand value="EXAMPLE_PLACES" - conf = decode(c.config.EXAMPLE_PLACES.join(', ')) + conf = c.config.EXAMPLE_PLACES.join(', ') cob = c.cobrand.example_places %] [% INCLUDE with_cobrand value="LANGUAGES" cob = c.cobrand.languages %] diff --git a/templates/web/base/admin/exordefects/index.html b/templates/web/base/admin/exordefects/index.html index dba58198d..65b2aa486 100644 --- a/templates/web/base/admin/exordefects/index.html +++ b/templates/web/base/admin/exordefects/index.html @@ -6,26 +6,29 @@ [% END %] <form method="get" action="[% c.uri_for('download') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <div class="filters"> <p> - <label for="start_date">[% ('Start Date:') %]</label><input type="text" class="form-control" - placeholder="[% ('Click here or enter as dd/mm/yyyy') %]" name="start_date" id="start_date" - value="[% start_date ? start_date.strftime( '%d/%m/%Y') : '' | html %]" /> + <label for="start_date">[% ('Start Date:') %]</label><input type="date" class="form-control" + name="start_date" id="start_date" + value="[% start_date ? start_date.strftime( '%Y-%m-%d') : '' | html %]" /> </p> <p> - <label for="end_date">[% ('End Date:') %]</label><input type="text" class="form-control" - placeholder="[% ('Click here or enter as dd/mm/yyyy') %]" name="end_date" id="end_date" size="5" - value="[% end_date ? end_date.strftime( '%d/%m/%Y') : '' | html %]" /> + <label for="end_date">[% ('End Date:') %]</label><input type="date" class="form-control" + name="end_date" id="end_date" size="5" + value="[% end_date ? end_date.strftime( '%Y-%m-%d') : '' | html %]" /> </p> <p> - [% ('Inspector:') %] <select class="form-control" id='user_id' name='user_id'> + <label for="user_id">[% ('Inspector:') %]</label> + <select class="form-control" id='user_id' name='user_id'> <option value=''>[% ('All inspectors') %]</option> [% FOR inspector IN inspectors %] <option value="[% inspector.id %]" [% 'selected' IF user_id == inspector.id %]>[% inspector.name %] ([% inspector.get_extra_metadata('initials') %])</option> [% END %] </select> </p> + </div> <p> <input type="submit" class="btn" size="30" value="Download RDI file" /> diff --git a/templates/web/base/admin/report_blocks.html b/templates/web/base/admin/report_blocks.html index f5896b88f..4c52b14bb 100644 --- a/templates/web/base/admin/report_blocks.html +++ b/templates/web/base/admin/report_blocks.html @@ -15,7 +15,7 @@ SET state_groups = c.cobrand.state_groups_admin; [% BLOCK abuse_button -%] [% IF allowed_pages.abuse_edit -%] -[% IF email_in_abuse %]<small>[% loc('(Email in abuse table)') %]</small>[% ELSE %]<input type="submit" class="btn" name="banuser" value="[% loc('Ban email address') %]" />[% END %] +[% IF username_in_abuse %]<small>[% loc('User in abuse table') %]</small>[% ELSE %]<input type="submit" class="btn" name="banuser" value="[% loc('Ban user') %]" />[% END %] [%- END %] [%- END %] diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html index 3c8134b80..ff99bb907 100644 --- a/templates/web/base/admin/report_edit.html +++ b/templates/web/base/admin/report_edit.html @@ -1,8 +1,8 @@ [% PROCESS "maps/${map.type}.html" admin = 1; + SET bodyclass = 'mappage with-notes'; INCLUDE 'admin/header.html' - title = tprintf(loc('Editing problem %d'), problem.id ), - bodyclass = 'mappage with-notes'; + title = tprintf(loc('Editing problem %d'), problem.id ); PROCESS 'admin/report_blocks.html' -%] @@ -126,12 +126,17 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a> </select></li> <li><label for="name">[% loc('Name:') %]</label> <input type='text' class="form-control" name='name' id='name' value='[% problem.name | html %]'></li> -<li><label for="email">[% loc('Email:') %]</label> - <input type='text' class="form-control" id='email' name='email' value='[% problem.user.email | html %]'> +<li><label for="username">[% loc('User:') %]</label> + <input type='text' class="form-control" id='username' name='username' value='[% problem.user.username | html %]'> [% PROCESS abuse_button %] [% PROCESS flag_button user=problem.user %] </li> -<li>[% loc('Phone:') %] [% problem.user.phone | html %]</li> +[% IF problem.user.phone_display != problem.user.username %] +<li>[% loc('Phone:') %] [% problem.user.phone_display | html %]</li> +[% END %] +[% IF problem.user.email != problem.user.username %] +<li>[% loc('Email:') %] [% problem.user.email | html %]</li> +[% END %] <li><label class="inline-text" for="flagged">[% loc('Flagged:') %]</label> <input type="checkbox" id="flagged" name="flagged"[% ' checked' IF problem.flagged %]></li> <li><label class="inline-text" for="non_public">[% loc('Private') %]:</label> diff --git a/templates/web/base/admin/stats.html b/templates/web/base/admin/stats.html deleted file mode 100644 index 150afd619..000000000 --- a/templates/web/base/admin/stats.html +++ /dev/null @@ -1,106 +0,0 @@ -[% INCLUDE 'admin/header.html' title=loc('Stats') %] - -[% IF show_count %] -<p> -<strong>[% tprintf( unconfirmed ? loc( 'All reports between %s and %s' ) : loc( 'Confirmed reports between %s and %s' ), start_date.ymd, end_date.ymd ) | html %]</strong> -</p> -[% IF bymonth %] -<table> - <thead> - <td style="width: 8em"><strong>[% loc('Year') %]</strong></td> - <td style="width: 8em"><strong>[% loc('Month') %]</strong></td> - <td><strong>[% loc('Count') %]</strong></td> - </thead> - [% total = 0 %] - [% WHILE ( state = states.next ) %] - [% total = total + state.get_column( 'count' ) %] - <tr> - <td>[% state.get_column( 'c_year') | html %]</td> - <td>[% state.get_column( 'c_month') | html %]</td> - <td>[% state.get_column( 'count' ) %]</td> - </tr> - [% END %] - <tr> - <td colspan="2"><strong>[% loc( 'Total' ) %]</strong></td> - <td><strong>[% total %]</strong></td> - </tr> -</table> -[% ELSE %] -<table> - <thead> - <td style="width: 8em"><strong>[% loc('Current state') %]</strong></td> - <td><strong>[% loc('Count') %]</strong></td> - </thead> - [% total = 0 %] - [% WHILE ( state = states.next ) %] - [% total = total + state.get_column( 'count' ) %] - <tr> - <td>[% state.state | html %]</td> - <td>[% state.get_column( 'count' ) %]</td> - </tr> - [% END %] - <tr> - <td><strong>[% loc( 'Total' ) %]</strong></td> - <td><strong>[% total %]</strong></td> - </tr> -</table> -[% END %] - -[% IF unconfirmed %] - <p> - <small>[% loc( 'Note that when including unconfirmed reports we use the date the report was created which may not be in the same month the report was confirmed so the numbers may jump about a little' ) %]</small> - </p> -[% END %] -[% ELSE %] -<ul> -<li><a href="stats/questionnaire">[% loc('Survey Results') %]</a></li> -<li><a href="stats/state">[% loc('Problem breakdown by state') %]</a></li> -<li><a href="stats/fix-rate">[% loc('Category fix rate for problems > 4 weeks old') %]</a></li> -</ul> - -[% END %] - -[% IF errors %] - [% FOREACH error IN errors %] - <p class="error">[% error %]</p> - [% END %] -[% END %] - -<form method="post" action="[% c.uri_for('stats') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - <p> - <label for="start_date">[% loc('Start Date:') %]</label><input type="text" class="form-control" - placeholder="[% loc('Click here or enter as dd/mm/yyyy') %]" name="start_date" id="start_date" - value="[% start_date ? start_date.strftime( '%d/%m/%Y') : '' | html %]" /> - </p> - - <p> - <label for="end_date">[% loc('End Date:') %]</label><input type="text" class="form-control" - placeholder="[% loc('Click here or enter as dd/mm/yyyy') %]" name="end_date" id="end_date" size="5" - value="[% end_date ? end_date.strftime( '%d/%m/%Y') : '' | html %]" /> - </p> - - <p> - <input type="checkbox" name="unconfirmed" id="unconfirmed"[% unconfirmed ? ' checked' : '' %] /><label class="inline" for="unconfirmed">[% loc('Include unconfirmed reports') %]</label> - </p> - - <p> - <input type="checkbox" name="bymonth" id="bymonth"[% bymonth ? ' checked' : '' %] /><label class="inline" for="bymonth">[% loc('By Date') %]</label> - </p> - - [% IF c.user.is_superuser %] - <p> - [% loc('Council:') %] <select class="form-control" id='body' name='body'> - <option value=''>[% loc('No council') %]</option> - [% FOR body IN bodies %] - <option value="[% body.id %]"[% ' selected' IF body.id == selected_body %]>[% body.name %]</option> - [% END %] - </select> - </p> - [% END %] - - <p> - <input type="submit" class="btn" name="getcounts" size="30" id="getcounts" value="[% loc('Get Count') %]" /> - </p> -</form> - -[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/base/admin/stats_fix_rate.html b/templates/web/base/admin/stats/fix_rate.html index fb88a1c06..fb88a1c06 100644 --- a/templates/web/base/admin/stats_fix_rate.html +++ b/templates/web/base/admin/stats/fix_rate.html diff --git a/templates/web/base/admin/stats/index.html b/templates/web/base/admin/stats/index.html new file mode 100644 index 000000000..6ea1ae403 --- /dev/null +++ b/templates/web/base/admin/stats/index.html @@ -0,0 +1,10 @@ +[% INCLUDE 'admin/header.html' title=loc('Stats') %] + +<ul> +<li><a href="[% c.uri_for_action('admin/stats/questionnaire') %]">[% loc('Survey Results') %]</a></li> +<li><a href="[% c.uri_for_action('admin/stats/state') %]">[% loc('Problem breakdown by state') %]</a></li> +<li><a href="[% c.uri_for_action('admin/stats/fix_rate') %]">[% loc('Category fix rate for problems > 4 weeks old') %]</a></li> +<li><a href="[% c.uri_for_action('dashboard/index') %]">[% loc('Summary statistics') %]</a></li> +</ul> + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/base/admin/questionnaire.html b/templates/web/base/admin/stats/questionnaire.html index 680e0d214..680e0d214 100644 --- a/templates/web/base/admin/questionnaire.html +++ b/templates/web/base/admin/stats/questionnaire.html diff --git a/templates/web/base/admin/stats_by_state.html b/templates/web/base/admin/stats/state.html index 6bcd35f88..6bcd35f88 100644 --- a/templates/web/base/admin/stats_by_state.html +++ b/templates/web/base/admin/stats/state.html diff --git a/templates/web/base/admin/template_edit.html b/templates/web/base/admin/template_edit.html index 76de70dcc..3e436dbf9 100644 --- a/templates/web/base/admin/template_edit.html +++ b/templates/web/base/admin/template_edit.html @@ -9,20 +9,30 @@ accept-charset="utf-8" class="validate"> + [% IF errors %] + <p class="error">[% loc('Please correct the errors below') %]</p> + [% END %] + + + <div class="admin-hint"> + <p> + [% loc('This is a <strong>private</strong> name for this template so you can identify it when updating reports or editing in the admin.') %] + </p> + </div> <p> <strong>[% loc('Title:') %] </strong> <input type="text" name="title" class="required form-control" size="30" value="[% rt.title| html %]"> </p> + + <div class="admin-hint"> + <p> + [% loc('This is the <strong>public</strong> text that will be shown on the site.') %] + </p> + </div> <p> <strong>[% loc('Text:') %] </strong> <textarea class="form-control" name="text" class="required">[% rt.text |html %]</textarea> </p> - <p> - <label> - <strong>[% loc('Auto-response:') %]</strong> - <input type="checkbox" name="auto_response" [% 'checked' IF rt.auto_response %] /> - </label> - </p> <div class="admin-hint"> <p> @@ -41,13 +51,28 @@ [% INCLUDE 'admin/state_groups_select.html' current_state=rt.state include_empty=1 %] </p> + [% IF errors.auto_response %] + <div class="form-error">[% errors.auto_response %]</div> + [% END %] + <div class="admin-hint"> + <p> + [% loc('If ticked, this template will be used for Open311 updates that put problems in this state.') %] + </p> + </div> + <p> + <label> + <strong>[% loc('Auto-response:') %]</strong> + <input type="checkbox" name="auto_response" [% 'checked' IF rt.auto_response %] /> + </label> + </p> + <p> <input type="hidden" name="token" value="[% csrf_token %]" > <input type="submit" class="btn" name="Edit templates" value="[% rt.id ? loc('Save changes') : loc('Create template') %]" > </p> [% IF rt.id %] <p> - <input class="delete btn-danger" type="submit" name="delete_template" value="[% loc('Delete template') %]"> + <input class="delete btn-danger" type="submit" name="delete_template" value="[% loc('Delete template') %]" data-confirm="[% loc('Are you sure?') %]"> </p> [% END %] </form> diff --git a/templates/web/base/admin/templates.html b/templates/web/base/admin/templates.html index f9dda7a4c..444f2734d 100644 --- a/templates/web/base/admin/templates.html +++ b/templates/web/base/admin/templates.html @@ -1,24 +1,30 @@ [% INCLUDE 'admin/header.html' title=tprintf(loc('Response Templates for %s'), body.name) -%] -[% IF c.cobrand.moniker == 'zurich' %] - <h2> [% tprintf(loc('Response Templates for %s'), body.name) %] </h2> -[% END %] - <table> <thead> <tr> <th> [% loc('Title') %] </th> - <th> [% loc('Text') %] </th> - <th> [% loc('Created') %] </th> + <th> [% loc('Categories') %] </th> + <th> [% loc('State') %] </th> + <th> [% loc('Auto Response') %] </th> <th> </th> </tr> </thead> <tbody> [% FOR t IN response_templates %] <tr> - <td> [% t.title %] </td> - <td> [% t.text %] </td> - <td> [% t.created %] </td> + <td> [% t.title | html %] </td> + <td> + [% UNLESS t.contacts.size %] + <em>[% loc('All categories') %]</em> + [% ELSE %] + [% FOR contact IN t.contacts %] + [% contact.category_display %][% ',' UNLESS loop.last %] + [% END %] + [% END %] + </td> + <td> [% t.state | html %] </td> + <td> [% IF t.auto_response %]X[% END %] </td> <td> <a href="[% c.uri_for('templates', body.id, t.id) %]" class="btn">[% loc('Edit') %]</a> </td> </tr> [% END %] diff --git a/templates/web/base/admin/update_edit.html b/templates/web/base/admin/update_edit.html index 2b20c50b3..34e64310f 100644 --- a/templates/web/base/admin/update_edit.html +++ b/templates/web/base/admin/update_edit.html @@ -31,8 +31,10 @@ <option [% 'selected ' IF state.0 == update.state %] value="[% state.0 %]">[% state.1 %]</option> [% END %] </select></li> -<li>[% loc('Name:') %] <input type='text' class="form-control" name='name' id='name' value='[% update.name | html %]'></li> -<li>[% loc('Email:') %] <input type='text' class="form-control" id='email' name='email' value='[% update.user.email | html %]'> +<li><label for="name">[% loc('Name:') %]</label> + <input type='text' class="form-control" name='name' id='name' value='[% update.name | html %]'></li> +<li><label for="username">[% loc('User:') %]</label> + <input type='text' class="form-control" id='username' name='username' value='[% update.user.username | html %]'> [%- IF update.user.from_body && update.user.from_body.id == update.problem.bodies_str %] [% ' (' _ tprintf(loc('user is from same council as problem - %d'), update.user.from_body.id ) _')' %] [% END -%] diff --git a/templates/web/base/admin/user-form.html b/templates/web/base/admin/user-form.html index dbd554b1e..9a2c0b9e2 100644 --- a/templates/web/base/admin/user-form.html +++ b/templates/web/base/admin/user-form.html @@ -18,8 +18,26 @@ </li> <li><label for="email">[% loc('Email:') %]</label> <input type='text' class="form-control" id='email' name='email' value='[% user.email | html %]'></li> + [% IF c.config.SMS_AUTHENTICATION %] + <li><label class="inline" for="email_verified">[% loc('Email verified:') %]</label> + <input type="checkbox" id="email_verified" name="email_verified" value="1" [% user.email_verified ? ' checked' : '' %]> + [% ELSE %] + <input type="hidden" name="email_verified" value="1"> + [% END %] <li><label for="phone">[% loc('Phone:') %]</label> <input type='text' class="form-control" id='phone' name='phone' value='[% user.phone | html %]'></li> + [% IF c.config.SMS_AUTHENTICATION %] + <li><label class="inline" for="phone_verified">[% loc('Phone verified:') %]</label> + <input type="checkbox" id="phone_verified" name="phone_verified" value="1" [% user.phone_verified ? ' checked' : '' %]> + [% ELSE %] + <input type="hidden" name="phone_verified" value="0"> + [% END %] + + [% IF username_in_abuse %] + <li> + <p class="error">[% loc('User in abuse table') %] <input name="unban" type="submit" value="[% loc('Unban') %]"></p> + </li> + [% END %] [% IF c.user.is_superuser || c.cobrand.moniker == 'zurich' %] <li> @@ -109,7 +127,7 @@ </div> [% IF c.user.is_superuser %] [% loc('Trusted by bodies:') %]<br /> - <select class="form-control" id='body' name='trusted_bodies' multiple> + <select class="form-control js-multiple" id='body' name='trusted_bodies' multiple> [% FOR body IN bodies %] <option value="[% body.id %]"[% ' selected' IF user.has_permission_to('trusted', body.id) %]>[% body.name %]</option> [% END %] diff --git a/templates/web/base/admin/users.html b/templates/web/base/admin/users.html index 8e35e1c31..6dfcf4204 100644 --- a/templates/web/base/admin/users.html +++ b/templates/web/base/admin/users.html @@ -29,7 +29,7 @@ [% IF user.is_superuser %] * [% END %] </td> [% IF c.cobrand.moniker != 'zurich' %] - <td>[% user.flagged == 2 ? loc('(Email in abuse table)') : user.flagged ? loc('Yes') : ' ' %]</td> + <td>[% user.flagged == 2 ? loc('User in abuse table') : user.flagged ? loc('Yes') : ' ' %]</td> [% END %] <td>[% IF user.id %]<a href="[% c.uri_for( 'user_edit', user.id ) %]">[% loc('Edit') %]</a>[% END %]</td> </tr> diff --git a/templates/web/base/alert/choose.html b/templates/web/base/alert/choose.html index 312b9f520..50835e90c 100644 --- a/templates/web/base/alert/choose.html +++ b/templates/web/base/alert/choose.html @@ -3,12 +3,13 @@ <h1>[% loc('Local RSS feeds and email alerts') %]</h1> [% 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 plain-list"> + <p>[% loc('We found more than one match for that location.') %]</p> + <ul class="pc_alternatives"> [% FOREACH match IN possible_location_matches %] <li><a href="[% choose_target_uri %]?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %]">[% match.address | html %]</a></li> [% END %] </ul> + <p>[% loc('We show up to ten matches, please try a different search if yours is not here.') %]</p> [% END %] [% INCLUDE 'footer.html' %] diff --git a/templates/web/base/alert/index.html b/templates/web/base/alert/index.html index acef89a78..1442e6bdc 100644 --- a/templates/web/base/alert/index.html +++ b/templates/web/base/alert/index.html @@ -1,4 +1,5 @@ -[% INCLUDE 'header.html', title = loc('Local RSS feeds and email alerts'), bodyclass = 'fullwidthpage' %] +[% SET bodyclass = 'alertpage fullwidthpage' %] +[% INCLUDE 'header.html', title = loc('Local RSS feeds and email alerts') %] <h1>[% loc('Local RSS feeds and email alerts') %]</h1> @@ -34,6 +35,7 @@ within a certain distance of a particular location.', "%s is the site name"), si <input class="green-btn" type="submit" value="[% loc('Go') %]"> </div> </fieldset> + <a href="/alert/list" id="geolocate_link">… [% loc('or locate me automatically') %]</a> </form> [% IF photos.size %] diff --git a/templates/web/base/around/_error_multiple.html b/templates/web/base/around/_error_multiple.html index b47a91ca9..751d81173 100644 --- a/templates/web/base/around/_error_multiple.html +++ b/templates/web/base/around/_error_multiple.html @@ -3,12 +3,13 @@ [% 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> + <p>[% loc('We found more than one match for that location.') %]</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> + <li><a href="/around?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %][% IF c.req.params.category %];category=[% c.req.params.category | uri %][% END %]">[% match.address | html %]</a></li> [% END %] </ul> + <p>[% loc('We show up to ten matches, please try a different search if yours is not here.') %]</p> [% END %] [% IF partial_token %] diff --git a/templates/web/base/around/_updates.html b/templates/web/base/around/_updates.html index 458983e8f..6121b218b 100755 --- a/templates/web/base/around/_updates.html +++ b/templates/web/base/around/_updates.html @@ -1,5 +1,5 @@ <div class="shadow-wrap"> - <ul id="key-tools" class="singleton"> + <ul id="key-tools"> <li><a class="feed" id="key-tool-around-updates" href="[% email_url | html %]">[% loc("Get updates") %]</a></li> </ul> </div> diff --git a/templates/web/base/around/display_location.html b/templates/web/base/around/display_location.html index 3ed16d3d3..029435cf2 100755 --- a/templates/web/base/around/display_location.html +++ b/templates/web/base/around/display_location.html @@ -54,6 +54,12 @@ [% map_html %] + [% IF c.req.params.no_pins %] + <a class="big-hide-pins-link" rel='nofollow' href="[% c.uri_with( { no_pins => 0 } ) %]">[% loc('Show pins') %]</a> + [% ELSE %] + <a class="big-hide-pins-link" rel='nofollow' href="[% c.uri_with( { no_pins => 1 } ) %]">[% loc('Hide pins') %]</a> + [% END %] + <p id='sub_map_links'> [% map_sub_links %] [% IF c.req.params.no_pins %] @@ -61,14 +67,6 @@ [% ELSE %] <a id='hide_pins_link' rel='nofollow' href="[% c.uri_with( { no_pins => 1 } ) %]">[% loc('Hide pins') %]</a> [% END %] - [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %] - <span class="hidden">|</span> - [% IF c.req.params.all_pins %] - <a id='all_pins_link' rel='nofollow' href="[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]">[% loc('Hide old') %]</a> - [% ELSE %] - <a id='all_pins_link' rel='nofollow' href="[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]">[% loc('Show old') %]</a> - [% END %] - [% END %] </p> <div class="mobile-map-banner"> diff --git a/templates/web/base/around/index.html b/templates/web/base/around/index.html index f2be5575c..8f6af6225 100644 --- a/templates/web/base/around/index.html +++ b/templates/web/base/around/index.html @@ -1,5 +1,6 @@ [% pre_container_extra = INCLUDE 'around/postcode_form.html' %] -[% INCLUDE 'header.html', title = loc('Reporting a problem'), bodyclass = 'frontpage fullwidthpage' %] +[% SET bodyclass = 'frontpage fullwidthpage' ~%] +[% INCLUDE 'header.html', title = loc('Reporting a problem') %] [% # NOTE ON PARTIAL REPORTS: diff --git a/templates/web/base/around/lookup_by_ref.html b/templates/web/base/around/lookup_by_ref.html index aded05638..747354c1e 100644 --- a/templates/web/base/around/lookup_by_ref.html +++ b/templates/web/base/around/lookup_by_ref.html @@ -1,7 +1,8 @@ [% pre_container_extra = INCLUDE 'around/postcode_form.html', pc = ref %] -[% INCLUDE 'header.html', title = loc('Reporting a problem'), bodyclass = 'frontpage fullwidthpage' %] +[% SET bodyclass = 'frontpage fullwidthpage' ~%] +[% INCLUDE 'header.html', title = loc('Reporting a problem') %] -<div class="tablewrapper"> +[% IF matching_reports %] <p>[% loc('We found more than one match for that problem reference:') %]</p> <ul class="pc_alternatives"> [% FOREACH report IN matching_reports %] @@ -13,6 +14,8 @@ </li> [% END %] </ul> -</div> + [% ELSE %] + <p>[% loc('Searching found no reports.') %]</p> +[% END %] [% INCLUDE 'footer.html' %] diff --git a/templates/web/base/around/on_map_list_items.html b/templates/web/base/around/on_map_list_items.html index b7257030d..fafe7f433 100644 --- a/templates/web/base/around/on_map_list_items.html +++ b/templates/web/base/around/on_map_list_items.html @@ -1,14 +1,31 @@ -[% 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 %] +<ul class="item-list item-list--reports"> +[% IF on_map.size %] + [% FOREACH problem IN on_map %] [% INCLUDE 'reports/_list-entry.html' %] [% END %] + [% IF around_map.size %] + <li class="item-list__item item-list__item--empty"> + <p>[% loc('Here are some other nearby reports:') %]</p> + </li> + [% END %] +[% ELSIF around_map.size %] + <li class="item-list__item item-list__item--empty"> + <p>[% loc('No reports to show on map, here are some nearby:') %]</p> + </li> [% ELSE %] <li class="item-list__item item-list__item--empty"> <p>[% loc('There are no reports to show.') %]</p> </li> [% END %] +</ul> + +[% IF around_map.size %] +<ul class="item-list item-list--reports"> + [% FOREACH problem IN around_map %] + [% dist = tprintf("%.1f", (problem.distance || 0) ); + problem = problem.problem; + %] + [% INCLUDE 'reports/_list-entry.html' %] + [% END %] +</ul> +[% END %] diff --git a/templates/web/base/around/postcode_form.html b/templates/web/base/around/postcode_form.html index 69c95d311..efb639eda 100644 --- a/templates/web/base/around/postcode_form.html +++ b/templates/web/base/around/postcode_form.html @@ -1,6 +1,8 @@ <div id="front-main"> <div id="front-main-container"> - [% INCLUDE 'around/intro.html' %] + [% UNLESS possible_location_matches %] + [% INCLUDE 'around/intro.html' %] + [% END %] [% question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area'); @@ -21,5 +23,6 @@ <input type="hidden" name="filter_category" value="[% c.user.categories.join(",") | html %]"> [% END %] </form> + <a href="[% c.uri_for('/around') %]" id="geolocate_link">… [% loc('or locate me automatically') %]</a> </div> </div> diff --git a/templates/web/base/around/tabbed_lists.html b/templates/web/base/around/tabbed_lists.html index 5418ef914..f135684b9 100755 --- a/templates/web/base/around/tabbed_lists.html +++ b/templates/web/base/around/tabbed_lists.html @@ -1,5 +1,13 @@ [% INCLUDE "reports/_list-filters.html" %] -<ul id="js-reports-list" class="item-list item-list--reports"> +<div class="js-pagination"> +[% INCLUDE 'pagination.html' param = 'p' %] +</div> + +<div id="js-reports-list"> [% INCLUDE "around/on_map_list_items.html" %] -</ul> +</div> + +<div class="js-pagination"> +[% INCLUDE 'pagination.html' param = 'p' %] +</div> diff --git a/templates/web/base/auth/_username_error.html b/templates/web/base/auth/_username_error.html new file mode 100644 index 000000000..c0ddc135a --- /dev/null +++ b/templates/web/base/auth/_username_error.html @@ -0,0 +1,13 @@ +[% IF username_error; + # other keys include fqdn, mxcheck if you'd like to write a custom error message + errors = { + nonmobile = loc('Please enter a mobile number'), + sms_failed = tprintf(loc('Sending a confirmation text failed: "%s"'), sms_error), + missing_phone = loc('Please enter your phone number'), + other_phone = loc('Please check your phone number is correct'), + missing_email = loc('Please enter your email'), + other_email = loc('Please check your email address is correct') + }; + default = "other_$default"; + errors.$username_error || errors.$default; +END ~%] diff --git a/templates/web/base/auth/change_email.html b/templates/web/base/auth/change_email.html index a444b8c31..b3bec6b3e 100644 --- a/templates/web/base/auth/change_email.html +++ b/templates/web/base/auth/change_email.html @@ -1,33 +1,48 @@ -[% INCLUDE 'header.html', title = loc('Change email address'), bodyclass = 'authpage' %] - -<h1>[% loc('Change email address') %]</h1> - -[% IF c.req.args.0 == 'success' %] - <p class="form-success">[% loc('You have successfully confirmed your email address.') %]</p> -[% END %] - +[% +IF c.user.email_verified OR (c.user.email AND NOT verifying); + SET title = loc('Change email address'); +ELSIF c.user.email; + SET title = loc('Verify email address'); +ELSE; + SET title = loc('Add email address'); +END +-%] +[% INCLUDE 'header.html' bodyclass = 'authpage' %] + +<h1>[% title %]</h1> + +[% IF c.user.email_verified OR (c.user.email AND NOT verifying) %] [% loc('Your email address') %]: [% c.user.email %] +[% ELSIF c.user.email %] +[% DEFAULT username = c.user.email %] +[% END %] -<form action="[% c.uri_for('change_email') %]" method="post" name="change_email"> +<form method="post" name="change_email"> <input type="hidden" name="token" value="[% csrf_token %]"> <fieldset> - [% IF email_error; + [% IF username_error; errors = { - missing = loc('Please enter your email'), - other = loc('Please check your email address is correct') + missing_email = loc('Please enter your email'), + other_email = loc('Please check your email address is correct') }; - loc_email_error = errors.$email_error || errors.other; + loc_username_error = errors.$username_error || errors.other_email; %] - <div class="form-error">[% loc_email_error %]</div> + <div class="form-error">[% loc_username_error %]</div> [% END %] <div class="form-field"> - <label for="email">[% loc('New email address:') %]</label> - <input class="form-control" type="email" name="email" id="email" value="[% email | html %]"> + <label for="email"> + [% IF NOT c.user.email_verified AND c.user.email AND verifying %] + [% loc('Email address') %]: + [% ELSE %] + [% loc('New email address:') %] + [% END %] + </label> + <input class="form-control" type="email" name="email" id="email" value="[% username | html %]"> </div> <div class="final-submit"> - <input type="submit" class="btn" value="[% loc('Change email address') %]"> + <input type="submit" class="btn" value="[% title %]"> </div> </fieldset> diff --git a/templates/web/base/auth/change_password.html b/templates/web/base/auth/change_password.html index 094d131eb..a32dbaf9c 100644 --- a/templates/web/base/auth/change_password.html +++ b/templates/web/base/auth/change_password.html @@ -15,7 +15,7 @@ INCLUDE 'header.html', title = loc('Change password'), bodyclass = bclass <h1>[% loc('Change password') %]</h1> -<form action="[% c.uri_for('change_password') %]" method="post" name="change_password" class="fieldset"> +<form action="[% c.uri_for_action('/auth/profile/change_password') %]" method="post" name="change_password" class="fieldset"> <input type="hidden" name="token" value="[% csrf_token %]"> <fieldset> diff --git a/templates/web/base/auth/change_phone.html b/templates/web/base/auth/change_phone.html new file mode 100644 index 000000000..27a2f63dd --- /dev/null +++ b/templates/web/base/auth/change_phone.html @@ -0,0 +1,51 @@ +[% +IF c.user.phone_verified OR (c.user.phone AND NOT verifying); + SET title = loc('Change phone number'); +ELSIF c.user.phone; + SET title = loc('Verify phone number'); +ELSE; + SET title = loc('Add phone number'); +END +-%] +[% INCLUDE 'header.html' bodyclass = 'authpage' %] + +<h1>[% title %]</h1> + +[% IF c.req.args.0 == 'success' %] + <p class="form-success">[% loc('You have successfully confirmed your phone number.') %]</p> +[% END %] + +[% IF c.user.phone_verified OR (c.user.phone AND NOT verifying) %] +[% loc('Your phone number') %]: [% c.user.phone_display %] +[% ELSIF c.user.phone %] +[% DEFAULT username = c.user.phone %] +[% END %] + +<form method="post" name="change_phone"> + <input type="hidden" name="token" value="[% csrf_token %]"> + + <fieldset> + [% loc_username_error = INCLUDE 'auth/_username_error.html' default='phone' %] + [% IF loc_username_error %] + <div class="form-error">[% loc_username_error %]</div> + [% END %] + + <div class="form-field"> + <label for="phone"> + [% IF NOT c.user.phone_verified AND c.user.phone AND verifying %] + [% loc('Phone number') %]: + [% ELSE %] + [% loc('New phone number:') %] + [% END %] + </label> + <input class="form-control" type="tel" name="username" id="phone" value="[% username | html %]"> + </div> + <div class="final-submit"> + <input type="submit" class="btn" value="[% title %]"> + </div> + + </fieldset> +</form> + + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/base/auth/general.html b/templates/web/base/auth/general.html index 2a8bea402..8fc5578c1 100644 --- a/templates/web/base/auth/general.html +++ b/templates/web/base/auth/general.html @@ -11,12 +11,12 @@ <p class="form-error">[% loc('Sorry, we could not log you in. Please fill in the form below.') %]</p> [% END %] -<form action="[% c.uri_for() %]" method="post" name="general_auth" class="validate"> +<form action="/auth" method="post" name="general_auth" class="validate"> <fieldset> <input type="hidden" name="r" value="[% c.req.params.r | html %]"> -[% IF NOT oauth_need_email AND (c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY) %] +[% IF NOT oauth_need_email AND c.cobrand.social_auth_enabled %] [% IF c.config.FACEBOOK_APP_ID %] <div class="form-box"> <button name="facebook_sign_in" id="facebook_sign_in" value="facebook_sign_in" class="btn btn--block btn--social btn--facebook"> @@ -36,25 +36,22 @@ <div id="js-social-email-hide"> [% END %] - [% IF email_error; + [% loc_username_error = INCLUDE 'auth/_username_error.html' default='email' %] - # 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 c.config.SMS_AUTHENTICATION %] + [% SET username_label = loc('Your email or mobile') %] +[% ELSE %] + [% SET username_label = loc('Your email') %] +[% END %] - <label class="n" for="email">[% loc('Email') %]</label> - [% IF loc_email_error %] - <div class="form-error">[% loc_email_error %]</div> + <label class="n" for="username">[% username_label %]</label> + [% IF loc_username_error %] + <div class="form-error">[% loc_username_error %]</div> [% ELSIF sign_in_error %] - <div class="form-error">[% loc('There was a problem with your email/password combination. If you cannot remember your password, or do not have one, please fill in the ‘sign in by email’ section of the form.') %]</div> + <div class="form-error">[% loc('There was a problem with your login information. If you cannot remember your password, or do not have one, please fill in the ‘No’ section of the form.') %]</div> [% END %] - <input type="email" class="form-control required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]" autofocus> + <input type="text" class="form-control required" id="username" name="username" value="[% username | html %]" + [%~ IF c.cobrand.moniker != 'borsetshire' %] autofocus[% END %]> <div id="form_sign_in"> <h3>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h3> @@ -68,7 +65,7 @@ [% END %] </div> -[% IF NOT oauth_need_email AND (c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY) %] +[% IF NOT oauth_need_email AND c.cobrand.social_auth_enabled %] </div> [% END %] @@ -85,7 +82,7 @@ <div class="form-txt-submit-box"> <input type="password" name="password_sign_in" class="form-control" id="password_sign_in" value="" placeholder="[% loc('Your password') %]"> - <input class="green-btn" type="submit" name="sign_in" value="[% loc('Sign in') %]"> + <input class="green-btn" type="submit" name="sign_in_by_password" value="[% loc('Sign in') %]"> </div> <div class="checkbox-group"> @@ -95,7 +92,11 @@ <div class="general-notes"> <p><strong>[% loc('Forgotten your password?') %]</strong> + [% IF c.config.SMS_AUTHENTICATION %] + [% loc('Sign in by email or text, providing a new password. When you click the link in your email or enter the SMS authentication code, your password will be updated.') %]</p> + [% ELSE %] [% loc('Sign in by email instead, providing a new password. When you click the link in your email, your password will be updated.') %]</p> + [% END %] </div> </div> @@ -103,7 +104,11 @@ [% BLOCK form_sign_in_no %] <div id="form_sign_in_no" class="form-box"> + [% IF c.config.SMS_AUTHENTICATION %] + <h5>[% loc('<strong>No</strong> let me sign in by email or text') %]</h5> + [% ELSE %] <h5>[% loc('<strong>No</strong> let me sign in by email') %]</h5> + [% END %] <label for="name">[% loc('Name') %]</label> <input class="form-control" type="text" name="name" value="" placeholder="[% loc('Your name') %]"> @@ -116,7 +121,7 @@ <div class="form-txt-submit-box"> <input class="form-control" 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') %]"> + <input class="green-btn" type="submit" name="sign_in_by_code" value="[% loc('Sign in') %]"> </div> </div> [% END %] diff --git a/templates/web/base/auth/generate_token.html b/templates/web/base/auth/generate_token.html new file mode 100644 index 000000000..157335047 --- /dev/null +++ b/templates/web/base/auth/generate_token.html @@ -0,0 +1,44 @@ +[% +INCLUDE 'header.html', title = loc('Generate token'), bodyclass = 'fullwidthpage' +%] + +[% IF token_generated %] + + <div class="confirmation-header"> + <h1>[% loc('Your token has been generated') %]</h1> + + <p> + <strong>[% loc('Token:') %]</strong> + <span>[% existing_token | html %]</span> + </p> + + <p><a href="/my">[% loc('Your account') %]</a></p> + </div> + +[% ELSE %] + +<h1>[% loc('Generate token') %]</h1> + +<form action="[% c.uri_for_action('/auth/profile/generate_token') %]" method="post" name="generate_token"> + <input type="hidden" name="token" value="[% csrf_token %]"> + + [% IF existing_token %] + <p> + <strong>[% loc('Current token:') %]</strong> + <span>[% existing_token | html %]</span> + </p> + [% END %] + + <p> + <input name="generate_token" type="submit" class="btn" value="[% existing_token ? loc('Replace token') : loc('Generate token') %]"> + </p> +</form> + +[% IF existing_token %] + <p> + [% loc('If you generate a new token the existing token will no longer work.') %] + </p> +[% END %] +[% END %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/base/auth/smsform.html b/templates/web/base/auth/smsform.html new file mode 100644 index 000000000..a475dd2f6 --- /dev/null +++ b/templates/web/base/auth/smsform.html @@ -0,0 +1,34 @@ +[% INCLUDE 'header.html', bodyclass = 'fullwidthpage', title = loc('Confirm account') %] + +[% IF token_not_found %] + + <div class="confirmation-header confirmation-header--failure"> + <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 %] + +[% DEFAULT submit_url = '/auth/phone' %] + + <div class="confirmation-header confirmation-header--phone"> + [% IF incorrect_code %] + <h1>[% loc('Sorry, that wasn’t the correct code') %]</h1> + <p>[% loc('Try again') %]:</p> + [% ELSE %] + <h1>[% loc("Nearly done! Now check your phone…") %]</h1> + <p>[% loc("We have sent a confirmation code to your phone. Please enter it below:") %]</p> + [% END %] + <form action="[% submit_url %]" method="post"> + <input type="hidden" name="token" value="[% token | html %]"> + <label for="code">[% loc('Code') %]</label> + <div class="form-txt-submit-box"> + <input class="form-control" type="number" id="code" name="code" value="" required> + <input type="submit" value="[% loc('Submit') %]" class="btn-primary"> + </div> + </form> + </div> + +[% END %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/base/common_footer_tags.html b/templates/web/base/common_footer_tags.html index 915751802..a5be06df5 100644 --- a/templates/web/base/common_footer_tags.html +++ b/templates/web/base/common_footer_tags.html @@ -5,8 +5,13 @@ <!--[if lte IE 9]> <script src="[% version('/vendor/history.polyfill.min.js') %]"></script> <![endif]--> -[% FOR script IN scripts ~%] - [% script = script.0 ? script : [ script ] ~%] +[% +scripts_seen = {}; +FOR script IN scripts; + script = script.0 ? script : [ script ]; + NEXT IF scripts_seen.${script.0}; + scripts_seen.${script.0} = 1; + ~%] <script src="[% script.0 %]" [%~ FOR attr IN script.1 %] [% attr.key %]="[% attr.value %]"[% END ~%] ></script> diff --git a/templates/web/base/common_header_tags.html b/templates/web/base/common_header_tags.html index e5a4d25f2..749a4f740 100644 --- a/templates/web/base/common_header_tags.html +++ b/templates/web/base/common_header_tags.html @@ -1,7 +1,5 @@ [% SET start = c.config.ADMIN_BASE_URL IF admin %] -<link rel="stylesheet" href="[% version('/vendor/OpenLayers/theme/default/style.css') %]"> - <meta http-equiv="content-type" content="text/html; charset=utf-8" id="js-meta-data" data-page="[% page %]" data-cobrand="[% c.cobrand.moniker %]"> @@ -19,10 +17,6 @@ (function(b){var a=b.documentElement;a.className=a.className.replace(/\bno-js\b/,"js");var c=-1<a.className.indexOf("iel8"),c=Modernizr.mq("(min-width: 48em)")||c?"desktop":"mobile";b=b.getElementById("js-meta-data");fixmystreet.page=b.getAttribute("data-page");fixmystreet.cobrand=b.getAttribute("data-cobrand");"mobile"==c&&(a.className+=" mobile","around"==fixmystreet.page&&(a.className+=" map-fullscreen only-map map-reporting"))})(document); </script> -[% IF admin %] - <link rel="stylesheet" href="[% version('/vendor/jquery-ui/css/smoothness/jquery-ui-1.10.3.custom.min.css') %]"> -[% END %] - [% IF robots %] <meta name="robots" content="[% robots %]"> [% ELSIF c.config.STAGING_SITE %] @@ -35,3 +29,21 @@ [% "$title :: " | html IF title %] [% site_name -%] </title> + +[% IF bodyclass.match('frontpage') %] + <link rel="prefetch" href="[% version('/js/validation_rules.js') %]"> + [%~ IF NOT c.user_exists OR NOT (c.user.from_body OR c.user.is_superuser) %] + <link rel="prefetch" href="[% version('/jslib/jquery-1.7.2.min.js') %]"> + [%~ END %] + <link rel="prefetch" href="[% version('/vendor/jquery.multi-select.min.js') %]"> + <link rel="prefetch" href="[% version('/vendor/jquery.validate.min.js') %]"> + <link rel="prefetch" href="[% version('/cobrands/fixmystreet/fixmystreet.js') %]"> +[% END %] +[% IF NOT bodyclass.match('mappage') %] + [% FOR script IN map_js %] + <link rel="prefetch" href="[% IF script.match('^/'); version(script); ELSE; script; END %]"> + [% END %] + <link rel="prefetch" href="[% version('/cobrands/fixmystreet/map.js') %]"> + <link rel="prefetch" href="[% version('/vendor/dropzone.min.js') %]"> + <link rel="prefetch" href="[% version('/vendor/fancybox/jquery.fancybox-1.3.4.pack.js') %]"> +[% END %] diff --git a/templates/web/base/common_scripts.html b/templates/web/base/common_scripts.html index 474edc46e..cf9692128 100644 --- a/templates/web/base/common_scripts.html +++ b/templates/web/base/common_scripts.html @@ -7,39 +7,67 @@ scripts = []; scripts.push( start _ "/js/translation_strings." _ lang_code _ ".js?" _ Math.int( date.now / 3600 ), - version('/jslib/jquery-1.7.2.min.js'), - version('/js/validation_rules.js'), - version('/vendor/jquery.validate.min.js'), - version('/vendor/dropzone.min.js'), - version('/js/jquery.multi-select.js'), - version('/vendor/geo.min.js'), - version('/cobrands/fixmystreet/fixmystreet.js'), ); -IF c.user_exists AND (c.user.from_body OR c.user.is_superuser); +IF bodyclass.match('frontpage'); scripts.push( - version('/cobrands/fixmystreet/staff.js') + version('/js/front.js'), + version('/js/geolocation.js'), + ); +ELSIF bodyclass.match('alertpage'); + scripts.push( + version('/js/geolocation.js'), + ); +ELSE; + scripts.push( + version('/js/validation_rules.js'), + version('/jslib/jquery-1.7.2.min.js'), + version('/vendor/jquery.multi-select.min.js'), + version('/vendor/jquery.validate.min.js'), + version('/cobrands/fixmystreet/fixmystreet.js'), ); END; -FOR script IN map_js; +FOR script IN extra_js; scripts.push(script); END; -scripts.push( - version('/cobrands/fixmystreet/map.js'), - version('/cobrands/fixmystreet/offline.js'), -); +IF c.user_exists AND (c.user.from_body OR c.user.is_superuser); + scripts.push( + version('/js/geolocation.js'), + version('/jslib/jquery-1.7.2.min.js'), + version('/cobrands/fixmystreet/staff.js') + ); + IF c.user.has_body_permission_to('planned_reports'); + scripts.push( + version('/cobrands/fixmystreet/offline.js'), + ); + END; +END; -IF admin; +IF bodyclass.match('mappage'); + FOR script IN map_js; + IF script.match('^/'); + scripts.push(version(script)); + ELSE; + scripts.push(script); + END; + END; scripts.push( - version('/vendor/jquery-ui/js/jquery-ui-1.10.3.custom.min.js'), - version('/cobrands/fixmystreet/admin.js'), + version('/cobrands/fixmystreet/map.js'), + version('/vendor/dropzone.min.js'), + version('/vendor/fancybox/jquery.fancybox-1.3.4.pack.js'), + ); +ELSE; + scripts.push( + version('/cobrands/fixmystreet/prefetch-polyfill.js'), ); END; -FOR script IN extra_js; - scripts.push(script); +IF admin; + scripts.push( + version('/cobrands/fixmystreet/admin.js'), + ); END; TRY; diff --git a/templates/web/base/dashboard/index.html b/templates/web/base/dashboard/index.html index e47798573..c6902556a 100644 --- a/templates/web/base/dashboard/index.html +++ b/templates/web/base/dashboard/index.html @@ -1,3 +1,5 @@ +[% USE Number.Format %] + [% extra_css = BLOCK %] <link rel="stylesheet" href="[% version('/cobrands/fixmystreet/dashboard.css') %]"> [% END %] @@ -11,160 +13,155 @@ <form> +[% IF body %] <hgroup> - [% tprintf(loc('<h2>Reports, Statistics and Actions for</h2> <h1>%s</h1>'), council.name) %] + [% tprintf(loc('<h2>Reports, Statistics and Actions for</h2> <h1>%s</h1>'), body_name) %] </hgroup> +[% ELSE %] +<h1>[% loc('Summary statistics') %]</h1> +[% END %] <div class="filters"> + [% IF body %] + <input type="hidden" name="body" value="[% body.id | html %]"> + [% IF NOT c.user.area_id %] <p> <label for="ward">[% loc('Ward:') %]</label> - <select class="form-control" name="ward"><option value=''>[% loc('All') %]</option> + <select class="form-control" name="ward" id="ward"><option value=''>[% loc('All') %]</option> [% FOR w IN children.values.sort('name') %] <option value="[% w.id %]"[% ' selected' IF w.id == ward %]>[% w.name %]</option> [% END %] </select> </p> + [% END %] <p> <label for="category">[% loc('Category:') %]</label> - <select class="form-control" name="category"><option value=''>[% loc('All') %]</option> - [% FOR cat_op IN category_options %] - <option value='[% cat_op.name | html %]'[% ' selected' IF category == cat_op.name %]>[% cat_op.value | html %]</option> + <select class="form-control" name="category" id="category"><option value=''>[% loc('All') %]</option> + [% FOR cat IN contacts %] + <option value='[% cat.category | html %]'[% ' selected' IF category == cat.category %]>[% cat.category_display | html %]</option> [% END %] </select> </p> + [% ELSE %] + <p> - <input type="submit" class="btn" value="[% loc('Look up') %]"> + <label for="ward">[% loc('Council:') %]</label> + <select class="form-control" name="body" id="body"><option value=''>[% loc('All') %]</option> + [% FOR b IN bodies %] + <option value="[% b.id %]">[% b.name %]</option> + [% END %] + </select> </p> - <br clear="all" /> -</div> - + [% END %] -<table width="100%" id="overview"> - <tr> - <th> </th> - <th scope="col"><abbr title="[% loc('Week To Date') %]">[% loc('WTD', "Week to date") %]</abbr></th> - <th scope="col">[% loc('Last 7 days') %]</th> - <th scope="col">[% loc('Last 4 weeks') %]</th> - <th scope="col">[% loc('YTD', "Year to date") %]</th> - </tr> - - [% - rows = { - '0' => [ "total", loc("Total reports received") ] - '1' => [ "fixed - council", loc("Council has marked as fixed") ] - '2' => [ "fixed_user", loc("User has marked as fixed") ] - }; - FOR row IN rows %] - <tr id="[% row.value.0.replace('[^\w]+', '_' ) %]"> - <th scope="row">[% row.value.1 %]</th> - <td>[% problems.wtd.${row.value.0} %]</td> - <td>[% problems.week.${row.value.0} %]</td> - <td>[% problems.weeks.${row.value.0} %]</td> - <td>[% problems.ytd.${row.value.0} %]</td> - </tr> - [% END %] - - <tr class='subtotal' id="total_fixed"> - <th scope="row">[% loc('Total marked as fixed') %]</th> - <td>[% problems.wtd.${"fixed - council"} + problems.wtd.fixed_user %]</td> - <td>[% problems.week.${"fixed - council"} + problems.week.fixed_user %]</td> - <td>[% problems.weeks.${"fixed - council"} + problems.weeks.fixed_user %]</td> - <td>[% problems.ytd.${"fixed - council"} + problems.ytd.fixed_user %]</td> - </tr> - - [% - rows = { - '0' => [ "in progress", loc("Council has marked as in progress") ] - '1' => [ "action scheduled", loc("Council has marked as planned") ] - '2' => [ "investigating", loc("Council has marked as investigating") ] - '3' => [ "closed", loc("Council has marked as closed") ] - }; - wtd = 0, week = 0, weeks = 0, ytd = 0; - FOR row IN rows %] - <tr id="[% row.value.0.replace('[^\w]+', '_' ) %]"> - <th scope="row">[% row.value.1 %]</th> - <td>[% problems.wtd.${row.value.0} %]</td> - <td>[% problems.week.${row.value.0} %]</td> - <td>[% problems.weeks.${row.value.0} %]</td> - <td>[% problems.ytd.${row.value.0} %]</td> - </tr> - [% END %] - - <tr class='subtotal' id="marked"> - <th scope="row">[% loc('Total marked') %]</th> - <td>[% problems.wtd.${"in progress"} + problems.wtd.${"action scheduled"} + - problems.wtd.investigating + problems.wtd.closed %]</td> - <td>[% problems.week.${"in progress"} + problems.week.${"action scheduled"} + - problems.week.investigating + problems.wtd.closed %]</td> - <td>[% problems.weeks.${"in progress"} + problems.weeks.${"action scheduled"} + - problems.weeks.investigating + problems.wtd.closed %]</td> - <td>[% problems.ytd.${"in progress"} + problems.ytd.${"action scheduled"} + - problems.ytd.investigating + problems.wtd.closed %]</td> - </tr> - - <tr id="avg_fixed"> - <th scope="row">[% loc('Average time to council marking fixed (days)') %]</th> - <td>[% problems.wtd.time_to_fix %]</td> - <td>[% problems.week.time_to_fix %]</td> - <td>[% problems.weeks.time_to_fix %]</td> - <td>[% problems.ytd.time_to_fix %]</td> - </tr> - - <tr id="avg_marked"> - <th scope="row">[% loc('Average time to first council state change (days)') %]</th> - <td>[% problems.wtd.time_to_mark %]</td> - <td>[% problems.week.time_to_mark %]</td> - <td>[% problems.weeks.time_to_mark %]</td> - <td>[% problems.ytd.time_to_mark %]</td> - </tr> + <p> + <label for="state">[% loc('Report state:') %]</label> + <select class="form-control" name="state" id="state"> + <option value=''>[% loc('All') %]</option> + [% FOR group IN filter_states %] + [% FOR state IN group.1 %] + [% NEXT IF state == 'hidden' %] + <option [% 'selected ' IF state == q_state %] value="[% state %]">[% prettify_state(state, 1) %]</option> + [% END %] + [% END %] + </select> + </p> + <p> + <label for="start_date">[% loc('Start Date') %]</label> + <input name="start_date" id="start_date" type="date" value="[% start_date | html %]" class="form-control"> + </p> + <p> + <label for="end_date">[% loc('End Date') %]</label> + <input name="end_date" id="end_date" type="date" value="[% end_date | html %]" class="form-control"> + </p> + <p class="no-label"> + <input type="submit" class="btn" value="[% loc('Look up') %]"> + </p> +</div> - <tr class='subtotal' id="not_marked"> - <th scope="row">[% loc('Total not marked') %]</th> - <td>[% problems.wtd.not_marked %]</td> - <td>[% problems.week.not_marked %]</td> - <td>[% problems.weeks.not_marked %]</td> - <td>[% problems.ytd.not_marked %]</td> - </tr> +<input type="hidden" name="group_by" value="[% group_by | html %]"> -</table> +</form> -<h2>[% loc('Reports') %]</h2> +[% BLOCK gb %] + [% IF group_by == new_gb %] + <strong title="[% tprintf(loc('Currently grouped by %s'), text) %]">[% text %]</strong> + [% ELSE %] + <a href="[% c.uri_with({ group_by => new_gb }) %]" title="[% tprintf(loc('Group by %s'), text) %]">[% text %]</a> + [% END %] +[% END %] - </select> -<p>[% loc('Report state:') %] <select class="form-control" name="state"> -<option value=''>[% loc('All') %]</option> - [% FOR group IN filter_states %] - [% FOR state IN group.1 %] - [% NEXT IF state == 'hidden' %] - <option [% 'selected ' IF state == q_state %] value="[% state %]">[% prettify_state(state, 1) %]</option> - [% END %] - [% END %] -</select> -<input type="submit" class="btn" value="[% loc('Look up') %]"> -<a class="export_as_csv" href="[% c.req.uri_with({ export => 1 }) %]">[% loc('Export as CSV') %]</a> +<ul class="dashboard-options-tabs"> + <li role="presentation"><span>[% loc('Group by:') %]</span><li> + <li>[% INCLUDE gb new_gb='category' text=loc('Category') %]</li> + <li>[% INCLUDE gb new_gb='state' text=loc('State') %]</li> + <li>[% INCLUDE gb new_gb='month' text=loc('Month') %]</li> + <li>[% INCLUDE gb new_gb='category+state' text=loc('Category and State') %]</li> + <li>[% INCLUDE gb new_gb='device+site' text=loc('Device and Site') %]</li> + <li class="pull-right"><a href="[% c.uri_with({ csv => 1 }) %]">[% loc('Export as CSV') %]</a></li> +</ul> -<table width="100%" id="reports"> +<table width="100%" id="overview"> <tr> - <th scope="col">[% loc('Less than 7 days old') %]</th> - <th scope="col">[% loc('7-14 days old') %]</th> - <th scope="col">[% loc('14-30 days old') %]</th> + <th></th> + [% IF group_by == 'category+state' %] + <th scope="col">[% loc('Open') %]</th> + <th scope="col">[% loc('Closed') %]</th> + <th scope="col">[% loc('Fixed') %]</th> + <th scope="col">[% loc('Total') %]</th> + [% ELSE %] + [% FOR k2 IN columns.sort %] + <th scope="col">[% k2 or loc('Website') %]</td> + [% END %] + <th scope="col">[% loc('Total') %]</th> + [% END %] </tr> + [% FOR k IN rows %] <tr> - <td width="34%"><ul>[% INCLUDE list, list = lists.1 %]</ul></td> - <td width="33%"><ul>[% INCLUDE list, list = lists.2 %]</ul></td> - <td width="33%"><ul>[% INCLUDE list, list = lists.3 %]</ul></td> + [% IF group_by == 'state' %] + <th scope="row">[% prettify_state(k) %]</th> + [% ELSE %] + <th scope="row">[% k %]</th> + [% END %] + [% IF group_by == 'category+state' %] + <td>[% grouped.$k.open OR 0 %]</td> + <td>[% grouped.$k.closed OR 0 %]</td> + <td>[% grouped.$k.fixed OR 0 %]</td> + <td>[% grouped.$k.total OR 0 %]</td> + [% ELSE %] + [% FOR k2 IN columns.sort %] + <td>[% grouped.$k.$k2 OR 0 %]</td> + [% END %] + <td>[% grouped.$k.total OR 0 %]</td> + [% END %] + </tr> + [% END %] + <tr class="subtotal"> + <th scope="row">[% loc('Total') %]</th> + [% IF group_by == 'category+state' %] + <td>[% totals.open OR 0 %]</td> + <td>[% totals.closed OR 0 %]</td> + <td>[% totals.fixed OR 0 %]</td> + [% ELSE %] + [% FOR k2 IN columns.sort %] + <td>[% totals.$k2 OR 0 %]</td> + [% END %] + [% END %] + <td>[% totals.total OR 0 %]</td> </tr> </table> -</form> +<p> +[% loc('Within the specified timeframe:') %] +[% +summary_open = summary_open | format_number; +summary_closed = summary_closed | format_number; +summary_fixed = summary_fixed | format_number; +tprintf( loc('%s opened, %s closed, %s fixed'), + decode(summary_open), decode(summary_closed), decode(summary_fixed) ) %] +</p> [% INCLUDE 'footer.html' %] - -[% BLOCK list %] -[% FOR p IN list %] -<li><a href="/report/[% p.id %]">[% p.title | html %]</a> <date>[% p.confirmed.dmy('/') %]</date></li> -[% END %] -[% END %] diff --git a/templates/web/base/front/javascript.html b/templates/web/base/front/javascript.html deleted file mode 100644 index 69eb626f7..000000000 --- a/templates/web/base/front/javascript.html +++ /dev/null @@ -1,12 +0,0 @@ -[% -# Assume using OpenStreetMap maps -map_js = [ - version('/vendor/yepnope.js'), - [ version('/cobrands/fixmystreet/front.js'), { - id = 'script_front', - 'data-scripts' = version('/vendor/OpenLayers/OpenLayers.fixmystreet.js') _ ',' _ - version('/js/map-OpenLayers.js') _ ',' _ - version('/js/map-OpenStreetMap.js') - } ], -] -%] diff --git a/templates/web/base/header.html b/templates/web/base/header.html index 4e537a7ec..3cc166a32 100644 --- a/templates/web/base/header.html +++ b/templates/web/base/header.html @@ -19,25 +19,16 @@ <meta name="mobileoptimized" content="0"> [% INCLUDE 'header_opengraph.html' %] - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.asset_moniker _ '/base.css') %]"> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.asset_moniker _ '/layout.css') %]" media="(min-width:48em)"> - [% extra_css %] - <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.asset_moniker _ '/layout.css') %]"> - <![endif]--> - + [% INCLUDE 'header/css.html' %] [% INCLUDE 'common_header_tags.html' %] - - [% IF c.req.uri.host == 'osm.fixmystreet.com' %] - <link rel="canonical" href="https://www.fixmystreet.com[% c.req.uri.path_query %]"> - [% END %] - [% TRY %][% PROCESS 'header_extra.html' %][% CATCH file %][% END %] </head> [% TRY %][% PROCESS 'set_body_class.html' %][% CATCH file %][% END %] <body class="[% bodyclass | html IF bodyclass %]"> + [% TRY %][% PROCESS 'before_wrapper.html' %][% CATCH file %][% END %] + <div class="wrapper"> <div class="table-cell"> [% INCLUDE 'header_site.html' %] diff --git a/templates/web/base/header/css.html b/templates/web/base/header/css.html new file mode 100644 index 000000000..219369465 --- /dev/null +++ b/templates/web/base/header/css.html @@ -0,0 +1,11 @@ +[% SET base_css = version('/cobrands/' _ c.cobrand.asset_moniker _ '/base.css') %] +[% SET layout_css = version('/cobrands/' _ c.cobrand.asset_moniker _ '/layout.css') %] + +<link rel="stylesheet" href="[% base_css %]"> +<link rel="stylesheet" href="[% layout_css %]" media="screen and (min-width:48em)"> +<!--[if (lt IE 9) & (!IEMobile)]> + <link rel="stylesheet" href="[% layout_css %]"> +<![endif]--> +<link rel="stylesheet" href="[% version('/vendor/OpenLayers/theme/default/style.css') %]"> + +[% extra_css %] diff --git a/templates/web/base/index.html b/templates/web/base/index.html index 8cb127e6a..620c1a2be 100644 --- a/templates/web/base/index.html +++ b/templates/web/base/index.html @@ -1,7 +1,6 @@ -[% PROCESS 'front/javascript.html' %] - [% pre_container_extra = PROCESS 'around/postcode_form.html' %] -[% INCLUDE 'header.html', title = '', bodyclass = 'frontpage fullwidthpage' %] +[% SET bodyclass = 'frontpage fullwidthpage' %] +[% INCLUDE 'header.html', title = '', inline_css = 1 %] [% IF error %] <p class="form-error">[% error %]</p> diff --git a/templates/web/base/js/translation_strings.html b/templates/web/base/js/translation_strings.html index bc2f013ff..ed95335a6 100644 --- a/templates/web/base/js/translation_strings.html +++ b/templates/web/base/js/translation_strings.html @@ -1,3 +1,4 @@ +[% FILTER collapse %] translation_strings = { update: '[% loc('Please enter a message') | replace("'", "\\'") %]', title: '[% loc('Please enter a subject') | replace("'", "\\'") %]', @@ -24,7 +25,6 @@ fms_extra_title: '[% loc('Please enter your title') | replace("'", "\\'") %]', first_name: '[% loc('Please enter your first name') | replace("'", "\\'") %]', last_name: '[% loc('Please enter your second name') | replace("'", "\\'") %]', - geolocate: '[% loc('or locate me automatically') | replace("'", "\\'") %]', right_place: '[% loc('Right place?') | replace("'", "\\'") %]', try_again: '[% loc('Try again') | replace("'", "\\'") %]', place_pin_on_map: '[% loc('Place pin on map') | replace("'", "\\'") %]', @@ -59,7 +59,11 @@ upload_cancel_confirmation: '[% loc ('Are you sure you want to cancel this upload?') | replace("'", "\\'") %]', upload_invalid_file_type: '[% loc ('Please upload an image only') | replace("'", "\\'") %]', + [% IF c.config.SMS_AUTHENTICATION ~%] + login_with_email: '[% loc('Log in with email/text') | replace("'", "\\'") %]', + [% ELSE ~%] login_with_email: '[% loc('Log in with email') | replace("'", "\\'") %]', + [% END ~%] offline: { your_reports: '[% loc('Your offline reports') | replace("'", "\\'") %]', @@ -77,3 +81,4 @@ update_plural: '[% loc('updates') | replace("'", "\\'") %]' } }; +[% END %] diff --git a/templates/web/base/main_nav.html b/templates/web/base/main_nav.html index b8a3165a4..9736697e3 100644 --- a/templates/web/base/main_nav.html +++ b/templates/web/base/main_nav.html @@ -8,7 +8,7 @@ %] [% BLOCK navitem ~%] <li [% liattrs %]> - [%~ IF c.req.uri.path == uri ~%] + [%~ IF c.req.uri.path == uri AND NOT always_url ~%] <span [% attrs %]>[% label %]</span> [%~ ELSE ~%] <a href="[% base %][% uri %][% suffix IF suffix %]" [% attrs %]>[% label %]</a> diff --git a/templates/web/base/main_nav_items.html b/templates/web/base/main_nav_items.html index 845ef7c65..84657444e 100644 --- a/templates/web/base/main_nav_items.html +++ b/templates/web/base/main_nav_items.html @@ -7,7 +7,7 @@ [%~ END ~%] [%~ IF c.user_exists AND c.user.has_body_permission_to('planned_reports') ~%] - [%~ INCLUDE navitem uri='/my/planned' label=loc('Shortlist') ~%] + [%~ INCLUDE navitem always_url=1 uri='/my/planned' label=loc('Shortlist') ~%] [%~ END ~%] diff --git a/templates/web/base/maps/bing.html b/templates/web/base/maps/bing.html deleted file mode 100644 index df45eced5..000000000 --- a/templates/web/base/maps/bing.html +++ /dev/null @@ -1,8 +0,0 @@ -[% -map_js = [ - version('/vendor/OpenLayers/OpenLayers.fixmystreet.js'), - version('/js/map-OpenLayers.js'), - version('/js/map-bing-ol.js'), -]; -map_html = INCLUDE maps/openlayers.html -%] diff --git a/templates/web/base/maps/fms.html b/templates/web/base/maps/fms.html index ff5b4eab6..286ecc8ff 100644 --- a/templates/web/base/maps/fms.html +++ b/templates/web/base/maps/fms.html @@ -1,9 +1,3 @@ [% -map_js = [ - version('/vendor/OpenLayers/OpenLayers.fixmystreet.js'), - version('/js/map-OpenLayers.js'), - version('/js/map-bing-ol.js'), - version('/js/map-fms.js'), -]; map_html = INCLUDE maps/openlayers.html include_key = 1 %] diff --git a/templates/web/base/maps/google-ol.html b/templates/web/base/maps/google-ol.html index d88043403..3cd21fab3 100644 --- a/templates/web/base/maps/google-ol.html +++ b/templates/web/base/maps/google-ol.html @@ -1,17 +1,3 @@ -[% -google_maps_url = "https://maps.googleapis.com/maps/api/js?v=3"; -IF c.config.GOOGLE_MAPS_API_KEY; - google_maps_url = google_maps_url _ "&key=" _ c.config.GOOGLE_MAPS_API_KEY; -END; - -map_js = [ - google_maps_url, - version('/vendor/OpenLayers/OpenLayers.google.js'), - version('/js/map-OpenLayers.js'), - version('/js/map-google-ol.js'), -] -%] - [% map_sub_links = BLOCK %] <a class="hidden-nojs" id="map_layer_toggle" href="">[% loc('Satellite') %]</a> [% END %] diff --git a/templates/web/base/maps/google.html b/templates/web/base/maps/google.html index c86c757fb..e8c07b113 100644 --- a/templates/web/base/maps/google.html +++ b/templates/web/base/maps/google.html @@ -6,19 +6,12 @@ color: #000; } </style> -[% -map_js = [ - "http://maps.googleapis.com/maps/api/js?sensor=false", - version('/js/map-google.js'), -] -%] [% map_html = BLOCK %] <script nonce="[% csp_nonce %]"> var fixmystreet = fixmystreet || {}; $.extend(fixmystreet, { 'area': [ [% map.area.join(',') %] ], - 'all_pins': '[% all_pins %]', 'latitude': [% map.latitude %], 'longitude': [% map.longitude %], [% IF map.any_zoom -%] diff --git a/templates/web/base/maps/mapquest-attribution.html b/templates/web/base/maps/mapquest-attribution.html deleted file mode 100644 index 43d6106a5..000000000 --- a/templates/web/base/maps/mapquest-attribution.html +++ /dev/null @@ -1,8 +0,0 @@ -[% -map_js = [ - version('/vendor/OpenLayers/OpenLayers.fixmystreet.js'), - version('/js/map-OpenLayers.js'), - version('/js/map-OpenStreetMap.js'), -]; -map_html = INCLUDE maps/openlayers.html -%] diff --git a/templates/web/base/maps/openlayers.html b/templates/web/base/maps/openlayers.html index 8f8d527e2..12ae88c05 100644 --- a/templates/web/base/maps/openlayers.html +++ b/templates/web/base/maps/openlayers.html @@ -9,7 +9,6 @@ [%- UNLESS c.cobrand.call_hook('hide_areas_on_reports') %] data-area="[% map.area.join(',') %]" [%- END %] - data-all_pins='[% all_pins %]' data-latitude=[% map.latitude %] data-longitude=[% map.longitude %] [% IF map.any_zoom -%] @@ -36,6 +35,4 @@ [% IF map.copyright %] <div class="olControlAttribution" style="position: absolute;">[% map.copyright %]</div> [% END %] - <div id="loading-indicator" class="hidden" aria-hidden="true"> - <img src="/i/loading.svg" alt="Loading..." /> - </div> + <img id="loading-indicator" class="hidden" aria-hidden="true" src="/i/loading.svg" alt="Loading..."> diff --git a/templates/web/base/maps/osm-streetview.html b/templates/web/base/maps/osm-streetview.html deleted file mode 100644 index f68f53039..000000000 --- a/templates/web/base/maps/osm-streetview.html +++ /dev/null @@ -1,8 +0,0 @@ -[% -map_js = [ - version('/vendor/OpenLayers/OpenLayers.fixmystreet.js'), - version('/js/map-OpenLayers.js'), - version('/js/map-streetview.js'), -]; -map_html = INCLUDE maps/openlayers.html -%] diff --git a/templates/web/base/maps/osm-toner-lite.html b/templates/web/base/maps/osm-toner-lite.html deleted file mode 100644 index 22b6636c5..000000000 --- a/templates/web/base/maps/osm-toner-lite.html +++ /dev/null @@ -1,9 +0,0 @@ -[% -map_js = [ - version('/vendor/OpenLayers/OpenLayers.fixmystreet.js'), - "https://stamen-maps.a.ssl.fastly.net/js/tile.stamen.js?v1.3.0", - version('/js/map-OpenLayers.js'), - version('/js/map-toner-lite.js'), -]; -map_html = INCLUDE maps/openlayers.html -%] diff --git a/templates/web/base/maps/osm.html b/templates/web/base/maps/osm.html index 43d6106a5..51c3ad388 100644 --- a/templates/web/base/maps/osm.html +++ b/templates/web/base/maps/osm.html @@ -1,8 +1,3 @@ [% -map_js = [ - version('/vendor/OpenLayers/OpenLayers.fixmystreet.js'), - version('/js/map-OpenLayers.js'), - version('/js/map-OpenStreetMap.js'), -]; map_html = INCLUDE maps/openlayers.html %] diff --git a/templates/web/base/my/my.html b/templates/web/base/my/my.html index 1aaad6dc9..e10dd96c8 100644 --- a/templates/web/base/my/my.html +++ b/templates/web/base/my/my.html @@ -17,11 +17,53 @@ <h1>[% loc('Your account') %]</h1> -<p>[% c.user.name %] [% c.user.email %]</p> +[% IF flash_message %] +<p class="form-success">[% flash_message %]</p> +[% END %] + +<style> +/* TODO XXX */ +li .my-account-buttons { + float: right; + margin: 0; +} +li .my-account-buttons a { + padding: 0 0.5em; +} +</style> +<ul> +<li>[% loc('Name:') %] [% c.user.name %] +<li>[% loc('Email:') %] [% c.user.email OR '-' %] + <p class="my-account-buttons"> + [% IF NOT c.user.email %] + <a href="/auth/change_email">[% loc('Add') %]</a> + [% ELSIF c.user.email_verified %] + <a href="/auth/change_email">[% loc('Change') %]</a> + [% ELSE %] + <a href="/auth/verify/email">[% loc('Verify') %]</a> + <a href="/auth/change_email">[% loc('Change') %]</a> + [% END %] + </p> +<li>[% loc('Phone:') %] [% c.user.phone_display OR '-' %] + <p class="my-account-buttons"> + [% IF NOT c.user.phone %] + <a href="/auth/change_phone">[% loc('Add') %]</a> + [% ELSIF c.user.phone_verified %] + <a href="/auth/change_phone">[% loc('Change') %]</a> + [% ELSE %] + [% IF c.config.SMS_AUTHENTICATION %] + <a href="/auth/verify/phone">[% loc('Verify') %]</a> + [% END %] + <a href="/auth/change_phone">[% loc('Change') %]</a> + [% END %] + </p> +</ul> <p class="my-account-buttons"> <a href="/auth/change_password">[% loc('Change password') %]</a> - <a href="/auth/change_email">[% loc('Change email') %]</a> + [% IF c.user AND (c.user.from_body OR c.user.is_superuser) %] + <a href="/auth/generate_token">[% loc('Generate token') %]</a> + [% END %] <a href="/auth/sign_out">[% loc('Sign out') %]</a> </p> diff --git a/templates/web/base/pagination.html b/templates/web/base/pagination.html index a677b9d58..7c13ec9cb 100644 --- a/templates/web/base/pagination.html +++ b/templates/web/base/pagination.html @@ -1,5 +1,5 @@ [% IF pager.total_entries > 1 %] - <p class="pagination"> + <p class="pagination" data-page="[% pager.current_page %]"> [% IF pager.previous_page %] <a class="prev" href="[% c.uri_with({ $param => pager.previous_page, ajax => undefined }) %][% '#' _ hash IF hash %]">[% loc('Previous') %]</a> [% END %] diff --git a/templates/web/base/report/_inspect.html b/templates/web/base/report/_inspect.html index 436c89e4a..5088332ce 100644 --- a/templates/web/base/report/_inspect.html +++ b/templates/web/base/report/_inspect.html @@ -6,7 +6,7 @@ [% INCLUDE 'errors.html' %] - <form id="report_inspect_form" method="post" action="[% c.uri_for( '/report', problem.id ) %]" class="validate"> + <form name="report_inspect_form" id="report_inspect_form" method="post" action="[% c.uri_for( '/report', problem.id ) %]" class="validate"> <input type="hidden" name="js" value=""> <div class="inspect-section"> @@ -34,11 +34,17 @@ <input type="hidden" name="longitude" value="[% problem.longitude %]"> <input type="hidden" name="latitude" value="[% problem.latitude %]"> </p> + [% IF problem.nearest_address() %] + <p> + <strong>[% loc('Nearest calculated address:') %]</strong> + [% problem.nearest_address() %] + </p> + [% END %] <p> <a target="_blank" href="https://www.google.com/maps/dir/Current+Location/[% problem.latitude %],[% problem.longitude %]" class="btn btn--block btn--navigate">[% loc('Navigate to this problem') %]</a> </p> <p> - <a href="#" class="btn btn--block btn--geolocate" id="geolocate_link">[% loc('Set to my current location') %]</a> + <a href="#" class="btn btn--block btn--geolocate">[% loc('Set to my current location') %]</a> </p> </div> @@ -141,8 +147,9 @@ </select> </p> <p> - <label for="detailed_information">[% loc('Extra details') %]</label> - <textarea rows="2" name="detailed_information" id="detailed_information" class="form-control">[% problem.get_extra_metadata('detailed_information') | html %]</textarea> + <label for="detailed_information">[% loc('Extra details') %]</label> <span id="detailed_information_length"></span> + <textarea rows="2" name="detailed_information" id="detailed_information" class="form-control" + [% IF max_detailed_info_length %]data-max-length="[% max_detailed_info_length %]" placeholder="[% tprintf(loc('%d characters maximum'), max_detailed_info_length) %]"[% END %]>[% problem.get_extra_metadata('detailed_information') | html %]</textarea> </p> [% END %] diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html index 9449ca55d..8179139ca 100644 --- a/templates/web/base/report/_item.html +++ b/templates/web/base/report/_item.html @@ -2,7 +2,7 @@ [% PROCESS 'admin/report_blocks.html' ~%] [% END ~%] -[% IF c.user.has_permission_to('planned_reports', problem.bodies_str_ids) ~%] +[% IF c.user.has_permission_to('planned_reports', problem.bodies_str_ids) OR c.user.is_planned_report(problem) ~%] [% item_extra_class = "item-list__item--indented" ~%] [% item_action = BLOCK ~%] <input type="submit" value="1" @@ -121,13 +121,18 @@ </a> -[% IF item_action AND page != 'around' %] +[% IF item_action ~%] + [% IF page == 'report' ~%] + [%# We don't want to output shortlist on report page (in duplicate list) %] + [% ELSIF page == 'around' ~%] + [%# The around page list is already contained within the new report form %] + [% item_action.replace('("shortlist-[^"]*)', '$1-' _ problem.id) %] + [% ELSE ~%] <form method="post" action="/my/planned/change"> <input type="hidden" name="id" value="[% problem.id %]"> <input type="hidden" name="token" value="[% csrf_token %]"> [% item_action %] </form> -[% ELSIF item_action ~%] - [% item_action.replace('("shortlist-[^"]*)', '$1-' _ problem.id) %] -[% END ~%] + [% END ~%] +[% END %] </li> diff --git a/templates/web/base/report/_main.html b/templates/web/base/report/_main.html index 405cb2118..25bbd4c33 100644 --- a/templates/web/base/report/_main.html +++ b/templates/web/base/report/_main.html @@ -1,13 +1,9 @@ -[% IF c.user_exists %] - [% DEFAULT permissions = c.user.permissions(c, problem.bodies_str) %] -[%- END %] - <a href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]" class="problem-back js-back-to-report-list">[% loc('Back to all reports') %]</a> <div class="problem-header clearfix" data-lastupdate="[% problem.lastupdate %]"> -[% IF c.user.has_permission_to('planned_reports', problem.bodies_str_ids) %] +[% IF permissions.planned_reports %] <form method="post" action="/my/planned/change" id="planned_form" class="hidden-label-target"> <input type="hidden" name="id" value="[% problem.id %]"> <input type="hidden" name="token" value="[% csrf_token %]"> @@ -124,16 +120,12 @@ </form> [% END %] - [% IF - (permissions.moderate) - OR - (c.user.has_permission_to('planned_reports', problem.bodies_str_ids)) - %] + [% IF permissions.moderate OR permissions.planned_reports %] <div class="moderate-display segmented-control" role="menu"> [% IF permissions.moderate %] <a class="js-moderate btn" role="menuitem" aria-label="[% loc('Moderate this report') %]">[% loc('Moderate') %]</a> [% END %] - [% IF c.user.has_permission_to('planned_reports', problem.bodies_str_ids) %] + [% IF permissions.planned_reports %] [%~ IF c.user.is_planned_report(problem) ~%] <label class="btn btn--shortlisted" for="shortlist-report" role="menuitem" aria-label="[% loc('Remove from shortlist') %]">[% loc('Shortlisted') %]</label> [%~ ELSE ~%] diff --git a/templates/web/base/report/display.html b/templates/web/base/report/display.html index 7c26c4938..f9c42b35d 100644 --- a/templates/web/base/report/display.html +++ b/templates/web/base/report/display.html @@ -39,6 +39,9 @@ [% END %] [% INCLUDE 'report/banner.html' %] +[% IF c.user_exists %] + [% DEFAULT permissions = c.user.permissions(c, problem.bodies_str) %] +[%- END %] [% INCLUDE 'report/_main.html' %] [% IF problem.duplicate_of %] @@ -50,11 +53,18 @@ [% TRY %][% INCLUDE 'report/sharing.html' %][% CATCH file %][% END %] [% INCLUDE 'report/updates.html' %] +[% IF two_column_sidebar %] +<button class="btn btn--provide-update js-provide-update hidden-nojs">[% loc('Provide an update') %]</button> +<div class="hidden-js"> +[% END %] [% IF problem.duplicate_of %] [% INCLUDE 'report/duplicate-no-updates.html' %] [% ELSIF NOT shown_form %] [% INCLUDE 'report/update-form.html' %] [% END %] +[% IF two_column_sidebar %] +</div> +[% END %] </div> diff --git a/templates/web/base/report/display_tools.html b/templates/web/base/report/display_tools.html index c477fd8dd..bb76cc388 100644 --- a/templates/web/base/report/display_tools.html +++ b/templates/web/base/report/display_tools.html @@ -3,7 +3,7 @@ [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_body( problem.bodies_str ) %] <li><form method="post" action="/report/delete/[% problem.id %]" id="remove-from-site-form"> <input type="hidden" name="token" value="[% csrf_token %]"> - <input type="submit" id="key-tool-report-abuse" class="abuse btn" data-confirm="[% loc('Are you sure?') %]" name="remove_from_site" value="[% loc('Remove from site') %]"> + <button type="submit" id="key-tool-report-abuse" class="abuse" data-confirm="[% loc('Are you sure?') %]" name="remove_from_site">[% loc('Remove from site') %]</button> </form></li> [% ELSIF c.cobrand.moniker != 'zurich' %] <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% diff --git a/templates/web/base/report/duplicate-no-updates.html b/templates/web/base/report/duplicate-no-updates.html index c8020a107..7de2ae042 100644 --- a/templates/web/base/report/duplicate-no-updates.html +++ b/templates/web/base/report/duplicate-no-updates.html @@ -1,5 +1,7 @@ <div> - [% UNLESS hide_header %]<h2 class="update-form-heading">[% loc( 'Provide an update') %]</h2>[% END %] + [% UNLESS hide_header %] + <h2[% IF two_column_sidebar %] class="hidden-js"[% END %]>[% loc('Provide an update') %]</h2> + [% END %] <p>[% loc("This report is a duplicate. Please leave updates on the original report:") %]</p> <ul class="item-list"> [% INCLUDE 'report/_item.html' item_extra_class = 'item-list__item--with-pin item-list--reports__item--selected' problem = problem.duplicate_of %] diff --git a/templates/web/base/report/new/category.html b/templates/web/base/report/new/category.html index b8ebf1653..94d5479a6 100644 --- a/templates/web/base/report/new/category.html +++ b/templates/web/base/report/new/category.html @@ -1,15 +1,38 @@ -[% IF category_options.size ~%] +[% IF category_options.size OR category_groups.size ~%] + [%~ BLOCK category_option ~%] + [% cat_op_lc = cat_op.name | lower =%] + <option value='[% cat_op.name | html %]'[% ' selected' IF report.category == cat_op.name || category_lc == cat_op_lc || (category_options.size == 2 AND loop.last) ~%] + >[% IF loop.first %][% cat_op.value %][% ELSE %][% cat_op.value | html %][% END %]</option> + [%~ END ~%] + [% IF category; category_lc = category | lower; END; ~%] <label for='form_category' id="form_category_label"> [%~ loc('Category') ~%] </label>[% =%] - <select class="form-control" name='category' id='form_category' data-role='[% c.user.has_body_permission_to('planned_reports') ? 'inspector' : 'user' %]' data-body='[% c.user.from_body.name %]'> - [%~ FOREACH cat_op IN category_options ~%] - [% cat_op_lc = cat_op.name | lower =%] - <option value='[% cat_op.name | html %]'[% ' selected' IF report.category == cat_op.name || category_lc == cat_op_lc || (category_options.size == 2 AND loop.last) ~%] - >[% IF loop.first %][% cat_op.value %][% ELSE %][% cat_op.value | html %][% END %]</option> - [%~ END =%] + <select class="form-control[% IF category_groups.size %] js-grouped-select[% END %]" name="category" id="form_category" + [%~ IF c.user.from_body =%] + data-role="[% c.user.has_body_permission_to('planned_reports') ? 'inspector' : 'user' %]" data-body="[% c.user.from_body.name %]" data-prefill="[% c.cobrand.prefill_report_fields_for_inspector %]" + [%~ END ~%] + > + [%~ IF category_groups.size ~%] + [%~ FOREACH group IN category_groups ~%] + [% IF group.name %]<optgroup label="[% group.name %]">[% END %] + [%~ FOREACH cat_op IN group.categories ~%] + [% INCLUDE category_option %] + [%~ END ~%] + [% IF group.name %]</optgroup>[% END %] + [%~ END =%] + [%~ ELSE ~%] + [%~ FOREACH cat_op IN category_options ~%] + [% INCLUDE category_option %] + [%~ END =%] + [%~ END ~%] </select> + [%~ IF category_groups.size ~%] + <label id="form_subcategory_label" class="hidden"> + [%~ loc('Subcategory') ~%] + </label> + [%~ END ~%] [%~ END ~%] diff --git a/templates/web/base/report/new/category_wrapper.html b/templates/web/base/report/new/category_wrapper.html index 291f5e923..abc44d062 100644 --- a/templates/web/base/report/new/category_wrapper.html +++ b/templates/web/base/report/new/category_wrapper.html @@ -1,7 +1,11 @@ <div id="form_category_row"> [% IF js %] <label for="form_category">[% loc('Category') %]</label> - <select class="form-control" name="category" id="form_category" data-role="[% c.user.has_body_permission_to('planned_reports') ? 'inspector' : 'user' %]" data-body="[% c.user.from_body.name %]" required><option>[% loc('Loading...') %]</option></select> + <select class="form-control" name="category" id="form_category" + [%~ IF c.user.from_body =%] + data-role="[% c.user.has_body_permission_to('planned_reports') ? 'inspector' : 'user' %]" data-body="[% c.user.from_body.name %]" data-prefill="[% c.cobrand.prefill_report_fields_for_inspector %]" + [%~ END =%] + required><option>[% loc('Loading...') %]</option></select> [% ELSE %] [% IF category_options.size %] [% IF field_errors.category %] diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html index e841845bf..bd4ce1cf7 100644 --- a/templates/web/base/report/new/form_user_loggedin.html +++ b/templates/web/base/report/new/form_user_loggedin.html @@ -29,12 +29,19 @@ </select> [% END %] - <label for="form_email">[% loc('Email address') %]</label> - <input class="form-control" id="form_email" name="email" +[% IF c.user.phone_verified %] + <label for="form_phone">[% loc('Phone number') %]</label> + <input class="form-control" id="form_phone" name="phone" disabled type="text" value="[% c.user.phone | html %]"> +[% END %] + +[% IF c.user.email_verified %] + <label for="form_username">[% loc('Email address') %]</label> + <input class="form-control" id="form_username" name="username" [%- IF NOT can_contribute_as_another_user -%] disabled [%- END -%] type="text" value="[% c.user.email | html %]"> +[% END %] [% INCLUDE 'report/new/extra_name.html' %] [% PROCESS 'user/_anonymity.html' anonymous = report.anonymous %] @@ -56,8 +63,14 @@ <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %] </label> </div> +[% IF NOT c.user.phone_verified %] <label for="form_phone">[% loc('Phone number (optional)') %]</label> <input class="form-control" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone"> +[% END %] +[% IF NOT c.user.email_verified %] + <label for="form_username">[% loc('Email address (optional)') %]</label> + <input class="form-control" type="text" value="[% report.user.email | html %]" name="email" id="form_email"> +[% END %] <div class="form-txt-submit-box"> <input class="green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Submit') %]"> diff --git a/templates/web/base/report/new/form_user_loggedout.html b/templates/web/base/report/new/form_user_loggedout.html index 4142f4582..d7bbbf588 100644 --- a/templates/web/base/report/new/form_user_loggedout.html +++ b/templates/web/base/report/new/form_user_loggedout.html @@ -1,4 +1,4 @@ -[% IF c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY %] +[% IF c.cobrand.social_auth_enabled %] [% IF c.config.FACEBOOK_APP_ID %] <div class="form-box"> <button name="facebook_sign_in" id="facebook_sign_in" value="facebook_sign_in" class="btn btn--block btn--social btn--facebook"> @@ -27,6 +27,6 @@ [% PROCESS 'report/new/form_user_loggedout_by_email.html' %] </div> -[% IF c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY %] +[% IF c.cobrand.social_auth_enabled %] </div> [% END %] diff --git a/templates/web/base/report/new/form_user_loggedout_by_email.html b/templates/web/base/report/new/form_user_loggedout_by_email.html index 409fd4bbf..e9519f573 100644 --- a/templates/web/base/report/new/form_user_loggedout_by_email.html +++ b/templates/web/base/report/new/form_user_loggedout_by_email.html @@ -1,5 +1,9 @@ <div id="form_sign_in_no" class="form-box"> + [% IF c.config.SMS_AUTHENTICATION %] + <h5>[% loc('<strong>No</strong> Let me confirm my report by email/text') %]</h5> + [% ELSE %] <h5>[% loc('<strong>No</strong> Let me confirm my report by email') %]</h5> + [% END %] [% INCLUDE 'report/new/extra_name.html' %] [% PROCESS 'user/_anonymity.html' anonymous = report.anonymous %] @@ -22,8 +26,14 @@ <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label> </div> - <label class="form-focus-hidden" for="form_phone">[% loc('Phone number (optional)') %]</label> - <input class="form-control form-focus-hidden" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]"> + <div id="js-hide-if-username-phone"> + <label class="form-focus-hidden" for="form_phone">[% loc('Phone number (optional)') %]</label> + <input class="form-control form-focus-hidden" type="text" value="[% report.user.phone_display | html %]" name="phone" id="form_phone"> + </div> + <div id="js-hide-if-username-email"> + <label class="form-focus-hidden" for="form_email">[% loc('Email address (optional)') %]</label> + <input class="form-control form-focus-hidden" type="text" value="[% report.user.email | html %]" name="email" id="form_email"> + </div> <label class="form-focus-hidden" for="password_register">[% loc('Password (optional)') %]</label> diff --git a/templates/web/base/report/new/form_user_loggedout_email.html b/templates/web/base/report/new/form_user_loggedout_email.html index 39e9fd779..734eb6f35 100644 --- a/templates/web/base/report/new/form_user_loggedout_email.html +++ b/templates/web/base/report/new/form_user_loggedout_email.html @@ -1,7 +1,17 @@ -<label for="form_email">[% loc('Your email') %]</label> -[% IF field_errors.email %] - <p class='form-error'>[% field_errors.email %]</p> +[% IF c.config.SMS_AUTHENTICATION %] + [% SET username_label = loc('Your email or mobile') %] + [% SET username_type = 'text' %] + [% SET username_value = report.user.username %] +[% ELSE %] + [% SET username_label = loc('Your email') %] + [% SET username_type = 'email' %] + [% SET username_value = report.user.email %] [% END %] -<input class="form-control" type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" + +<label for="form_username">[% username_label %]</label> +[% IF field_errors.username %] + <p class='form-error'>[% field_errors.username %]</p> +[% END %] +<input type="[% username_type %]" value="[% username_value | html %]" name="username" id="form_username" [% IF required %]required[% END %] - class="required"> + class="form-control required"> diff --git a/templates/web/base/report/photo-js.html b/templates/web/base/report/photo-js.html index 8c8c91669..6f3dd55d1 100644 --- a/templates/web/base/report/photo-js.html +++ b/templates/web/base/report/photo-js.html @@ -1,6 +1,3 @@ [% extra_css = BLOCK %] <link rel="stylesheet" href="[% version('/vendor/fancybox/jquery.fancybox-1.3.4.css') %]"> [% END %] -[% extra_js = [ - version('/vendor/fancybox/jquery.fancybox-1.3.4.pack.js') -] %] diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html index ea7b14970..912aae2b4 100644 --- a/templates/web/base/report/update-form.html +++ b/templates/web/base/report/update-form.html @@ -3,7 +3,7 @@ <div id="update_form"> [% IF NOT login_success AND NOT oauth_need_email %] - <h2 class="update-form-heading">[% loc( 'Provide an update') %]</h2> + <h2[% IF two_column_sidebar %] class="hidden-js"[% END %]>[% loc( 'Provide an update') %]</h2> [% IF c.cobrand.moniker != 'stevenage' %] <div class="general-notes"> diff --git a/templates/web/base/report/update.html b/templates/web/base/report/update.html index 85624669a..6dca226fe 100644 --- a/templates/web/base/report/update.html +++ b/templates/web/base/report/update.html @@ -1,12 +1,10 @@ -[% moderating = c.user && c.user.has_permission_to('moderate', problem.bodies_str_ids) %] - [% IF loop.first %] <section class="full-width"> <h4 class="static-with-rule">[% loc('Updates') %]</h4> <ul class="item-list item-list--updates"> [% END %] <li class="item-list__item item-list__item--updates"> - [% IF moderating; original_update = update.moderation_original_data %] + [% IF permissions.moderate; original_update = update.moderation_original_data %] <form method="post" action="/moderate/report/[% problem.id %]/update/[% update.id %]"> <input type="hidden" name="token" value="[% csrf_token %]"> <input type="button" class="btn js-moderate moderate-display" value="[% loc('Moderate this update') %]"> @@ -33,7 +31,7 @@ <div class="moderate-display"> [% update.text | add_links | markup(update.user) | html_para %] </div> - [% IF moderating %] + [% IF permissions.moderate %] <div class="moderate-edit"> [% IF update.text != original.detail %] <label><input type="checkbox" name="update_revert_detail" class="revert-textarea"> @@ -43,10 +41,15 @@ </div> [% END %] - [% SET update_state = update.problem_state_display(c) %] - [% IF update_state AND update_state != global.last_state AND NOT (global.last_state == "" AND update.problem_state == 'confirmed') %] - <p class="meta-2">[% loc('State changed to:') %] [% update_state %]</p> + [% # Small chance of duplicates in the case of fixed - user followed by fixed - council %] + [% SET update_state = update.problem_state %] + [% IF ( update_state AND update_state != global.last_state AND NOT (global.last_state == "" AND update.problem_state == 'confirmed') ) OR + update.mark_fixed OR update.mark_open + %] + <p class="meta-2">[% loc('State changed to:') %] [% update.problem_state_display(c) %]</p> [%- global.last_state = update_state %] + [%- IF update_state == "" AND update.mark_fixed %][% global.last_state = 'fixed - user' %][% END %] + [%- IF update_state == "" AND update.mark_open %][% global.last_state = 'confirmed' %][% END %] [% END %] <p class="meta-2"> @@ -61,7 +64,7 @@ </div> [% END %] </div> - [% IF moderating %] + [% IF permissions.moderate %] <div class="moderate-edit"> <label for="moderation_reason">[% loc('Moderation reason:') %]</label> <input type="text" class="form-control" name="moderation_reason" diff --git a/templates/web/base/report/update/form_name.html b/templates/web/base/report/update/form_name.html index e4f7ac60c..f366895a5 100644 --- a/templates/web/base/report/update/form_name.html +++ b/templates/web/base/report/update/form_name.html @@ -20,8 +20,8 @@ <option value="body">[% c.user.from_body.name %]</option> [% END %] </select> - <label for="form_email">[% loc('Email address') %]</label> - <input class="form-control" name="rznvy" id="form_email" type="text" value="[% c.user.email | html %]"> + <label for="form_username">[% loc('Email address') %]</label> + <input class="form-control" name="username" id="form_username" type="text" value="[% c.user.email | html %]"> [% END %] <label for="form_name">[% loc('Name') %]</label> diff --git a/templates/web/base/report/update/form_user_loggedout.html b/templates/web/base/report/update/form_user_loggedout.html index d9f67e06e..19295b94c 100644 --- a/templates/web/base/report/update/form_user_loggedout.html +++ b/templates/web/base/report/update/form_user_loggedout.html @@ -1,4 +1,4 @@ -[% IF c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY %] +[% IF c.cobrand.social_auth_enabled %] <h3>[% loc("Now to submit your update…") %]</h3> [% IF c.config.FACEBOOK_APP_ID %] <div class="form-box"> @@ -29,6 +29,6 @@ [% INCLUDE 'report/update/form_user_loggedout_by_email.html' %] </div> -[% IF c.config.FACEBOOK_APP_ID OR c.config.TWITTER_KEY %] +[% IF c.cobrand.social_auth_enabled %] </div> [% END %] diff --git a/templates/web/base/report/update/form_user_loggedout_by_email.html b/templates/web/base/report/update/form_user_loggedout_by_email.html index 04a842bef..7d10fe391 100644 --- a/templates/web/base/report/update/form_user_loggedout_by_email.html +++ b/templates/web/base/report/update/form_user_loggedout_by_email.html @@ -1,5 +1,9 @@ <div id="form_sign_in_no" class="form-box"> + [% IF c.config.SMS_AUTHENTICATION %] + <h5>[% loc('<strong>No</strong> Let me confirm my update by email/text') %]</h5> + [% ELSE %] <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5> + [% END %] [% INCLUDE 'report/update/form_name.html' %] diff --git a/templates/web/base/report/update/form_user_loggedout_email.html b/templates/web/base/report/update/form_user_loggedout_email.html index ccea2de02..f4228969b 100644 --- a/templates/web/base/report/update/form_user_loggedout_email.html +++ b/templates/web/base/report/update/form_user_loggedout_email.html @@ -1,7 +1,17 @@ -<label for="form_rznvy">[% loc('Your email' ) %]</label> -[% IF field_errors.email %] - <p class='form-error'>[% field_errors.email %]</p> +[% IF c.config.SMS_AUTHENTICATION %] + [% SET username_label = loc('Your email or mobile') %] + [% SET username_type = 'text' %] + [% SET username_value = update.user.username %] +[% ELSE %] + [% SET username_label = loc('Your email') %] + [% SET username_type = 'email' %] + [% SET username_value = update.user.email %] [% END %] -<input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" + +<label for="form_username">[% username_label %]</label> +[% IF field_errors.username %] + <p class='form-error'>[% field_errors.username %]</p> +[% END %] +<input type="[% username_type %]" name="username" id="form_username" value="[% username_value | html %]" [% IF required %]required[% END %] class="form-control required"> diff --git a/templates/web/base/report/updates.html b/templates/web/base/report/updates.html index 75e94b1d5..e8a2d4bd3 100644 --- a/templates/web/base/report/updates.html +++ b/templates/web/base/report/updates.html @@ -1,5 +1,11 @@ [% global.last_state = '' %] [% FOREACH update IN updates %] +[%- IF global.last_state == 'hidden' OR global.last_state == 'unconfirmed' OR update.problem_state == 'hidden' OR update.problem_state == 'unconfirmed' %] + [%- IF update.problem_state != '' %] + [%- global.last_state = update.problem_state %] + [%- END %] + [%- NEXT %] +[%- END %] [% INCLUDE 'report/update.html' %] [% END %] diff --git a/templates/web/base/reports/_list-filters.html b/templates/web/base/reports/_list-filters.html index 50e88857d..ab8ac06f7 100644 --- a/templates/web/base/reports/_list-filters.html +++ b/templates/web/base/reports/_list-filters.html @@ -1,10 +1,18 @@ [% select_status = BLOCK %] <select class="form-control js-multiple" name="status" id="statuses" multiple - data-all="[% loc('All') %]" data-all-options='["open","closed","fixed"]' - [%~ IF c.cobrand.on_map_default_status == 'open' %] - data-none="[% loc('Unfixed reports') %]" + data-all="[% loc('All') %]" + [% IF c.user_exists AND c.user.is_superuser OR c.user.belongs_to_body(body.id) %] + [% options = []; FOR group IN filter_states; FOR state IN group.1; NEXT IF state == 'hidden'; options.push(state); END; END %] + data-all-options='["[% options.join('", "') %]"]' + [%~ ELSE ~%] + [%~ IF has_fixed_state ~%] + data-all-options='["open","closed","fixed"]' + [%~ ELSE ~%] + data-all-options='["open","closed"]' + [%~ END ~%] [%~ END ~%] - > + [% INCLUDE 'reports/_status_filter_options.html' %] + > [% IF c.user_exists AND c.user.has_body_permission_to('planned_reports') AND !shortlist %] <option value="shortlisted"[% ' selected' IF filter_status.shortlisted %]>[% loc('Shortlisted') %]</option> <option value="unshortlisted"[% ' selected' IF filter_status.unshortlisted %]>[% loc('Unshortlisted') %]</option> diff --git a/templates/web/base/reports/_rss.html b/templates/web/base/reports/_rss.html index f2d164bfa..fdb833315 100644 --- a/templates/web/base/reports/_rss.html +++ b/templates/web/base/reports/_rss.html @@ -1,5 +1,5 @@ <div class="shadow-wrap"> - <ul id="key-tools"[% IF NOT children.size %] class="singleton"[% END %]> + <ul id="key-tools"> <li><a rel="nofollow" id="key-tool-updates-area" class="feed" href="[% rss_url %]">[% IF c.cobrand.moniker == 'bromley' AND thing == 'council'; 'Get updates of reports in Bromley'; diff --git a/templates/web/base/reports/_status_filter_options.html b/templates/web/base/reports/_status_filter_options.html new file mode 100644 index 000000000..b761222e0 --- /dev/null +++ b/templates/web/base/reports/_status_filter_options.html @@ -0,0 +1,3 @@ + [%~ IF c.cobrand.on_map_default_status == 'open' %] + data-none="[% prettify_state('confirmed') %]" + [%~ END ~%] diff --git a/templates/web/base/reports/body.html b/templates/web/base/reports/body.html index b6e6df73b..7931ae691 100755 --- a/templates/web/base/reports/body.html +++ b/templates/web/base/reports/body.html @@ -42,7 +42,12 @@ [% ward.name %] </h1> <a href="[% body_url %]">[% body.name %]</a> - [% ELSE %] + [% ELSIF wards %] + <h1 id="reports_heading"> + [% FOREACH w IN wards %][% w.name %][% IF NOT loop.last %], [% END %][% END %] + </h1> + <a href="[% body_url %]">[% body.name %]</a> + [% ELSE %] <h1 id="reports_heading"> [% body.name %] </h1> diff --git a/templates/web/base/reports/index.html b/templates/web/base/reports/index.html index a653a2686..70f4b3929 100755 --- a/templates/web/base/reports/index.html +++ b/templates/web/base/reports/index.html @@ -15,7 +15,9 @@ [% INCLUDE 'header.html', title = loc('Dashboard'), bodyclass => 'dashboard fullwidthpage' %] <div class="dashboard-header"> - <h1>[% loc('Dashboard') %]</h1> + <h1>[% loc('Dashboard') %] + [% IF body %] – [% body.name %] [% END %] + </h1> </div> <div class="dashboard-row"> @@ -58,19 +60,31 @@ </div> </div> <div class="dashboard-item dashboard-item--6"> - <form class="dashboard-search" action="/reports"> + <form class="dashboard-search"> <h2>[% loc('Show reports in your area') %]</h2> + [% IF body %] + <label for="ward">[% loc('Pick your ward') %]</label> + <div class="dashboard-search__input"> + <select id="ward" name="ward" class="js-autocomplete"> + <option value="">[% loc('Pick your ward') %]</option> + [% FOR child IN children.values.sort('name') %] + <option>[% child.name | html ~%]</option> + [% END %] + </select> + </div> + [% ELSE %] <label for="body">[% loc('Pick your council') %]</label> <div class="dashboard-search__input"> <select id="body" name="body" class="js-autocomplete"> <option value="">[% loc('Pick your council') %]</option> - [% FOR body IN bodies %] - <option value="[% body.id %]">[% body.name | html ~%] - [% IF NOT body.get_column("area_count") %] [% loc('(no longer exists)') %][% END ~%] + [% FOR b IN bodies # Not body as 'body' may be on stash %] + <option value="[% b.id %]">[% b.name | html ~%] + [% IF NOT b.get_column("area_count") %] [% loc('(no longer exists)') %][% END ~%] </option> [% END %] </select> </div> + [% END %] <div class="dashboard-search__submit"> <input type="submit" value="[% loc('Go') %]"> </div> @@ -80,6 +94,20 @@ <div class="dashboard-row"> <div class="dashboard-item dashboard-item--6"> + [% IF body %] + <h2 class="dashboard-subheading">[% loc('Top 5 wards') %]</h2> + <p>[% loc('Number of problems reported in each ward, in the last 7 days.') %]</p> + <table class="dashboard-ranking-table"> + <tbody> + [% FOR line IN wards %] + <tr><td>[% line.name %]</td><td>[% tprintf(nget("%s report", "%s reports", line.reports), line.reports) %]</td></tr> + [% END %] + </tbody> + <tfoot> + <tr><td>[% loc('Other wards') %]</td><td>[% tprintf(nget("%s report", "%s reports", other_wards), other_wards) %]</td></tr> + </tfoot> + </table> + [% ELSE %] <h2 class="dashboard-subheading">[% loc('Top 5 responsive councils') %]</h2> <p>[% loc('Average time between a problem being reported and being fixed, last 100 reports.') %]</p> <table class="dashboard-ranking-table"> @@ -92,6 +120,7 @@ <tr><td>[% loc('Overall average') %]</td><td>[% tprintf(nget("%s day", "%s days", average), average) %]</td></tr> </tfoot> </table> + [% END %] </div> <div class="dashboard-item dashboard-item--6"> <h2 class="dashboard-subheading">[% loc('Top 5 most used categories') %]</h2> diff --git a/templates/web/borsetshire/around/postcode_form.html b/templates/web/borsetshire/around/postcode_form.html index bb4accf26..4ad82dec6 100644 --- a/templates/web/borsetshire/around/postcode_form.html +++ b/templates/web/borsetshire/around/postcode_form.html @@ -1,3 +1,12 @@ +[% UNLESS c.user_exists %] +<div class="homepage-login-hint"> + <div class="container"> + <h2>Psssst… Want to see behind the curtain?</h2> + <p>Try out FixMyStreet as a customer service rep, a highways inspector, or a site administrator. <a href="/auth">Sign in</a> to begin!</p> + </div> +</div> +[% END %] + <div id="front-main"> <div id="front-main-container"> [% INCLUDE 'around/intro.html' %] diff --git a/templates/web/borsetshire/auth/_general_top.html b/templates/web/borsetshire/auth/_general_top.html index 6e65bf90b..0af3737e8 100644 --- a/templates/web/borsetshire/auth/_general_top.html +++ b/templates/web/borsetshire/auth/_general_top.html @@ -1,28 +1,23 @@ -<p>The following users exist, all with password <kbd>password</kbd> -(click them to quickly log in):</p> -<style> -#demo-user-list dt { - padding: 0 0.5em; -} -#demo-user-list dd { - color: #666; - font-size: 87.5%; - padding: 0 0.5em; -} -.js #demo-user-list dt:hover { - background-color: #faebac; - cursor: pointer; -} -</style> +<p> +Click on one of the buttons below to log in as one of the four +different types of user we’ve set up on this demo site: +</p> -<dl id='demo-user-list'> - <dt>inspector@example.org</dt> - <dd>an inspector, who can shortlist and inspect reports.</dd> - <dt>cs@example.org</dt> - <dd>a customer service rep, who can create reports as the council or another user, and moderate reports.</dd> - <dt>super@example.org</dt> - <dd>a council super user, who can do all the above, plus also edit users, templates, priorities, and more.</dd> - <dt>user@example.org</dt> - <dd>a normal user, who has created the example reports on the site.</dd> -</dl> +<ul id='demo-user-list' class="clearfix"> + <li> +<button class="btn" data-email="user@example.org">Normal user</button> +<span>A local resident who has created reports and updates on the site.</span> + <li> +<button class="btn" data-email="cs@example.org">Customer service</button> +<span>A customer service staff member, who can create and moderate existing reports.</span> + <li> +<button class="btn" data-email="inspector@example.org">Inspector</button> +<span>An inspector staff member, who can inspect reports and create shortlists.</span> + <li> +<button class="btn" data-email="super@example.org">Super user</button> +<span>A superuser staff member, who can do all the above, plus also edit users, templates, and priorities in the Admin screen.</span> +</ul> +<p> +Or sign in as normal, with an email address and password: +</p> diff --git a/templates/web/borsetshire/front/footer-marketing.html b/templates/web/borsetshire/front/footer-marketing.html new file mode 100644 index 000000000..78b4fa89b --- /dev/null +++ b/templates/web/borsetshire/front/footer-marketing.html @@ -0,0 +1,6 @@ +<div class="fms-pro-promo"> + <h2>FixMyStreet Professional</h2> + <p class="lead">The one-stop street reporting service for councils.</p> + <p>Integrate FixMyStreet with your council system for smooth, end-to-end report fullfilment.</p> + <p><a href="/about/professional" class="btn--borsetshire">Learn more</a></p> +</div> diff --git a/templates/web/bristol/footer_extra_js.html b/templates/web/bristol/footer_extra_js.html index 2f54083a0..218607498 100644 --- a/templates/web/bristol/footer_extra_js.html +++ b/templates/web/bristol/footer_extra_js.html @@ -1,6 +1,4 @@ [% scripts.push( version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js') version('/cobrands/fixmystreet-uk-councils/js.js'), - version('/cobrands/fixmystreet/assets.js'), - version('/cobrands/bristol/js.js'), ) %] diff --git a/templates/web/bristol/maps/bristol.html b/templates/web/bristol/maps/bristol.html index f13ea4d32..1dcc82635 100644 --- a/templates/web/bristol/maps/bristol.html +++ b/templates/web/bristol/maps/bristol.html @@ -1,12 +1,3 @@ -[% -map_js = [ - version('/vendor/OpenLayers/OpenLayers.bristol.js'), - version('/js/map-OpenLayers.js'), - version('/js/map-wmts-base.js'), - version('/js/map-wmts-bristol.js'), -] -%] - [% map_html = BLOCK %] [% INCLUDE maps/openlayers.html %] [% INCLUDE maps/wmts_config.html %] diff --git a/templates/web/bromley/footer_extra_js.html b/templates/web/bromley/footer_extra_js.html index ac03496a8..0b69cf5ad 100644 --- a/templates/web/bromley/footer_extra_js.html +++ b/templates/web/bromley/footer_extra_js.html @@ -1,3 +1,4 @@ [% scripts.push( + version('/jslib/jquery-1.7.2.min.js'), version('/cobrands/bromley/a-z-nav.js'), ) %] diff --git a/templates/web/bromley/maps/bromley.html b/templates/web/bromley/maps/bromley.html deleted file mode 100644 index 71a150f5a..000000000 --- a/templates/web/bromley/maps/bromley.html +++ /dev/null @@ -1,10 +0,0 @@ -[% -map_js = [ - version('/vendor/OpenLayers/OpenLayers.fixmystreet.js'), - version('/js/map-OpenLayers.js'), - version('/js/map-bing-ol.js'), - version('/js/map-fms.js'), - version('/cobrands/bromley/map.js'), -]; -map_html = INCLUDE maps/openlayers.html include_key = 1 -%] diff --git a/templates/web/bromley/report/display.html b/templates/web/bromley/report/display.html deleted file mode 100644 index 4c1a69bca..000000000 --- a/templates/web/bromley/report/display.html +++ /dev/null @@ -1,67 +0,0 @@ -[% - PROCESS "report/photo-js.html"; - PROCESS "maps/${map.type}.html"; - - problem_title = problem.title_safe _ ' - ' _ loc('Viewing a problem'); - INCLUDE 'header.html' - title = problem_title - rss = [ loc('Updates to this problem, FixMyStreet'), "/rss/$problem.id" ] - robots = 'index, nofollow' - bodyclass = 'mappage' -%] - -[% map_html %] -</div> - -<div id="map_sidebar"> - -[% IF login_success %] - <p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p> -[% END %] - -[% INCLUDE 'report/banner.html' %] -[% INCLUDE 'report/_main.html' %] - -[% IF problem.duplicate_of %] - [% INCLUDE 'report/duplicate-no-updates.html' hide_header = 1 %] -[% END %] - -[% INCLUDE 'report/display_tools.html' %] -[% INCLUDE 'report/updates.html' %] - -[% IF problem.duplicate_of %] - [% INCLUDE 'report/duplicate-no-updates.html' %] -[% ELSE %] - [% INCLUDE 'report/update-form.html' %] -[% END %] -</div> - -[% INCLUDE 'footer.html' %] - -[% BLOCK name %] - [% INCLUDE 'report/new/extra_name.html' %] - - [% IF c.user_exists %] - [% names = c.user.split_name %] - [% END %] - <label for="form_first_name">[% loc('First Name') %]</label> - [% IF field_errors.first_name %] - <p class='form-error'>[% field_errors.first_name %]</p> - [% END %] - <input class="js-form-name form-control" type="text" value="[% names.first || first_name | html %]" name="first_name" id="form_first_name" placeholder="[% loc('Your first name') %]"> - - <label for="form_last_name">[% loc('Last Name') %]</label> - [% IF field_errors.last_name %] - <p class='form-error'>[% field_errors.last_name %]</p> - [% END %] - <input class="js-form-name form-control" type="text" value="[% names.last || last_name | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]"> - - <div class="checkbox-group"> - <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF update AND NOT update.anonymous %]> - <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label> - </div> - <div class="checkbox-group"> - <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]> - <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label> - </div> -[% END %] diff --git a/templates/web/bromley/report/new/form_user.html b/templates/web/bromley/report/new/form_user.html index 634e18c10..e6749f5ab 100644 --- a/templates/web/bromley/report/new/form_user.html +++ b/templates/web/bromley/report/new/form_user.html @@ -50,11 +50,11 @@ </div> [% ELSE %] - <label for="form_email">[% loc('Your email') %]</label> - [% IF field_errors.email %] - <p class='form-error'>[% field_errors.email %]</p> + <label for="form_username">[% loc('Your email') %]</label> + [% IF field_errors.username %] + <p class='form-error'>[% field_errors.username %]</p> [% END %] - <input class="form-control" type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" required> + <input class="form-control" type="email" value="[% report.user.email | html %]" name="username" id="form_username" placeholder="[% loc('Please enter your email address') %]" required> <div id="form_sign_in"> diff --git a/templates/web/bromley/report/update-form.html b/templates/web/bromley/report/update-form.html index e71e27528..45d7aed5e 100644 --- a/templates/web/bromley/report/update-form.html +++ b/templates/web/bromley/report/update-form.html @@ -1,5 +1,7 @@ <div id="update_form"> - <h2 class="update-form-heading">[% loc( 'Provide an update') %]</h2> + [% UNLESS hide_header %] + <h2[% IF two_column_sidebar %] class="hidden-js"[% END %]>[% loc('Provide an update') %]</h2> + [% END %] [% INCLUDE 'errors.html' %] @@ -71,21 +73,21 @@ [% IF c.user_exists %] - [% INCLUDE name %] + [% INCLUDE 'report/update/form_name.html' %] <input class="final-submit green-btn js-submit_register" type="submit" name="submit_register" value="[% loc('Post') %]"> [% ELSE %] - <label for="form_rznvy">[% loc('Email' ) %] + <label for="form_username">[% loc('Email' ) %] <span class="muted">([% loc('We never show your email') %])</span> </label> - [% IF field_errors.email %] - <p class='form-error'>[% field_errors.email %]</p> + [% IF field_errors.username %] + <p class='form-error'>[% field_errors.username %]</p> [% END %] - <input class="form-control" type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required> + <input class="form-control" type="email" name="username" id="form_username" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required> <div id="form_sign_in"> <p>To submit your update you now need to confirm it either by email or by using a FixMyStreet password.</p> @@ -93,7 +95,7 @@ <div id="form_sign_in_no" class="form-box"> <h5>Confirm my report by email</h5> - [% INCLUDE name %] + [% INCLUDE 'report/update/form_name.html' %] <label for="password_register">[% loc('Password (optional)') %]</label> diff --git a/templates/web/bromley/report/update/form_name.html b/templates/web/bromley/report/update/form_name.html new file mode 100644 index 000000000..a33d144bd --- /dev/null +++ b/templates/web/bromley/report/update/form_name.html @@ -0,0 +1,29 @@ +[% INCLUDE 'report/new/extra_name.html' %] + +[% PROCESS 'user/_anonymity.html' anonymous = update.anonymous %] + +[% IF c.user_exists %] + [% names = c.user.split_name %] +[% END %] + +<label for="form_first_name">[% loc('First Name') %]</label> +[% IF field_errors.first_name %] + <p class='form-error'>[% field_errors.first_name %]</p> +[% END %] +<input class="js-form-name form-control" type="text" value="[% names.first || first_name | html %]" name="first_name" id="form_first_name" placeholder="[% loc('Your first name') %]"> + +<label for="form_last_name">[% loc('Last Name') %]</label> +[% IF field_errors.last_name %] + <p class='form-error'>[% field_errors.last_name %]</p> +[% END %] +<input class="js-form-name form-control" type="text" value="[% names.last || last_name | html %]" name="last_name" id="form_last_name" placeholder="[% loc('Your last name') %]"> + +<div class="checkbox-group"> + <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF name_public %]> + <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label> +</div> + +<div class="checkbox-group"> + <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]> + <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label> +</div> diff --git a/templates/web/fiksgatami/header.html b/templates/web/fiksgatami/header.html index 17765948f..7c73f6060 100644 --- a/templates/web/fiksgatami/header.html +++ b/templates/web/fiksgatami/header.html @@ -11,14 +11,7 @@ <meta name="mobileoptimized" content="0"> [% INCLUDE 'header_opengraph.html' %] - - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/base.css') %]"> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]" media="(min-width:48em)"> - [% extra_css %] - <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]"> - <![endif]--> - + [% INCLUDE 'header/css.html' %] [% INCLUDE 'common_header_tags.html' %] [% TRY %][% PROCESS 'header_extra.html' %][% CATCH file %][% END %] diff --git a/templates/web/fixamingata/report/new/form_user_loggedout.html b/templates/web/fixamingata/report/new/form_user_loggedout.html index 24834454c..1f7cf2aeb 100644 --- a/templates/web/fixamingata/report/new/form_user_loggedout.html +++ b/templates/web/fixamingata/report/new/form_user_loggedout.html @@ -1,8 +1,8 @@ -<label for="form_email">[% loc('Your email') %]</label> -[% IF field_errors.email %] - <p class='form-error'>[% field_errors.email %]</p> +<label for="form_username">[% loc('Your email') %]</label> +[% IF field_errors.username %] + <p class='form-error'>[% field_errors.username %]</p> [% END %] -<input type="email" class="form-control" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" required> +<input type="email" class="form-control" value="[% report.user.email | html %]" name="username" id="form_username" placeholder="[% loc('Please enter your email address') %]" required> <div id="form_sign_in"> <h3>[% loc("Now to submit your report…") %]</h3> diff --git a/templates/web/fixmystreet.com/about/council-dashboard.html b/templates/web/fixmystreet.com/about/council-dashboard.html new file mode 100644 index 000000000..7acaee207 --- /dev/null +++ b/templates/web/fixmystreet.com/about/council-dashboard.html @@ -0,0 +1,60 @@ +[% extra_css = BLOCK %] + <link rel="stylesheet" href="[% version('/cobrands/fixmystreet.com/fmsforcouncils.css') %]"> + <link href="https://fonts.googleapis.com/css?family=Rubik:400,500" rel="stylesheet"> +[% END %] + +[% IF no_body_found %] + +[% INCLUDE header.html + title = 'FixMyStreet Professional', bodyclass = 'fullwidthpage' +%] + +<div class="confirmation-header confirmation-header--inbox"> + <h1>Thanks!</h1> + <p>We will be in touch with a confirmation link soon.</p> +</div> + +[% ELSE %] + +[% INCLUDE header.html + title = 'FixMyStreet Professional', bodyclass = 'fms-for-councils fullwidthpage' +%] + +<div class="fixed-container"> + <div class="council-header"> + <h1 class="councils-logo">FixMyStreet Professional</h1> + </div> + <div class="councils-hero"> + <div class="councils-hero__demo-access"> + <p>To access a council-specific version of our main dashboard page, + please provide your name and email below and we'll send you a link.</p> + <form method="post" class="councils-hero__demo-access__form"> + <div class="form-group"> + <label for="demo-name">Name</label> + <span class="required">required</span> + <input type="text" name="name" id="demo-name" required value="[% form_name | html %]"> + </div> + <div class="form-group"> + <label for="demo-email">Contact email</label> + <span class="required">required</span> + <input type="email" name="username" id="demo-email" required value="[% email | html %]"> + <p class="form-note">Ending in .gov.uk, or other official council domain</p> + </div> + <div class="form-group submit-group"> + <input type="hidden" name="r" value="about/council-dashboard"> + <input type="hidden" name="extra.referer" value="[% c.req.headers.referer | html %]"> + <input type="hidden" name="subject" value="Council dashboard request"> + <input type="hidden" name="message" value="Filled in the council dashboard form"> + <input type="hidden" name="recipient" value="bettercities"> + <input type="hidden" name="dest" value="from_council"> + <input type="submit" value="Let me in" class="btn"> + </div> + </form> + </div> + </div> + +</div> + +[% END %] + +[% INCLUDE footer.html %] diff --git a/templates/web/fixmystreet.com/about/professional.html b/templates/web/fixmystreet.com/about/professional.html deleted file mode 100644 index 0978d19bc..000000000 --- a/templates/web/fixmystreet.com/about/professional.html +++ /dev/null @@ -1,720 +0,0 @@ -[% extra_css = BLOCK %] - <link rel="stylesheet" href="[% version('/cobrands/fixmystreet.com/fmsforcouncils.css') %]"> - <link href="https://fonts.googleapis.com/css?family=Rubik:400,500" rel="stylesheet"> -[% END %] - -[% INCLUDE header.html - title = 'FixMyStreet Professional', bodyclass = 'fms-for-councils fullwidthpage' -%] - -<div class="fixed-container"> - <div class="council-header"> - <h1 class="councils-logo">FixMyStreet Professional</h1> - </div> - <div class="councils-hero"> - <div class="councils-hero__presentation"> - <div class="councils-content-wrapper"> - <h2 class="councils-hero__title">FixMyStreet Professional: street reporting service for councils</h2> - <img class="councils-hero__product" src="[% version('/cobrands/fixmystreet.com/images/fms-for-councils/device-mockup.png') %]" alt=""> - </div> - </div> - <div class="councils-hero__subtitle"> - <p class="councils-hero__subtitle__primary">Integrate FixMyStreet with any council system for smooth end-to-end report fulfilment</p> - <p class="councils-hero__subtitle__secondary">Residents, staff and contractors love FixMyStreet for its easy-use interfaces. - If you’re the budget-holder, you’ll love its sensible pricing, too.</p> - </div> - <div class="councils-hero__demo-access"> - <h2>Try FixMyStreet Professional right now, on our demo site</h2> - <form action="/contact/submit" method="post" class="councils-hero__demo-access__form js-fms-pro-demo-form"> - <div class="form-group"> - <label for="demo-name">Name</label> - <span class="required">required</span> - <input type="text" name="name" id="demo-name" required> - </div> - <div class="form-group"> - <label for="demo-email">Contact email</label> - <span class="required">required</span> - <input type="email" name="em" id="demo-email" required> - <p class="form-note">Ending in .gov.uk</p> - </div> - <div class="form-group"> - <label for="demo-phone">Contact phone number</label> - <input type="text" name="extra.phone" id="demo-phone"> - </div> - <div class="form-group"> - <label for="demo-job">Job title</label> - <input type="text" name="extra.job_title" id="demo-job"> - </div> - <div class="form-group submit-group"> - <input type="hidden" name="extra.referer" value="[% c.req.headers.referer | html %]"> - <input type="hidden" name="subject" value="Demo site request"> - <input type="hidden" name="message" value="This visitor was sent a link to demo.fixmystreet.com"> - <input type="hidden" name="recipient" value="bettercities"> - <input type="hidden" name="dest" value="from_council"> - <input type="hidden" name="success_url" value="https://demo.fixmystreet.com"> - <input type="submit" value="Let me in" class="btn"> - </div> - </form> - </div> - </div> - <div class="councils-sales councils-sales--benefits"> - <div class="councils-content-wrapper"> - <h2>Benefits</h2> - <div class="councils-sales__grid"> - <div class="councils-features__feature"> - <h3>Increase efficiency</h3> - <p>Route problems to the correct person, team, authority or contractor based on location, category and priority.</p> - </div> - <div class="councils-features__feature"> - <h3>Minimise duplication</h3> - <p>An open and transparent approach to local issue reporting that reduces incidents of repeat and duplicate reports.</p> - </div> - <div class="councils-features__feature"> - <h3>Streamline your process</h3> - <p>The first case-management service designed with councils, for councils. Streamline your process from customer service, through inspection to instruction and resolution.</p> - </div> - <div class="councils-features__feature"> - <h3>Stay flexible</h3> - <p>Open standards compliant for complete customer flexibility: support the landscape of service providers to further increase your reach.</p> - </div> - <div class="councils-features__feature"> - <h3>Work with your existing services</h3> - <p>Support for your existing mapping, asset, customer and case management services ensures that your solution works for your current processes and systems.</p> - </div> - <div class="councils-features__feature"> - <h3>Expand your reach</h3> - <p>Reports made within your boundaries are published to FixMyStreet.com’s one million visitors a year.</p> - </div> - </div> - </div> - </div> - - <div class="councils-pricing"> - <div class="councils-content-wrapper"> - <h2>Plans</h2> - <div class="councils-pricing__grid"> - - <table class="pricing-table"> - <caption class="visuallyhidden">Pricing and feature information for all FixMyStreet Pro tiers</caption> - <thead> - <tr> - <th scope="col" class="blank"> - <span class="visuallyhidden">Features</span> - </th> - <th scope="col"> - <span class="pricing-table__tier-name">Driveway</span> - </th> - <th scope="col"> - <span class="pricing-table__tier-name">Crescent</span> - </th> - <th scope="col"> - <span class="pricing-table__tier-name">Boulevard</span> - </th> - <th scope="col"> - <span class="pricing-table__tier-name">Avenue</span> - </th> - </tr> - </thead> - - <tbody> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - Define problem categories and email contacts - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - Dashboards - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">None</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - 1 customisable dashboard - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - Customisable dashboards for up to 3 teams - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - Customisable dashboards for up to 3 teams - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - FixMyStreet at your domain, with your branding - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - System integrations (eg: CONFIRM, Salesforce, Mayrise) - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">None</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">None</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - Up to 2 integrations - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - Up to 4 integrations - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - Inspector specific views - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">None</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">None</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">None</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - Moderate reports - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - De-duplicate reports - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - Customer services agents can report on customer’s behalf - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - Training - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - Training workshop for up to 12 staff - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - Training workshop for up to 40 staff - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - AddressBase integration - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - Roadworks.org planned works integration - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - Add asset locations - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - Offline functionality - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - Custom map tiles - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - Custom geocoder - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr> - <th scope="row"> - <span class="pricing-table__feature-name"> - Add adopted roads - </span> - </th> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--no">No</i> - </span> - </td> - <td> - <span class="pricing-table__feature-value"> - <i class="boolean-icon boolean-icon--yes">Yes</i> - </span> - </td> - </tr> - <tr class="pricing-table__prices"> - <td> - <span class="pricing-table__price">Price</span> - </td> - <td> - <span class="pricing-table__price">Free</span> - </td> - <td> - <span class="pricing-table__price">£7500</span> - </td> - <td> - <span class="pricing-table__price">£20000</span> - </td> - <td> - <span class="pricing-table__price">£35000</span> - </td> - </tr> - </tbody> - - </table> - - </div> - </div> - </div> - - <div class="councils-clients"> - <h2>Clients</h2> - <div class="councils-clients__grid"> - <div class="councils-clients__client"> - <a href="https://fixmystreet.bristol.gov.uk/"> - <img src="[% version('/cobrands/fixmystreet.com/images/fms-for-councils/bristol-logo.png') %]" alt="Bristol City Council"> - </a> - </div> - <div class="councils-clients__client"> - <a href="https://fix.angus.gov.uk/"> - <img src="[% version('/cobrands/fixmystreet.com/images/fms-for-councils/angus-logo.png') %]" alt="Angus Council"> - </a> - </div> - <div class="councils-clients__client"> - <a href="https://fixmystreet.oxfordshire.gov.uk/"> - <img src="[% version('/cobrands/fixmystreet.com/images/fms-for-councils/oxfordshire-logo.png') %]" alt="Oxfordshire County Council"> - </a> - </div> - <div class="councils-clients__client"> - <a href="https://hart.fixmystreet.com/"> - <img src="[% version('/cobrands/fixmystreet.com/images/fms-for-councils/hart-logo.png') %]" alt="Hart District Council"> - </a> - </div> - <div class="councils-clients__client"> - <a href="https://fix.bromley.gov.uk/"> - <img src="[% version('/cobrands/fixmystreet.com/images/fms-for-councils/bromley-logo.png') %]" alt="Bromley Council"> - </a> - </div> - <div class="councils-clients__client"> - <a href="https://www.zueriwieneu.ch/"> - <img src="[% version('/cobrands/fixmystreet.com/images/fms-for-councils/zurich-logo.png') %]" alt="Stadt Zürich"> - </a> - </div> - <div class="councils-clients__client"> - <a href="https://greenwich.fixmystreet.com/"> - <img src="[% version('/cobrands/fixmystreet.com/images/fms-for-councils/greenwich-logo.png') %]" alt="Royal Borough of Greenwich"> - </a> - </div> - </div> - </div> - - <div class="screenshot-of-themes"> - <div class="councils-content-wrapper"> - <img src="[% version('/cobrands/fixmystreet.com/images/fms-for-councils/screenshot-of-themes.jpg') %]" alt=""> - </div> - </div> - - <div class="councils-sales councils-sales--features"> - <div class="councils-content-wrapper"> - <h2>Features</h2> - <div class="councils-sales__grid"> - <div class="councils-features__feature"> - <div class="councils-features__screenshot"></div> - <h3>Map-centric problem reporting</h3> - <p>Handle any type of location-specific report within the nominated - county, borough or city; including geolocation and images. </p> - </div> - <div class="councils-features__feature"> - <div class="councils-features__screenshot"></div> - <h3>Mobile ready</h3> - <p>Companion mobile application for Android and iOS, so your customers - can report issues on the go and FixMyStreet is designed for optimal - display on desktop, tablet and mobile browsers.</p> - </div> - <div class="councils-features__feature"> - <div class="councils-features__screenshot"></div> - <h3>Our experience, your brand</h3> - <p>White-labelled product, branded to complement your existing services. - Extend your reach to over a million visitors on the nation’s most - popular local issues service, FixMyStreet.com.</p> - </div> - <div class="councils-features__feature"> - <div class="councils-features__screenshot"></div> - <h3>End-to-end case management</h3> - <p>A complete case management solution for customer services, - inspection and maintenance teams. Support for industry standard - mapping, asset, works and applications including Salesforce, Mayrise - and Confirm®.</p> - </div> - <div class="councils-features__feature"> - <div class="councils-features__screenshot"></div> - <h3>Inspection service</h3> - <p>Mobile optimised, offline capable planning, markup and instructing - service for your inspection teams.</p> - </div> - <div class="councils-features__feature"> - <div class="councils-features__screenshot"></div> - <h3>Customised reporting</h3> - <p>Supports category-specific report content and data, to help you - collect the details you need. Track service levels, highlight - bottlenecks and monitor contracts with area dashboards.</p> - </div> - </div> - </div> - </div> -<div class="council-order" id="order"> - <div class="councils-content-wrapper"> - <h2>Contact</h2> - <form action="/contact/submit" method="post"> - <div class="council-order__form"> - <div class="form-group"> - <p>Use any address ending in .gov.uk to verify that you are making contact from a council within the UK.</p> - <p>We’ll get right back to you to find out more about your needs.</p> - <p>If you are contacting FixMyStreet for any other reason, please see our <a href="/contact">main contact page</a>.</p> - </div> - <div class="form-group"> - <label for="name">Name</label> - <span class="required">required</span> - <input type="text" name="name" id="name" required> - </div> - <div class="form-group"> - <label for="email">Contact email</label> - <span class="required">required</span> - <input type="email" name="em" id="email" required> - <p class="form-note">Ending in .gov.uk</p> - </div> - <div class="form-group"> - <label for="extra.phone">Contact phone number</label> - <span class="required required--optional">optional</span> - <input type="text" name="extra.phone" id="extra.phone"> - </div> - <div class="form-group"> - <label for="email-newsletter" class="checkbox-label"> <input type="checkbox" name="extra.newsletter" value="Sign me up to the Better Cities newsletter" id="email-newsletter" class="checkbox-input"> Sign up for the Better Cities newsletter for news and insights on smarter technology for councils.</label> - </div> - <div class="form-group submit-group"> - <input type="hidden" name="extra.referer" value="[% c.req.headers.referer | html %]"> - <input type="hidden" name="subject" value="Councils submission"> - <input type="hidden" name="recipient" value="enquiries"> - <input type="hidden" name="dest" value="from_council"> - <input type="submit" value="Send"> - </div> - </div> - </form> - </div> - <div class="council-order__screenshot"> - </div> -</div> - - - - </div> - - -[% INCLUDE footer.html %] diff --git a/templates/web/fixmystreet.com/footer_extra_js.html b/templates/web/fixmystreet.com/footer_extra_js.html index d5ed1543d..cb1b78743 100644 --- a/templates/web/fixmystreet.com/footer_extra_js.html +++ b/templates/web/fixmystreet.com/footer_extra_js.html @@ -1,5 +1,16 @@ -[% scripts.push( - version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), - version('/cobrands/fixmystreet.com/vendor/jquery.cookie.min.js'), - version('/cobrands/fixmystreet.com/js.js'), -) %] +[% +IF bodyclass.match('mappage'); + scripts.push( + version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js'), + ); +END; +IF bodyclass.match('frontpage'); + scripts.push( + version('/cobrands/fixmystreet.com/front.js'), + ); +ELSIF NOT bodyclass.match('alertpage'); + scripts.push( + version('/cobrands/fixmystreet.com/js.js'), + ); +END; +%] diff --git a/templates/web/fixmystreet.com/front/javascript.html b/templates/web/fixmystreet.com/front/javascript.html deleted file mode 100644 index 4bf586b70..000000000 --- a/templates/web/fixmystreet.com/front/javascript.html +++ /dev/null @@ -1,12 +0,0 @@ -[% -map_js = [ - version('/vendor/yepnope.js'), - [ version('/cobrands/fixmystreet/front.js'), { - id = "script_front", - 'data-scripts' = version('/vendor/OpenLayers/OpenLayers.fixmystreet.js') _ ',' _ - version('/js/map-OpenLayers.js') _ ',' _ - version('/js/map-bing-ol.js') _ ',' _ - version('/js/map-fms.js') - } ], -] -%] diff --git a/templates/web/fixmystreet.com/header.html b/templates/web/fixmystreet.com/header.html new file mode 100644 index 000000000..6f01f4184 --- /dev/null +++ b/templates/web/fixmystreet.com/header.html @@ -0,0 +1,43 @@ +[% + SET html_att = ' lang="' _ lang_code _ '"'; + # For a right-to-left language, use the following line in your own header: + # SET html_att = html_att _ ' dir="rtl"'; +-%] +<!doctype html> +<!--[if IE 7]> <html class="no-js ie7 iel8"[% html_att %]><![endif]--> +<!--[if IE 8]> <html class="no-js ie8 iel8"[% html_att %]><![endif]--> +<!--[if IE 9]> <html class="no-js ie9"[% html_att %]><![endif]--> +<!--[if gt IE 9]><!--><html class="no-js"[% html_att %] +[% IF appcache ~%] + manifest="/offline/appcache.manifest" +[%~ END %]><!--<![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"> + + [% INCLUDE 'header_opengraph.html' %] + [% INCLUDE 'header/css.html' %] + [% INCLUDE 'common_header_tags.html' %] + [% TRY %][% PROCESS 'header_extra.html' %][% CATCH file %][% END %] + + </head> + [% TRY %][% PROCESS 'set_body_class.html' %][% CATCH file %][% END %] + <body class="[% bodyclass | html IF bodyclass %]"> + <div class="top_banner top_banner--donate"><p> + <strong>We’re hiring for an exciting new project.</strong> + <a href="https://mysociety.workable.com/">Come and join our friendly team</a>. + </p></div> + + <div class="wrapper"> + <div class="table-cell"> + [% INCLUDE 'header_site.html' %] + + [% pre_container_extra %] + + <div class="container"> + <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> + + <!-- [% INCLUDE 'debug_header.html' %] --> diff --git a/templates/web/fixmystreet.com/header/css.html b/templates/web/fixmystreet.com/header/css.html new file mode 100644 index 000000000..f0fe37200 --- /dev/null +++ b/templates/web/fixmystreet.com/header/css.html @@ -0,0 +1,33 @@ +[% SET base_css = version('/cobrands/' _ c.cobrand.asset_moniker _ '/base.css') %] +[% SET layout_css = version('/cobrands/' _ c.cobrand.asset_moniker _ '/layout.css') %] +[% SET ol_css = version('/vendor/OpenLayers/theme/default/style.css') %] + +[% TRY %][% critical = INSERT "header/critical.auto.min.css" %][% CATCH file %][% END %] + +[% IF inline_css AND critical %] +<style id="critical"> +[% critical %] +</style> + +<noscript><link rel="stylesheet" href="[% base_css %]"></noscript> +<link rel="prefetch" href="[% ol_css %]" as="style"> +<link id="preload_base_css" rel="preload" href="[% base_css %]" as="style"> +<script nonce="[% csp_nonce %]"> +/* If browser *does* support preload, use stylesheets when loaded */ +document.getElementById('preload_base_css').onload = function(){this.rel='stylesheet'}; +/*! loadCSS & rel=preload polyfill. [c]2017 Filament Group, Inc. MIT License */ +(function(a){var b=function(b,h,e){function c(a){if(f.body)return a();setTimeout(function(){c(a)})}function k(){d.addEventListener&&d.removeEventListener("load",k);d.media=e||"all"}var f=a.document,d=f.createElement("link");var p=f.styleSheets;d.rel="stylesheet";d.href=b;d.media="only x";c(function(){h.parentNode.insertBefore(d,h)});var l=function(a){for(var b=d.href,c=p.length;c--;)if(p[c].href=== +b)return a();setTimeout(function(){l(a)})};d.addEventListener&&d.addEventListener("load",k);l(k)};a.loadCSS=b})(this); +(function(a){var b={};b.support=function(){try{return a.document.createElement("link").relList.supports("preload")}catch(b){return!1}};b.poly=function(){for(var b=a.document.getElementsByTagName("link"),e=0;e<b.length;e++){var c=b[e];"preload"===c.rel&&"style"===c.getAttribute("as")&&(a.loadCSS(c.href,c,c.getAttribute("media")),c.rel=null)}};if(!b.support()){b.poly()}})(this); +</script> +<link rel="stylesheet" href="[% base_css %]" media="(min-width:48em)"> +[% ELSE %] +<link rel="stylesheet" href="[% ol_css %]"> +<link rel="stylesheet" href="[% base_css %]"> +[% END %] +<link rel="stylesheet" href="[% layout_css %]" media="screen and (min-width:48em)"> +<!--[if (lt IE 9) & (!IEMobile)]> + <link rel="stylesheet" href="[% layout_css %]"> +<![endif]--> + +[% extra_css %] diff --git a/templates/web/fixmystreet.com/header_extra.html b/templates/web/fixmystreet.com/header_extra.html index dc0f86693..74280a6f9 100644 --- a/templates/web/fixmystreet.com/header_extra.html +++ b/templates/web/fixmystreet.com/header_extra.html @@ -1,3 +1,15 @@ +[% IF NOT bodyclass.match('mappage') %] +<link rel="prefetch" href="[% version('/vendor/OpenLayers.Projection.OrdnanceSurvey.js') %]"> +[% END %] + +[% IF bodyclass.match('frontpage') %] +<link rel="prefetch" href="[% version('/cobrands/fixmystreet.com/js.js') %]"> +[% END %] + +[% IF c.req.uri.host == 'osm.fixmystreet.com' %] + <link rel="canonical" href="https://www.fixmystreet.com[% c.req.uri.path_query %]"> +[% END %] + <meta name='theme-color' content='#ffd000'> <link rel="Shortcut Icon" type="image/x-icon" href="/cobrands/fixmystreet.com/favicon.ico"> diff --git a/templates/web/fixmystreet.com/header_logo.html b/templates/web/fixmystreet.com/header_logo.html new file mode 100644 index 000000000..6985a7fa7 --- /dev/null +++ b/templates/web/fixmystreet.com/header_logo.html @@ -0,0 +1,8 @@ +<a href="[% c.cobrand.base_url IF admin %]/" id="site-logo" aria-label="Fix My Street">[% FILTER collapse %] + [% IF c.req.uri.path == '/' %] + [% INSERT site_logo_with_fallback.svg %] + [% ELSE %] + <span class="site-logo__fallback"></span> + [% END %] +[% END %]</a> +<a href="[% c.cobrand.base_url IF admin %]/" id="report-cta" title="[%- loc('Report a problem') -%]">[%- loc('Report') -%]</a> diff --git a/templates/web/fixmystreet.com/report/updates-sidebar-notes.html b/templates/web/fixmystreet.com/report/updates-sidebar-notes.html index 90e88d86c..17e3ade62 100644 --- a/templates/web/fixmystreet.com/report/updates-sidebar-notes.html +++ b/templates/web/fixmystreet.com/report/updates-sidebar-notes.html @@ -1,5 +1,5 @@ <p> - [% IF problem.send_method_used != 'Open311' OR NOT problem.to_body_named('Bromley|Stevenage') %] + [% IF NOT problem.send_method_used.match('Open311') OR NOT problem.to_body_named('Bromley|Stevenage') %] [% loc( 'Please note that updates are not sent to the council.' ) %] [% END %] [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %] diff --git a/templates/web/fixmystreet.com/reports/summary.html b/templates/web/fixmystreet.com/reports/summary.html new file mode 100644 index 000000000..8b7f84f59 --- /dev/null +++ b/templates/web/fixmystreet.com/reports/summary.html @@ -0,0 +1,174 @@ +[% USE Number.Format -%] +[% + other_categories_formatted = other_categories | format_number; +-%] +[% extra_js = [ + version('/vendor/chart.min.js'), + version('/js/dashboard.js') +] -%] +[% INCLUDE 'header.html', title = loc('Dashboard'), bodyclass => 'dashboard fullwidthpage' %] + +<div class="dashboard-header"> + <h1>FMS [% loc('Dashboard') %] + [% IF body %] – [% body.name %] [% END %] + </h1> +</div> + +<form method="GET"> + <div class="filters"> + <p> + <label for="ward">[% loc('Problems reported in area:') %]</label> + <select class="form-control" id="ward" name="ward"> + <option value="">[% body.name %]</option> + [% FOR w IN children.values.sort('name') %] + <option value="[% w.id %]"[% ' selected' IF w.id == ward %]>[% w.name %]</option> + [% END %] + </select> + </p> + <p class="pro-feature"> + <label for="category">[% loc('Category:') %]</label> + <select class="form-control" id="category" disabled> + <option>[% loc('All categories') %]</option> + </select> + </p> + <p class="pro-feature"> + <label for="state">[% loc('Report state:') %]</label> + <select class="form-control" id="state" disabled> + <option>[% loc('All states') %]</option> + </select> + </p> + <p> + <label for="period">[% loc('Reported:') %]</label> + <select class="form-control" id="period" name="period"> + <option value="week"[% ' selected' IF period == 'week' %]>This past week</option> + <option value="month"[% ' selected' IF period == 'month' %]>This past month</option> + <option value="3months"[% ' selected' IF period == '3months' %]>In the past 3 months</option> + <option value="year"[% ' selected' IF period == 'year' %]>This past year</option> + <option value="ever"[% ' selected' IF period == 'ever' %]>Any time</option> + <option disabled>Custom date range (Pro)</option> + </select> + </p> + <p class="no-label"> + <input type="submit" class="btn" value="[% loc('Look up') %]"> + </p> + </div> + <input type="hidden" name="group_by" value="[% group_by %]"> + + [% BLOCK gb %] + [% IF group_by == new_gb %] + <strong title="Currently grouped by [% text %]">[% text %]</strong> + [% ELSE %] + <a href="[% c.uri_with({ group_by => new_gb }) %]" title="Group by [% text %]">[% text %]</a> + [% END %] + [% END %] + + <div class="dashboard-row"> + <div class="dashboard-item dashboard-item--12"> + <table class="dashboard-ranking-table js-make-bar-chart"> + [% FOR k IN rows %] + <tr> + [% IF group_by == 'state' %] + <th scope="row">[% prettify_state(k) %]</th> + [% ELSE %] + <th scope="row">[% k or loc('Website') %]</th> + [% END %] + <td>[% grouped.$k.total OR 0 %]</td> + </tr> + [% END %] + </table> + + <ul class="dashboard-options-tabs dashboard-options-tabs--below"> + <li role="presentation"><span>[% loc('Group by:') %]</span><li> + <li>[% INCLUDE gb new_gb='category' text='category' %]</li> + <li>[% INCLUDE gb new_gb='device' text='device' %]</li> + <li>[% INCLUDE gb new_gb='state' text='state' %]</li> + <li class="pull-right"><a href="[% c.uri_with({ csv => 1 }) %]">[% loc('Export as CSV') %]</a></li> + </ul> + </div> + </div> + +</form> + +<div class="dashboard-row"> + <div class="dashboard-item dashboard-item--6"> + <h2 class="dashboard-subheading">[% tprintf( loc('How responsive is %s?'), body.name ) %]</h2> + <p>[% loc('Average time between a problem being reported and being fixed, last 100 reports.') %]</p> + <table class="dashboard-ranking-table"> + <tbody> + [% FOR line IN top_five_bodies %] + <tr><td>[% line.name %]</td><td>[% tprintf(nget("%s day", "%s days", line.days), line.days) %]</td></tr> + [% END %] + </tbody> + <tfoot> + <tr><td>[% body.name %]</td><td>[% tprintf(nget("%s day", "%s days", body_average), body_average) %]</td></tr> + <tr><td>[% loc('Overall average') %]</td><td>[% tprintf(nget("%s day", "%s days", average), average) %]</td></tr> + </tfoot> + </table> + </div> + <div class="dashboard-item dashboard-item--6"> + <h2 class="dashboard-subheading">[% tprintf( loc('Most popular categories in %s'), body.name ) %]</h2> + <p>[% loc('Number of problems reported in each category, in the last 7 days.') %]</p> + <table class="dashboard-ranking-table"> + <tbody> + [% FOR line IN top_five_categories %] + [% line_count = line.count | format_number ~%] + <tr><td>[% line.category %]</td><td>[% tprintf(nget("%s report", "%s reports", line.count), decode(line_count)) %]</td></tr> + [% END %] + </tbody> + <tfoot> + <tr><td>[% loc('Other categories') %]</td><td>[% tprintf(nget("%s report", "%s reports", other_categories), decode(other_categories_formatted)) %]</td></tr> + </tfoot> + </table> + </div> +</div> + +<div class="dashboard-row"> + <div class="dashboard-item dashboard-item--12"> + <h2 class="dashboard-subheading">[% tprintf( loc('Where we send %s reports'), body.name ) %]</h2> + [% IF body.send_method == 'Refused' %] + <p> + [% tprintf( loc('%s currently does not accept reports from FixMyStreet.'), body.name) %] + </p> + + <p> + [% loc('If you’d like to discuss this then <a href="/contact">get in touch</a>.') %] + </p> + [% ELSIF body.send_method == 'Noop' %] + <p> + [% tprintf( loc('Reports are currently not being sent to %s.'), body.name ) %] + </p> + [% ELSIF body.send_method != 'Email' AND body.send_method != '' %] + <p> + [% tprintf( loc('Reports to %s are currently sent directly into backend services.'), body.name) %] + </p> + [% ELSE %] + <p> + [% loc('We currently send all reports to the email addresses below.') %] + </p> + <table class="dashboard-ranking-table" style="margin-bottom: 1em;"> + <tr> + <th>[% loc('Category') %]</th> + <th>[% loc('Contact') %]</th> + </tr> + [% WHILE ( cat = live_contacts.next ) %] + <tr> + <td class="contact-category"><a href="[% body_url %]?filter_category=[% cat.category | uri %]">[% cat.category_display | html %]</a> + </td> + <td>[% cat.email | html %]</td> + </tr> + [% END %] + </table> + <p> + [% loc('If you would like to change either the categories or the contact emails above then <a href="/contact">get in touch</a>.') %] + <p> + <p> + [% loc('Did you know that if you used the approved open standard Open311 you could send reports directly into your own backend services – and get much more control over what additional information you request?') %] + </p> + <p> + [% loc('If that’s new to you, <a href="https://www.mysociety.org/2013/01/10/open311-introduced/">take a look at our simple Open311 primer</a> to see what you need to do to get up and running in a few days.') %] + </p> + [% END %] + </div> +</div> + +[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/fixmystreet.com/site_logo_with_fallback.svg b/templates/web/fixmystreet.com/site_logo_with_fallback.svg new file mode 100644 index 000000000..b51a4a849 --- /dev/null +++ b/templates/web/fixmystreet.com/site_logo_with_fallback.svg @@ -0,0 +1,14 @@ +<svg width="175" height="35" viewBox="0 0 175 35" xmlns="http://www.w3.org/2000/svg"> + <!--[if gt IE 8]><!--> + <switch> + <g class="site-logo__svg"> + <path d="M16.8 30c-2.2 0-4.3-.5-6.1-1.5l5.6-5.8 1.5.1a6 6 0 0 0 6-5.9 5.8 5.8 0 0 0-.3-1.5l-3 3.1-3.6-.7-.7-3.4 3.2-3.1c-.5-.2-1-.3-1.6-.3a6 6 0 0 0-6 6 5.8 5.8 0 0 0 .4 1.9l-5.7 5.8a12.2 12.2 0 0 1-2.2-7c0-6.8 5.6-12.4 12.5-12.4 6.8 0 12.4 5.6 12.4 12.4 0 6.8-5.6 12.4-12.4 12.4m0-28C8 2 1 9 1 17.7s7 15.6 15.8 15.6c8.7 0 15.7-7 15.7-15.6s-7-15.6-15.7-15.6" fill="#FFF"/> + <path d="M94.4 30.2c1.1 0 1.9-.9 2.3-2l.8-1.8L93 16c-.2-.4-.5-.5-1-.5H92V14h.8c1.1 0 1.5.2 2 1.4l3.2 7.8.4 1.3.5-1.3 3.1-7.8c.4-1.2.8-1.4 2-1.4h.7v1.5h-.2c-.5 0-.7 0-.9.5l-5.4 13.1c-.7 1.6-2 2.6-3.6 2.6-1.8 0-2.8-1.2-2.8-1.2l.8-1.2s.8.9 2 .9M70.8 25h1c.3 0 .5-.2.5-.6L73.6 9h1.8l4.7 10.2.8 2 1-2L86.4 9h1.8l1.2 15.4c0 .4.2.6.6.6h.9v1.5h-1.7c-1 0-1.5-.4-1.5-1.5l-.9-10.6v-2.5l-1 2.5-4.2 8.8h-1.5L76 14.4l-1-2.5v2.5L74 25c0 1-.4 1.5-1.5 1.5h-1.7V25zm-7.6-5l-2.8-4c-.3-.4-.6-.5-1.1-.5h-.5V14h.9c1.3 0 1.6.2 2.3 1.4L64 18l.5.8.4-.8 1.9-2.7c.7-1.2 1-1.4 2.3-1.4h1v1.5h-.6c-.5 0-.9 0-1.2.5l-2.7 4 4.4 6.5h-2l-3-4.7a17 17 0 0 1-.5-.6l-.5.7-3 4.6h-2l4.4-6.5zm-9-11H56v2.2h-1.6V9zm.1 7c0-.3-.2-.5-.5-.5h-1V14h1.7c1 0 1.5.4 1.5 1.5v9c0 .4.2.5.6.5h1v1.5H56c-1.1 0-1.6-.4-1.6-1.5v-9zm-12.1-5.4h-1.6V9H50c1.1 0 1.5.5 1.5 1.5v1.8H50V11c0-.4-.2-.5-.5-.5H44V17h6.3v1.6h-6.3v7.8h-1.8v-16z" fill="#FDD008"/> + <path d="M170.4 13.6l1.6.1c.2.1.7.5.7 1.2l-.2.7c-.4.7-.9.7-2.1.7v6.2c0 1.1.4 1.2 1.3 1.2 1 0 1.2.8 1.2 1.3 0 1.5-1.7 1.6-2.7 1.6-3.4 0-3.5-2-3.5-3.4v-6.9l-1.2-.1c0-.1-.6-.4-.6-1.3v-.6c.4-.7 1.2-.7 1.8-.7v-1.8c0-.6 0-1.2.5-1.7 0-.1.5-.6 1.3-.6l.7.1c1.1.4 1.1 1.5 1.2 2.2v1.8zm-9.4 4.8c-.1-.4-.2-.8-.5-1.2-.4-.7-1.2-1-2-1-2 0-2.5 1.4-2.8 2.2h5.3zm-5.3 2.8c.1.6.2 1.3.8 2a2.7 2.7 0 0 0 2 .8c1 0 1.6-.4 1.8-.7l.5-.4c.4-.3.7-.4 1-.4 1 0 1.7.7 1.7 1.6 0 .6-.3 1.1-1 1.6a7 7 0 0 1-4 1.1c-5 0-6.6-3.6-6.6-6.7 0-3.8 2.5-6.8 6.6-6.8 4.6 0 6 3.7 6 6.1 0 1.7-1 1.7-1.6 1.8h-7.2zm-8.3-2.8l-.4-1.2c-.5-.7-1.3-1-2.2-1-2 0-2.4 1.4-2.7 2.2h5.3zm-5.3 2.8c.1.6.2 1.3.8 2 .8.8 1.8.8 2 .8 1 0 1.6-.4 1.9-.7l.4-.4c.4-.3.8-.4 1-.4 1 0 1.7.7 1.7 1.6 0 .6-.2 1.1-1 1.6a7 7 0 0 1-4 1.1c-5 0-6.6-3.6-6.6-6.7 0-3.8 2.5-6.8 6.6-6.8 4.6 0 6 3.7 6 6.1 0 1.7-1 1.7-1.6 1.8h-7.2zm-12.3-5.4c0-.6 0-1.3.6-1.9.2-.2.6-.4 1.2-.4l.8.1c1 .5 1 1.6 1 2v.4c0-.4.2-.8.5-1.2a3 3 0 0 1 2.6-1.4c1.3 0 1.8.8 1.8 1.6 0 .5-.1 1-.4 1.2-.4.4-.9.5-1.3.5h-1c-2 .4-2 2.3-2 3.7v4c0 .5 0 1.3-.5 1.7-.3.4-.8.6-1.3.6a2.6 2.6 0 0 1-.7-.1c-1.2-.4-1.3-1.5-1.3-2.3v-8.5zm-3.6-2.2l1.6.1c.2.1.7.5.7 1.2 0 .3 0 .5-.2.7-.3.7-.8.7-2.1.7v6.2c0 1.1.4 1.2 1.3 1.2 1 0 1.2.8 1.2 1.3 0 1.5-1.7 1.6-2.7 1.6-3.4 0-3.5-2-3.5-3.4v-6.9l-1.1-.1c-.2-.1-.7-.4-.7-1.3l.1-.6c.4-.7 1.1-.7 1.7-.7v-1.8c0-.6 0-1.2.5-1.7.1-.1.5-.6 1.4-.6l.7.1c1 .4 1 1.5 1 2.2v1.8zm-6.3-1c0 1.1-1.1 1.8-2 1.8-.6 0-1-.2-1.5-.9l-.4-.5c-.6-.7-1.5-1.2-3-1.2-1.7 0-3 .6-3 1.8 0 .4.2.7.5 1 .4.3 1 .5 2.3.8 3.9 1 4.3 1.2 5.2 1.8 1 .7 2.2 2 2.2 4 0 1.8-.9 3.3-2 4.2a8.4 8.4 0 0 1-5.3 1.5c-1.8 0-3.4-.3-4.7-1-2.7-1.3-2.8-3-2.8-3.4 0-1.2 1-2 2-2 .7 0 1.3.5 1.8 1.4.6.8 1.2 1.7 3.8 1.7.5 0 1.2 0 1.7-.3.2 0 1.4-.5 1.4-1.8 0-.7-.3-1-.8-1.4-.5-.3-.8-.4-3.2-1-3-.8-6.2-1.6-6.2-5.3 0-3.1 2.5-5.3 7.1-5.3 4.4 0 6.9 2.3 6.9 4z" fill="#FFF"/> + </g> + <foreignObject> + <!--<![endif]--> + <span class="site-logo__fallback"></span> + </foreignObject> + </switch> +</svg>
\ No newline at end of file diff --git a/templates/web/hart/header.html b/templates/web/hart/header.html index ee29df818..0aae5568b 100644 --- a/templates/web/hart/header.html +++ b/templates/web/hart/header.html @@ -11,15 +11,8 @@ <meta name="mobileoptimized" content="0"> [% INCLUDE 'header_opengraph.html' %] - - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/base.css') %]"> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]" media="(min-width:48em)"> + [% INCLUDE 'header/css.html' %] <link rel="stylesheet" href="[% version('/cobrands/hart/hart.css') %]"> - [% extra_css %] - <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]"> - <![endif]--> - [% INCLUDE 'common_header_tags.html' %] <link rel="Shortcut Icon" type="image/x-icon" href="/cobrands/hart/favicon.ico"> diff --git a/templates/web/oxfordshire/_email_sent_extra.html b/templates/web/oxfordshire/_email_sent_extra.html index 5fdcd3bfd..f01c2d5fb 100644 --- a/templates/web/oxfordshire/_email_sent_extra.html +++ b/templates/web/oxfordshire/_email_sent_extra.html @@ -1 +1,2 @@ -[% INCLUDE '_response_time.html' problem=report %] +[% DEFAULT problem = report %] +[% IF problem %][% INCLUDE '_response_time.html' %][% END %] diff --git a/templates/web/oxfordshire/header.html b/templates/web/oxfordshire/header.html index 3666eb4ff..fce316bf9 100644 --- a/templates/web/oxfordshire/header.html +++ b/templates/web/oxfordshire/header.html @@ -13,13 +13,7 @@ <meta name="HandHeldFriendly" content="true"> <meta name="mobileoptimized" content="0"> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/base.css') %]"> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]" media="(min-width:48em)"> - [% extra_css %] - <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]"> - <![endif]--> - + [% INCLUDE 'header/css.html' %] [% INCLUDE 'common_header_tags.html' %] [% INCLUDE 'tracking_code.html' %] diff --git a/templates/web/oxfordshire/reports/_status_filter_options.html b/templates/web/oxfordshire/reports/_status_filter_options.html new file mode 100644 index 000000000..7f4fd5ace --- /dev/null +++ b/templates/web/oxfordshire/reports/_status_filter_options.html @@ -0,0 +1,7 @@ + [% IF c.user_exists AND c.user.is_superuser OR c.user.belongs_to_body(body.id) %] + data-none="All unresolved" + data-extra="All unresolved" + data-extra-options='["confirmed","investigating","action scheduled"]' + [% ELSE %] + data-none="Open" + [%~ END ~%] diff --git a/templates/web/stevenage/header.html b/templates/web/stevenage/header.html index 34f5ba2b2..219486a9e 100644 --- a/templates/web/stevenage/header.html +++ b/templates/web/stevenage/header.html @@ -10,13 +10,7 @@ <meta name="HandHeldFriendly" content="true"> <meta name="mobileoptimized" content="0"> - <link rel="stylesheet" href="[% version('/cobrands/stevenage/base.css') %]"> - <link rel="stylesheet" href="[% version('/cobrands/stevenage/layout.css') %]" media="(min-width:48em)"> - [% extra_css %] - <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]"> - <![endif]--> - + [% INCLUDE 'header/css.html' %] [% INCLUDE 'common_header_tags.html' %] [% INCLUDE 'tracking_code.html' %] diff --git a/templates/web/warwickshire/footer.html b/templates/web/warwickshire/footer.html index a22c66200..d6d88535c 100644 --- a/templates/web/warwickshire/footer.html +++ b/templates/web/warwickshire/footer.html @@ -1,42 +1,57 @@ - </div> - </div> -</div> -</div> + </div>[%# close div.content %] + </div>[%# close div#mysociety %] + </div>[%# close div#wrapper.container.wrapper %] - <hr class="footer-container" /> - <footer> - <div class="footer-container"> - <div class="row"> - <!--<div class="row style-1-gradient">--> - <div class="span3"> - <aside id="text-7" class="widget widget_text"> <div class="textwidget"><div style="text-align:center;padding-top:5px;">
-<img style="width:auto !important;" src="//www.warwickshire.gov.uk/wp-content/uploads/2014/08/WCC+logo.png" alt="Warwickshire County Council">
-</div></div> - </aside> </div> - <div class="span3"> - <aside id="text-3" class="widget widget_text"> <div class="textwidget"><h4 class="widget-title"><a href="//www.warwickshire.gov.uk/locationmap">Contact details and map</a></h4></div> - </aside> </div> - <div class="span2"> - <aside id="text-4" class="widget widget_text"> <div class="textwidget"><h4 class="widget-title"><a href="//www.warwickshire.gov.uk/?page_id=976766">Information for...</a></h4></div> - </aside> </div> - <div class="span2"> - <aside id="text-5" class="widget widget_text"> <div class="textwidget"><h4 class="widget-title"><a href="//www.warwickshire.gov.uk/socialnetworking">Social media</a></h4></div> - </aside><aside id="text-9" class="widget widget_text"> <div class="textwidget"><script src="//static.warwickshire.gov.uk/libs/js/wcc/e-services/engage-test.js"></script></div> - </aside> </div> - <div class="span2"> - <aside id="text-6" class="widget widget_text"> <div class="textwidget"><h4 class="widget-title"><a href="//www.warwickshire.gov.uk/help">Help using the website</a></h4>
-</div> - </aside> </div> - - </div> - <div class="row"> - <div class="span12" style="text-align: center"> - © Warwickshire County Council - </div> + <footer> + <div class="container"> + <div class="row"> + <div class="span3"> + <aside class="widget widget_text" id="text-7"> + <div class="textwidget"> + <div style="text-align:center;padding-top:5px;"> + <img alt="" src="//www.warwickshire.gov.uk/wp-content/uploads/2014/08/WCC+logo.png" style="width:auto !important;"> + </div> + </div> + </aside> + </div> + <div class="span3"> + <aside class="widget widget_text" id="text-3"> + <div class="textwidget"> + <p><a href="//www.warwickshire.gov.uk/accessibility">Accessibility</a></p> + <p><a href="//www.warwickshire.gov.uk/help">Help using the website</a></p> + <p><a href="//www.warwickshire.gov.uk/disclaimer">Privacy and disclaimer</a></p> + <p><a href="//www.warwickshire.gov.uk/contactus">Contact us</a></p> + <p><a href="//www.warwickshire.gov.uk/az">A-Z of services</a></p> + </div> + </aside> + </div> + <div class="span2"> + <aside class="widget widget_text" id="text-4"> + <div class="textwidget"> + <p><a href="//www.warwickshire.gov.uk/socialnetworking">Social media</a></p> + <p><a href="//www.warwickshire.gov.uk/?page_id=976766">Services for...</a></p> + <p><a href="//www.warwickshire.gov.uk/customerservice">Customer service and complaints</a></p> + </div> + </aside> + </div> + <div class="span2"> + <aside class="widget widget_text" id="text-13"> + <div class="textwidget"> + <a href="https://public.govdelivery.com/accounts/UKWarwickshire/subscriber/new"><img src="http://www.warwickshire.gov.uk/wp-content/uploads/2016/05/keep-me-posted-white-on-trans-155x39.png"></a> + </div> + </aside> </div> </div> + <div class="row"> + <div class="span4"></div> + <div class="span4" style="text-align:center;"> + <p>© Warwickshire County Council</p> + </div> + <div class="span4"></div> + </div> + </div> </footer> -<!-- Fin. --> + [% INCLUDE 'common_footer_tags.html' %] </body> </html> diff --git a/templates/web/warwickshire/header.html b/templates/web/warwickshire/header.html index 81c1d9d23..6ad06f69a 100644 --- a/templates/web/warwickshire/header.html +++ b/templates/web/warwickshire/header.html @@ -7,163 +7,47 @@ <head> <meta name="viewport" content="initial-scale=1.0"> - <link rel="shortcut icon" href="/cobrands/warwickshire/vendor/gamma/images/favicon.ico" /> + <link rel="shortcut icon" href="/cobrands/warwickshire/vendor/gamma/images/favicon_wcc.ico" /> + <link rel="icon" type="image/png" href="/cobrands/warwickshire/vendor/gamma/images/favicon-WCC.png" /> + <link rel="apple-touch-icon" href="/cobrands/warwickshire/vendor/gamma/images/apple-touch-icon-WCC.png" /> + + <link rel="stylesheet" href="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/style.css') %]" /> + <link rel="stylesheet" href="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/bootstrap-responsive.css') %]" /> + <link rel="stylesheet" href="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/image-navigation.css') %]" /> + <link rel="stylesheet" href="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/venues.css') %]" /> + <link rel="stylesheet" media="print" href="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/print.css') %]" /> - <!-- Style --> - <link rel="stylesheet" type="text/css" href="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/style.css') %]" /> - <link rel="stylesheet" type="text/css" href="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/bootstrap-responsive.css') %]"> - <!-- Scripts --> <script src="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/modernizr-2.6.2-respond-1.1.0.min.js') %]" type="text/javascript"></script> <script src="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/jquery-1.9.0.min.js') %]" type="text/javascript"></script> <script src="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/bootstrap.min.js') %]" type="text/javascript"></script> <script src="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/main.js') %]" type="text/javascript"></script> + <script src="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/jquery.tabSlideOut.v1.3.js') %]" type="text/javascript"></script> + <script type="text/javascript"> + function popup(mylink, wname) { + if (! window.focus)return true; + var href; + if (typeof(mylink) == 'string') + href=mylink; + else + href=mylink.href; + window.open(href,wname,'width=345, height=590,scrollbars=no'); + return false; + } + </script> + <script src="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/jquery.cycle.js') %]" type="text/javascript"></script> + <script src="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/jquery.zrssfeed.o.js') %]" type="text/javascript"></script> + <script src="[% version ('/cobrands/' _ c.cobrand.moniker _ '/vendor/gamma/homepage-slider-test.js') %]" type="text/javascript"></script> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/base.css') %]"> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]" media="(min-width:48em)"> - [% extra_css %] - <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]"> - <![endif]--> - + [% INCLUDE 'header/css.html' %] [% INCLUDE 'common_header_tags.html' %] </head> [% TRY %][% PROCESS 'set_body_class.html' %][% CATCH file %][% END %] <body class="style-1 [% bodyclass | html IF bodyclass %]"> - <div id="beta-label" style="position:fixed; top:0; left:0; z-index:1059"> - <img alt="" src="https://news.warwickshire.gov.uk/wp-content/themes/fullscreen-maps/images/beta.png"> - </div> - <!--[if lt IE 7]> - <div class="alert alert-error"><strong>You are using an outdated browser</strong>. You may want to <a href="//browsehappy.com/">upgrade your browser</a> to improve your experience.</div> - <![endif]--> - <div id="site-header"> - <div class="navbar navbar-inverse navbar-fixed-top"> - <div class="navbar-inner"> - <div class="container"> - <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </a> - <a class="brand" href="//www.warwickshire.gov.uk/"><img src="//www.warwickshire.gov.uk/wp-content/themes/gamma/images/corpwhitelogo.png" alt="Warwickshire Direct" style="width:60px;" /></a> - <div class="nav-collapse collapse"> - <nav> - <ul class="nav"> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Residents<b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="//www.warwickshire.gov.uk/" accesskey="2">Residents - home</a></li> - <li><a href="//www.warwickshire.gov.uk/environment">Environment</a></li> - <li><a href="//www.warwickshire.gov.uk/health" accesskey="2">Health</a></li> - <li><a href="//www.warwickshire.gov.uk/librariesandleisure">Libraries and leisure</a></li> - <li><a href="//www.warwickshire.gov.uk/roadsandtravel">Roads and travel</a></li> - <li><a href="//www.warwickshire.gov.uk/registrations">Registrations</a></li> - <li><a href="//www.warwickshire.gov.uk/safetyandcrime">Safety and crime</a></li> - <li><a href="//www.warwickshire.gov.uk/schoolsandlearning">Schools and learning</a></li> - <li><a href="//www.warwickshire.gov.uk/socialcareandhealth">Social care and support</a></li> - </ul> - </li> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Business <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="//www.warwickshire.gov.uk/business" accesskey="3">Business - home</a></li> - <li><a href="//www.warwickshire.gov.uk/businesssupportorganisations">Business support organisations</a></li> - <li><a href="//www.warwickshire.gov.uk/growingyourbusiness">Growing your business</a></li> - <li><a href="//www.warwickshire.gov.uk/businesshealthandsafety" accesskey="2">Health and safety for businesses</a></li> - <li><a href="//www.warwickshire.gov.uk/locatingyourbusiness">Locating your business</a></li> - <li><a href="//www.warwickshire.gov.uk/otherbusinessservices">Other business services</a></li> - <li><a href="//www.warwickshire.gov.uk/businessadvice">Regulatory business service and advice</a></li> - <li><a href="//www.warwickshire.gov.uk/startingabusiness" accesskey="2">Starting a business</a></li> - </ul> - </li> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">The council <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="//www.warwickshire.gov.uk/corporate" accesskey="3">The council - home</a></li> - <li><a href="//www.warwickshire.gov.uk/democracy">Democracy</a></li> - <li><a href="//www.warwickshire.gov.uk/financeandsuppliers">Finance and suppliers</a></li> - <li><a href="//www.warwickshire.gov.uk/listsanddata">Lists, data and information</a></li> - <li><a href="//www.warwickshire.gov.uk/organisation" accesskey="2">Organisation</a></li> - <li><a href="//www.warwickshire.gov.uk/performance">Our performance</a></li> - <li><a href="//www.warwickshire.gov.uk/partnerships">Partnerships</a></li> - <li><a href="//www.warwickshire.gov.uk/policies">Policies, standards and legislation</a></li> - <li><a href="//www.warwickshire.gov.uk/projects">Projects</a></li> - <li><a href="//www.warwickshire.gov.uk/strategies">Strategies and priorities</a></li> - </ul> - </li> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="//countryparks.warwickshire.gov.uk/" accesskey="4">Country Parks</a></li> - <li><a href="//hwb.warwickshire.gov.uk/">Health and Wellbeing</a></li> - <li><a href="//heritage.warwickshire.gov.uk/">Heritage and Culture</a></li> - <li><a href="//invest.warwickshire.gov.uk/">Invest in Warwickshire</a></li> - <li><a href="//www.warwickshire.gov.uk/jobs">Jobs</a></li> - <li><a href="//www.livingwellwithdementia.org/">Living well with dementia</a></li> - <li><a href="//laf.warwickshire.gov.uk/">Local Access Forum</a></li> - <li><a href="//news.warwickshire.gov.uk/" accesskey="2">News</a></li> - <li><a href="//publichealth.warwickshire.gov.uk/">Public Health</a></li> - <li><a href="//www.warwickshire.gov.uk/spp">Staff, Partners and Practitioners</a></li> - <li><a href="//wwp.warwickshire.gov.uk/">Waste Partnership</a></li> - <li><a href="//whittlefordpark.warwickshire.gov.uk/">Whittle Park</a></li> - </ul> - </li> - </ul> - </nav> - </div><!--/.nav-collapse --> - <div class="nav-collapse collapse pull-right span2"> - <ul class="nav"> - <li class="dropdown"> - <a href="//www.warwickshire.gov.uk/myaccount" class="dropdown-toggle" data-toggle="dropdown">My Account <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li> - <a href="//www.warwickshire.gov.uk/me@wcc">Me@WCC</a> - <p class="nav-header" style="font-weight:normal;text-transform:none !important;">Manage event submissions, submit licence applications, or access Atlas</p> - </li> - <li> - <a href="//www.warwickshire.gov.uk/librarylogin">Library account</a> - <p class="nav-header" style="font-weight:normal;text-transform:none !important;">Renew and reserve paper books or borrow eBooks</p> - </li> - <li> - <a href="//www.warwickshire.gov.uk/jobslogin">Jobs</a> - <p class="nav-header" style="font-weight:normal;text-transform:none !important;">Apply for roles or setup alerts</p> - </li> - <li> - <a href="//www.warwickshire.gov.uk/myaccount">Other accounts</a> - </li> - </ul> - </li> - </ul> - </div> - </div> - </div> - </div> - <div class="row style-1-gradient" id="top-header"> - <div class="container"> - <div class="span12" style="height:100px;"> - <div class="row"> - <div id="logo-wrap" class="span3" style="padding-top:15px;padding-bottom:15px;"> - <a href="//www.warwickshire.gov.uk/"><img src="//www.warwickshire.gov.uk/wp-content/themes/gamma/images/wdwhitelogo.png" alt="Warwickshire County Council - home" title="Warwickshire County Council - home" ></a> - </div> - <div class="span9"> - <form action="//search3.openobjects.com/kb5/warwickshire/search/results.page" method="get" name="kbs" class="navbar-form pull-right" id="site-search"> - <label for="qtbottom" class="skip" style="display:none;">Search again</label> - <input type="text" maxlength="1000" size="40" name="qt" id="qtbottom" alt="Search" placeholder="eg; libraries, roadworks" accesskey="4"> - <button type="submit" value="Search" id="kbsubmitbottom" class="btn btn-mini searchbutton">Search</button> - </form> - </div> - </div> - </div> - </div> - </div> - <div class="container navbar-container"> - <div class="navbar" id="mega-menu-navbar"> - <div class="navbar-inner"> - [% INCLUDE "main_nav.html" body_name=c.cobrand.council_area hide_all_reports_link=1 omit_wrapper=1 ul_class="menu nav" ul_id="mega-menu" %] - </div> - </div> - </div> - </div> + + [% INCLUDE 'warwickshire_masthead.html' %] + + [% INCLUDE "main_nav.html" body_name=c.cobrand.council_area hide_all_reports_link=1 ul_class='container' %] <div id="wrapper" class="container wrapper"> <div id="mysociety"> diff --git a/templates/web/warwickshire/warwickshire_masthead.html b/templates/web/warwickshire/warwickshire_masthead.html new file mode 100644 index 000000000..1c87d3e89 --- /dev/null +++ b/templates/web/warwickshire/warwickshire_masthead.html @@ -0,0 +1,219 @@ +<!--[if lt IE 7]> + <div class="alert alert-error"><strong>You are using an outdated browser</strong>. You may want to <a href="//browsehappy.com/">upgrade your browser</a> to improve your experience.</div> +<![endif]--> + +<div class="navbar navbar-inverse navbar-fixed-top"> + <div class="navbar-inner"> + <div class="container"> + <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </a> + <a alt="Warwickshire County Council Search" class="search btn-search pull-right"> + <span class="icon-search icon-white"></span> + </a> + <a href="#maincontent" id="skiptomain">Skip to main content</a> + <a alt="Warwickshire County Council logo" class="brand" href="//www.warwickshire.gov.uk/"> + <img alt="Warwickshire County Council" src="http://www.warwickshire.gov.uk/wp-content/themes/gamma/images/corpwhitelogo.png" style="width:85px;"> + </a> + <a alt="Gov Delivery logo" class="gdslogo" href="https://public.govdelivery.com/accounts/UKWarwickshire/subscriber/new"> + <img alt="GDSl" src="http://www.warwickshire.gov.uk/wp-content/themes/gamma/images/keep_me_posted_envelope_17px.png" style="width:17px;"> + </a> + <a alt="Gov Delivery logo" class="govdelmobile pull-right" href="https://public.govdelivery.com/accounts/UKWarwickshire/subscriber/new"> + <img alt="GDSl" src="http://www.warwickshire.gov.uk/wp-content/themes/gamma/images/keep_me_posted_envelope_17px.png" style="width:17px;"> + </a> + <a class="gdstext" href="https://public.govdelivery.com/accounts/UKWarwickshire/subscriber/new">Email alerts</a> + <div class="nav-collapse collapse pull-left" id="right-topbar"> + <ul class="nav pull-right"> + <li class="dropdown"> + <a class="dropdown-toggle sign-in" href="//www.warwickshire.gov.uk/myaccount"><i class="icon-white icon-user"></i> My account</a> + <ul class="dropdown-menu"> + <li> + <a href="https://customer.warwickshire.gov.uk/login">Self account</a> + <p class="nav-header" style="font-weight:normal;text-transform:none !important;"> + Contact us, streetlight faults, blue badges, etc + </p> + </li> + <li> + <a href="//www.warwickshire.gov.uk/me@wcc">Me@WCC - Atlas</a> + </li> + <li> + <a href="//www.warwickshire.gov.uk/librarylogin">Library account</a> + </li> + <li> + <a href="//www.warwickshire.gov.uk/jobslogin">Jobs</a> + </li> + <li> + <a href="https://admissions.warwickshire.gov.uk/Enrol/Website/login.aspx">School admissions</a> + </li> + <li> + <a href="https://apps.warwickshire.gov.uk/SchoolsIDP/users/sign_in">Warwickshire Education Service (WES)</a> + </li> + <li> + <a href="//www.warwickshire.gov.uk/myaccount">Other accounts</a> + </li> + </ul> + </li> + </ul> + </div> + <div class="nav-collapse collapse" id="left-topbar"> + <nav> + <ul class="nav"> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="//www.warwickshire.gov.uk">Residents<b class="caret"></b></a> + <ul class="dropdown-menu"> + <li> + <a href="http://www.warwickshire.gov.uk/">Residents - home</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/environment">Environment</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/health">Health</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/librariesandleisure">Libraries and leisure</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/roadsandtravel">Roads and travel</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/registrations">Registrations</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/safetyandcrime">Safety and crime</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/schoolsandlearning">Schools and learning</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/socialcareandhealth">Social care and support</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/contactus">Customer service and contacts</a> + </li> + </ul> + </li> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="//www.warwickshire.gov.uk/business">Business <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li> + <a href="http://www.warwickshire.gov.uk/business">Business - home</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/businesssupportorganisations">Business support organisations</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/growingyourbusiness">Growing your business</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/businesshealthandsafety">Health and safety for businesses</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/locatingyourbusiness">Locating your business</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/otherbusinessservices">Other business services</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/businessadvice">Regulatory business service and advice</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/startingabusiness">Starting a business</a> + </li> + </ul> + </li> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="//www.warwickshire.gov.uk/corporate">The council <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li> + <a href="http://www.warwickshire.gov.uk/corporate">The council - home</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/democracy">Democracy</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/financeandsuppliers">Finance and suppliers</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/jobs">Jobs</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/listsanddata">Lists, data and information</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/news">News</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/organisation">Organisation</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/performance">Our performance</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/partnerships">Partnerships</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/policies">Policies, standards and legislation</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/projects">Projects</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/strategies">Strategies and priorities</a> + </li> + </ul> + </li> + <li class="dropdown"> + <a class="dropdown-toggle" data-toggle="dropdown" href="//www.warwickshire.gov.uk/onlineestate">More sites<b class="caret"></b></a> + <ul class="dropdown-menu"> + <li> + <a href="http://countryparks.warwickshire.gov.uk/">Country Parks</a> + </li> + <li> + <a href="http://hwb.warwickshire.gov.uk/">Health and Wellbeing</a> + </li> + <li> + <a href="http://heritage.warwickshire.gov.uk/">Heritage and Culture</a> + </li> + <li> + <a href="http://invest.warwickshire.gov.uk/">Invest in Warwickshire</a> + </li> + <li> + <a href="http://www.warwickshire.gov.uk/jobs">Jobs</a> + </li> + <li> + <a href="http://www.livingwellwithdementia.org/">Living well with dementia</a> + </li> + <li> + <a href="http://laf.warwickshire.gov.uk/">Local Access Forum</a> + </li> + <li> + <a href="//news.warwickshire.gov.uk/">News</a> + </li> + <li> + <a href="http://publichealth.warwickshire.gov.uk/">Public Health</a> + </li> + <li> + <a href="//www.warwickshire.gov.uk/spp">Staff, Partners and Practitioners</a> + </li> + <li> + <a href="http://wwp.warwickshire.gov.uk/">Waste Partnership</a> + </li> + <li> + <a href="http://whittlefordpark.warwickshire.gov.uk/">Whittleford Park</a> + </li> + </ul> + </li> + </ul> + <form action="//search3.openobjects.com/kb5/warwickshire/search/results.page" class="navbar-form pull-right" id="site-search" method="get" name="kbs"> + <label class="skip" for="qtbottom" style="display:none;">Search again</label> + <input alt="Search" class="span3" id="qtbottom" maxlength="1000" name="qt" placeholder="eg; libraries, roadworks" size="40" type="text"> + <button class="btn btn-mini searchbutton" id="kbsubmitbottom" type="submit" value="Search">Search</button> + </form> + </nav> + </div> + </div> + </div> +</div>
\ No newline at end of file diff --git a/templates/web/zurich/admin/body-form.html b/templates/web/zurich/admin/body-form.html index de9fac0e2..44adcbc72 100644 --- a/templates/web/zurich/admin/body-form.html +++ b/templates/web/zurich/admin/body-form.html @@ -22,8 +22,7 @@ <p> <label for="area_ids">[% loc('Area covered') %]</label> - <select class="form-control" name="area_ids" id="area_ids" multiple> - <option value=""> -- [% loc('Select an area') %] -- </option> + <select class="form-control js-multiple" name="area_ids" id="area_ids" multiple data-none="-- [% loc('Select an area') %] --"> [% SET body_areas = body.areas %] [% FOR area IN areas %] [% SET aid = area.id %] diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html index 07f0332d5..07fc9ad36 100644 --- a/templates/web/zurich/admin/report_edit-sdm.html +++ b/templates/web/zurich/admin/report_edit-sdm.html @@ -1,9 +1,9 @@ [% PROCESS "report/photo-js.html"; PROCESS "maps/zurich.html"; + SET bodyclass = 'mappage'; PROCESS 'admin/header.html' - title = tprintf(loc('Editing problem %d'), problem.id ), - bodyclass = 'mappage'; + title = tprintf(loc('Editing problem %d'), problem.id ); PROCESS 'admin/report_blocks.html' -%] @@ -64,7 +64,7 @@ <br> [% problem.user.email | html %] [% IF NOT problem.extra.email_confirmed %]<span class="error">[% loc('Unconfirmed') %]</span>[% END %] - <input type='hidden' id='email' name='email' value='[% problem.user.email | html %]'> + <input type='hidden' id='username' name='username' value='[% problem.user.username | html %]'> <br> [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('(No phone number)') %]</em>[% END %] </dd> diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html index 35075a9f0..7e88fab30 100644 --- a/templates/web/zurich/admin/report_edit.html +++ b/templates/web/zurich/admin/report_edit.html @@ -1,9 +1,9 @@ [% PROCESS "report/photo-js.html"; PROCESS "maps/zurich.html"; + SET bodyclass = 'mappage'; INCLUDE 'admin/header.html' - title = tprintf(loc('Editing problem %d'), problem.id ), - bodyclass = 'mappage'; + title = tprintf(loc('Editing problem %d'), problem.id ); PROCESS 'admin/report_blocks.html' -%] @@ -92,7 +92,7 @@ <br> [% problem.user.email | html %] [% IF NOT problem.extra.email_confirmed %]<span class="error">[% loc('Unconfirmed') %]</span>[% END %] - <input type='hidden' id='email' name='email' value='[% problem.user.email | html %]'> + <input type='hidden' id='username' name='username' value='[% problem.user.username | html %]'> <br> [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('(No phone number)') %]</em>[% END %] </dd> diff --git a/templates/web/zurich/admin/stats.html b/templates/web/zurich/admin/stats/index.html index ce8e238f7..ce8e238f7 100644 --- a/templates/web/zurich/admin/stats.html +++ b/templates/web/zurich/admin/stats/index.html diff --git a/templates/web/zurich/admin/templates.html b/templates/web/zurich/admin/templates.html new file mode 100644 index 000000000..2db9e2e34 --- /dev/null +++ b/templates/web/zurich/admin/templates.html @@ -0,0 +1,28 @@ +[% INCLUDE 'admin/header.html' title=tprintf(loc('Response Templates for %s'), body.name) -%] + +<h2> [% tprintf(loc('Response Templates for %s'), body.name) %] </h2> + +<table> + <thead> + <tr> + <th> [% loc('Title') %] </th> + <th> [% loc('Text') %] </th> + <th> [% loc('Created') %] </th> + <th> </th> + </tr> + </thead> + <tbody> +[% FOR t IN response_templates %] + <tr> + <td> [% t.title %] </td> + <td> [% t.text %] </td> + <td> [% t.created %] </td> + <td> <a href="[% c.uri_for('templates', body.id, t.id) %]" class="btn">[% loc('Edit') %]</a> </td> + </tr> +[% END %] + </tbody> +</table> + +<a href="[% c.uri_for('templates', body.id, 'new') %]" class="btn">[% loc('New template') %]</a> + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/admin/update_edit.html b/templates/web/zurich/admin/update_edit.html index b2cde0b92..bcf849732 100644 --- a/templates/web/zurich/admin/update_edit.html +++ b/templates/web/zurich/admin/update_edit.html @@ -20,7 +20,7 @@ [% END %] </select></li> <input type='hidden' name='name' id='name' value='[% update.name | html %]'> -<input type='hidden' id='email' name='email' value='[% update.user.email | html %]'> +<input type='hidden' id='username' name='username' value='[% update.user.username | html %]'> [% IF update.problem_state %] <li>[% tprintf(loc('Update changed problem state to %s'), update.problem_state) %]</li> [% END %] diff --git a/templates/web/zurich/auth/general.html b/templates/web/zurich/auth/general.html index fd34b79f8..899f0ca71 100644 --- a/templates/web/zurich/auth/general.html +++ b/templates/web/zurich/auth/general.html @@ -1,18 +1,18 @@ [% INCLUDE 'header.html', title = loc('Sign in or create an account') %] -[% IF email_error; +[% IF username_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') + missing_email = loc('Please enter your email'), + other_email = loc('Please check your email address is correct') }; - loc_email_error = errors.$email_error || errors.other; + loc_username_error = errors.$username_error || errors.other_email; END %] -<form action="[% c.uri_for() %]" method="post" name="general_auth_login" class="validate"> +<form action="/auth" method="post" name="general_auth_login" class="validate"> <fieldset> <h1>[% loc('Sign in') %]</h1> @@ -21,18 +21,18 @@ END %] <div id="form_sign_in_yes" class="form-box"> - <label class="n" for="email">[% loc('Email') %]</label> - [% IF loc_email_error %] - <div class="form-error">[% loc_email_error %]</div> + <label class="n" for="username">[% loc('Email') %]</label> + [% IF loc_username_error %] + <div class="form-error">[% loc_username_error %]</div> [% ELSIF sign_in_error %] - <div class="form-error">[% loc('There was a problem with your email/password combination. If you cannot remember your password, or do not have one, please fill in the ‘sign in by email’ section of the form.') %]</div> + <div class="form-error">[% loc('There was a problem with your login information. If you cannot remember your password, or do not have one, please fill in the ‘No’ section of the form.') %]</div> [% END %] - <input type="email" class="required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]" autofocus> + <input type="email" class="required email" id="username" name="username" value="[% username | html %]" placeholder="[% loc('Your email address') %]" autofocus> <label for="password_sign_in">[% loc('Password (optional)') %]</label> <div class="form-txt-submit-box"> <input type="password" class="required" 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') %]"> + <input class="green-btn" type="submit" name="sign_in_by_password" value="[% loc('Sign in') %]"> </div> <div class="form-txt-submit-box"> @@ -44,18 +44,18 @@ END %] </fieldset> </form> -<form action="[% c.uri_for() %]" method="post" name="general_auth_register" class="validate"> +<form action="/auth" method="post" name="general_auth_register" class="validate"> <fieldset> <input type="hidden" name="r" value="[% c.req.params.r | html %]"> <h1>[% loc('<strong>No</strong> let me sign in by email') %]</h1> <div id="form_sign_in_no" class="form-box"> - <label class="n" for="email2">[% loc('Email') %]</label> - [% IF loc_email_error %] - <div class="form-error">[% loc_email_error %]</div> + <label class="n" for="username2">[% loc('Email') %]</label> + [% IF loc_username_error %] + <div class="form-error">[% loc_username_error %]</div> [% END %] - <input type="email" class="required email" id="email2" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]"> + <input type="email" class="required email" id="username2" name="username" value="[% username | html %]" placeholder="[% loc('Your email address') %]"> <label for="name">[% loc('Name') %]</label> <input type="text" class="required" name="name" value="" placeholder="[% loc('Your name') %]"> @@ -63,7 +63,7 @@ END %] <label for="password_register">[% loc('Password (optional)') %]</label> <div class="form-txt-submit-box"> <input type="password" class="required" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> - <input class="green-btn" type="submit" name="email_sign_in" value="Registrieren"> + <input class="green-btn" type="submit" name="sign_in_by_code" value="Registrieren"> </div> </div> diff --git a/templates/web/zurich/footer.html b/templates/web/zurich/footer.html index 0164dbcab..f68f80aea 100644 --- a/templates/web/zurich/footer.html +++ b/templates/web/zurich/footer.html @@ -34,10 +34,7 @@ </div> </div> - <script src="[% version('/cobrands/zurich/validation_rules.js') %]"></script> [% INCLUDE 'common_footer_tags.html' %] - <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js" charset="utf-8"></script> - <script src="[% version('/cobrands/zurich/js.js') %]"></script> </body> </html> diff --git a/templates/web/zurich/footer_extra_js.html b/templates/web/zurich/footer_extra_js.html new file mode 100644 index 000000000..a98457363 --- /dev/null +++ b/templates/web/zurich/footer_extra_js.html @@ -0,0 +1,6 @@ +[% scripts.push( + version('/jslib/jquery-1.7.2.min.js'), + version('/cobrands/zurich/validation_rules.js'), + '//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js', + version('/cobrands/zurich/js.js'), +) %] diff --git a/templates/web/zurich/header.html b/templates/web/zurich/header.html index 0ab051aa7..117e44449 100644 --- a/templates/web/zurich/header.html +++ b/templates/web/zurich/header.html @@ -10,13 +10,7 @@ <meta name="HandHeldFriendly" content="true"> <meta name="mobileoptimized" content="0"> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/base.css') %]"> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]" media="screen and (min-width:48em)"> - [% extra_css %] - <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]"> - <![endif]--> - + [% INCLUDE 'header/css.html' %] <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/redmond/jquery-ui.css"> [% INCLUDE 'common_header_tags.html' %] diff --git a/templates/web/zurich/maps/zurich.html b/templates/web/zurich/maps/zurich.html index a9499f657..4000e1e52 100644 --- a/templates/web/zurich/maps/zurich.html +++ b/templates/web/zurich/maps/zurich.html @@ -1,13 +1,3 @@ -[% -map_js = [ - version('/vendor/OpenLayers/OpenLayers.zurich.js'), - version('/js/OpenLayers.Projection.CH1903Plus.js'), - version('/js/map-OpenLayers.js'), - version('/js/map-wmts-base.js'), - version('/js/map-wmts-zurich.js'), -] -%] - [% map_sub_links = BLOCK %] <a class="hidden-nojs" id="map_layer_toggle" href="">Stadtplan</a> [% END %] diff --git a/templates/web/zurich/report/new/fill_in_details_form.html b/templates/web/zurich/report/new/fill_in_details_form.html index 77d764950..fd21e0fff 100644 --- a/templates/web/zurich/report/new/fill_in_details_form.html +++ b/templates/web/zurich/report/new/fill_in_details_form.html @@ -50,11 +50,11 @@ [% PROCESS "report/new/category_wrapper.html" %] - <label for="form_email">[% loc('Your email') %]</label> - [% IF field_errors.email %] - <p class='form-error'>[% field_errors.email %]</p> + <label for="form_username">[% loc('Your email') %]</label> + [% IF field_errors.username %] + <p class='form-error'>[% field_errors.username %]</p> [% END %] - <input class="form-control" type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" required> + <input class="form-control" type="email" value="[% report.user.email | html %]" name="username" id="form_username" placeholder="[% loc('Please enter your email address') %]" required> <label for="form_name">[% loc('Name') %] [% loc('(optional)') %]</label> [% IF field_errors.name %] diff --git a/templates/web/zurich/reports/index.html b/templates/web/zurich/reports/index.html index 8bec64c86..1389c666c 100755 --- a/templates/web/zurich/reports/index.html +++ b/templates/web/zurich/reports/index.html @@ -1,8 +1,8 @@ [% PROCESS "maps/${map.type}.html"; + SET bodyclass = 'mappage'; INCLUDE 'header.html', - title = loc('Summary reports'), - bodyclass = 'mappage'; + title = loc('Summary reports'); %] [% map_html %] </div> |