diff options
Diffstat (limited to 'templates/web/oxfordshire')
-rw-r--r-- | templates/web/oxfordshire/around/_report_banner.html | 10 | ||||
-rw-r--r-- | templates/web/oxfordshire/around/around_map_list_items.html | 0 | ||||
-rw-r--r-- | templates/web/oxfordshire/around/extra_text.html | 2 | ||||
-rw-r--r-- | templates/web/oxfordshire/around/on_map_list_items.html | 11 | ||||
-rw-r--r-- | templates/web/oxfordshire/around/tabbed_lists.html | 5 | ||||
-rw-r--r-- | templates/web/oxfordshire/header.html | 108 | ||||
-rw-r--r-- | templates/web/oxfordshire/js/translation_strings.html | 40 | ||||
-rw-r--r-- | templates/web/oxfordshire/my/_problem-list.html | 25 | ||||
-rw-r--r-- | templates/web/oxfordshire/report/_council_sent_info.html | 36 | ||||
-rw-r--r-- | templates/web/oxfordshire/report/_main.html | 98 | ||||
-rw-r--r-- | templates/web/oxfordshire/reports/_list-entry.html | 6 | ||||
-rw-r--r-- | templates/web/oxfordshire/reports/_list-filters.html | 32 |
12 files changed, 256 insertions, 117 deletions
diff --git a/templates/web/oxfordshire/around/_report_banner.html b/templates/web/oxfordshire/around/_report_banner.html new file mode 100644 index 000000000..52a869262 --- /dev/null +++ b/templates/web/oxfordshire/around/_report_banner.html @@ -0,0 +1,10 @@ +<h1 class="big-green-banner"> + [% loc( 'Click map to report a problem' ) %] +</h1> +<div class="click-the-map"> + <h2>[% loc( 'Have you found a problem here?' ) %]</h2> + <p>Click on the map to report it</p> +</div> +<a id="skip-this-step" href="[% url_skip %]" rel="nofollow"> + [% loc("Can't see the map? <em>Skip this step</em>") %] +</a> diff --git a/templates/web/oxfordshire/around/around_map_list_items.html b/templates/web/oxfordshire/around/around_map_list_items.html new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/templates/web/oxfordshire/around/around_map_list_items.html diff --git a/templates/web/oxfordshire/around/extra_text.html b/templates/web/oxfordshire/around/extra_text.html index 439bf00a2..107d3324f 100644 --- a/templates/web/oxfordshire/around/extra_text.html +++ b/templates/web/oxfordshire/around/extra_text.html @@ -1,5 +1,3 @@ <div class="extra-text"> <p>Please do not use this form for reporting <a href="/faq#pothole" target="_blank">emergencies and urgent problems</a>.</p> - - <p><img src="/i/pin-yellow.png" class="extra-text__image" width="48" height="64" /> - <b>these are problems that have already been reported</b>.<br>Click them to see more details.</p> </div> diff --git a/templates/web/oxfordshire/around/on_map_list_items.html b/templates/web/oxfordshire/around/on_map_list_items.html new file mode 100644 index 000000000..893f5c698 --- /dev/null +++ b/templates/web/oxfordshire/around/on_map_list_items.html @@ -0,0 +1,11 @@ +[% all_reports = on_map.merge(around_map) %] +[% IF all_reports.size %] + [% FOREACH problem IN all_reports %] + [% UNLESS problem.title; problem = problem.problem; END %] + [% INCLUDE "reports/_list-entry.html" %] + [% END %] +[% ELSE %] + <li class="empty"> + <p>[% loc('There are no reports to show.') %]</p> + </li> +[% END %] diff --git a/templates/web/oxfordshire/around/tabbed_lists.html b/templates/web/oxfordshire/around/tabbed_lists.html new file mode 100644 index 000000000..0d7dfddfc --- /dev/null +++ b/templates/web/oxfordshire/around/tabbed_lists.html @@ -0,0 +1,5 @@ +[% INCLUDE "reports/_list-filters.html" %] + +<ul class="report-list" id="current"> + [% INCLUDE "around/on_map_list_items.html" %] +</ul> diff --git a/templates/web/oxfordshire/header.html b/templates/web/oxfordshire/header.html index 19bb23374..0bbdaf353 100644 --- a/templates/web/oxfordshire/header.html +++ b/templates/web/oxfordshire/header.html @@ -24,73 +24,59 @@ <script src="[% start %][% version('/cobrands/oxfordshire/position_map.js') %]" charset="utf-8"></script> [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] [% extra_js %] - + [% INCLUDE 'tracking_code.html' %] </head> <body class="[% bodyclass | html IF bodyclass %]"> <div id="oxford-wrapper"> - <div id="oxford-header" class="desk-only oxford-left"> - <a href="http://www.oxfordshire.gov.uk/" title="Home" class="logo">Oxfordshire County Council<span></span></a> - <span id="oxford-links"> - <a href="http://www.oxfordshire.gov.uk/" title="">Oxfordshire County Council home</a> - </span> - <div style="clear:both"></div> - <span class="header"><a href="/">Report a road or street problem</a></span> - <div class="oxford-user"> - <p> - [% IF c.user_exists %] - [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] - <a href="/auth/sign_out">[% loc('sign out') %]</a> - [% END %] - </p> - </div> - - - <div id="navigation"> - <div class="menubar"> - <div class="menu-inner"> - <ul class="menu"> - <li> - <[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %]>[% "Report" %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]> - </li> - <li> - <[% IF c.req.uri.path == '/my' OR ( c.req.uri.path == '/auth' AND c.req.params.r == 'my' ) %]span[% ELSE %]a href="/my"[% END - %]>[% loc("Your reports") %]</[% ( c.req.uri.path == '/my' OR ( c.req.uri.path == '/auth' AND c.req.params.r == 'my' ) ) ? 'span' : 'a' %]> - </li> - <li> - <[% IF c.req.uri.path == '/reports/Oxfordshire' %]span[% ELSE %]a href="/reports/Oxfordshire"[% END - %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]> - </li> - <li> - <[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END - %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]> - </li> - <li> - <[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END - %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]> - </li> - </ul> - </div> + <div id="oxford-header" class="desk-only oxford-left"> + <a href="http://www.oxfordshire.gov.uk/" title="Home" class="logo">Oxfordshire County Council<span></span></a> + <span id="oxford-links"> + <a href="http://www.oxfordshire.gov.uk/" title="">Oxfordshire County Council home</a> + </span> + <div style="clear:both"></div> + <span class="header"><a href="/">Report a road or street problem</a></span> + + [% IF c.user_exists %] + <div class="oxford-user"> + <p> + [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + <a href="/auth/sign_out">[% loc('Sign out') %]</a> + </p> + </div> + [% END %] + + <div id="navigation"> + <div class="menubar"> + <div class="menu-inner"> + <ul class="menu"> + <li> + <[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %]>[% "Report" %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]> + </li> + <li> + <[% IF c.req.uri.path == '/my' OR ( c.req.uri.path == '/auth' AND c.req.params.r == 'my' ) %]span[% ELSE %]a href="/my"[% END + %]>[% loc("Your reports") %]</[% ( c.req.uri.path == '/my' OR ( c.req.uri.path == '/auth' AND c.req.params.r == 'my' ) ) ? 'span' : 'a' %]> + </li> + <li> + <[% IF c.req.uri.path == '/reports/Oxfordshire' %]span[% ELSE %]a href="/reports/Oxfordshire"[% END + %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]> + </li> + <li> + <[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END + %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]> + </li> + <li> + <[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END + %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]> + </li> + </ul> + </div> </div> </div> - - - - - </div> <!-- end of oxford header --> -<!-- - <div id="oxford-main-menu" class="desk-only"> - <ul class="tabs"> - <li class="home first"></li>[% - %]<li></li>[% - %]<li></li>[% - %]<li></li>[% - %]<li class="last"></li> - </ul> - </div> ---> - + + </div> <!-- end of oxford header --> + <div class="wrapper"> <div class="table-cell"> @@ -104,7 +90,7 @@ [% IF c.user_exists %] <div id="user-meta"> <p> - [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] <a href="/auth/sign_out">[% loc('sign out') %]</a> </p> </div> diff --git a/templates/web/oxfordshire/js/translation_strings.html b/templates/web/oxfordshire/js/translation_strings.html deleted file mode 100644 index e326da0a8..000000000 --- a/templates/web/oxfordshire/js/translation_strings.html +++ /dev/null @@ -1,40 +0,0 @@ - translation_strings = { - update: '[% loc('Please enter a message') | replace("'", "\\'") %]', - title: '[% loc('Please enter a subject') | replace("'", "\\'") %]', - detail: '[% loc('Please enter some details') | replace("'", "\\'") %]', - name: { - required: '[% loc('Please enter your name') | replace("'", "\\'") %]', - validName: '[% loc('Please enter your full name, councils need this information – if you do not wish your name to be shown on the site, untick the box below') | replace("'", "\\'") %]' - }, - category: '[% loc('Please choose a category') | replace("'", "\\'") %]', - rznvy: { - required: '[% loc('Please enter your email') | replace("'", "\\'") %]', - email: '[% loc('Please enter a valid email') | replace("'", "\\'") %]' - }, - email: { - required: '[% loc('Please enter your email') | replace("'", "\\'") %]', - email: '[% loc('Please enter a valid email') | replace("'", "\\'") %]' - }, - 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("'", "\\'") %]', - home: '[% loc('Home') | replace("'", "\\'") %]', - back: '[% loc('Back') | replace("'", "\\'") %]', - how_to_send: '[% loc('How to send successful reports') | replace("'", "\\'") %]', - more_details: '[% loc('Details') | replace("'", "\\'") %]', - - geolocation_declined: '[% loc('You declined; please fill in the box above') | replace("'", "\\'") %]', - geolocation_no_position: '[% loc('Could not look up location') | replace("'", "\\'") %]', - geolocation_no_result: '[% loc('No result returned') | replace("'", "\\'") %]', - geolocation_unknown: '[% loc('Unknown error') | replace("'", "\\'") %]', - - reporting_a_problem: '[% loc('Reporting a problem') | replace("'", "\\'") %]', - ok: '[% loc('OK') | replace("'", "\\'") %]', - map: '[% loc('MAP') | replace("'", "\\'") %]', - - report_problem_heading: '[% loc('Click on the map to report a problem') | replace("'", "\\'") %]' - }; diff --git a/templates/web/oxfordshire/my/_problem-list.html b/templates/web/oxfordshire/my/_problem-list.html new file mode 100644 index 000000000..1ff69f9fb --- /dev/null +++ b/templates/web/oxfordshire/my/_problem-list.html @@ -0,0 +1,25 @@ +<ul class='issue-list-a full-width'> + [% IF problems.all %] + [% FOREACH p = problems.all %] + [% INCLUDE 'reports/_list-entry.html', problem = p, no_fixed =1 %] + [% END %] + [% ELSE %] + <li class="empty"> + <p>[% loc('There are no reports to show.') %]</p> + </li> + [% END %] +</ul> + +[% IF ! problems.size %] +<!-- Preserve behaviour of map filters despite map not being shown --> +<script type="text/javascript"> + (function($) { + $(function() { + $(".report-list-filters [type=submit]").hide(); + $(".report-list-filters select").change(function() { + $(this).closest("form").submit(); + }); + }) + })(window.jQuery); +</script> +[% END %] diff --git a/templates/web/oxfordshire/report/_council_sent_info.html b/templates/web/oxfordshire/report/_council_sent_info.html index 464c10256..499fd4637 100644 --- a/templates/web/oxfordshire/report/_council_sent_info.html +++ b/templates/web/oxfordshire/report/_council_sent_info.html @@ -1,16 +1,24 @@ [% IF problem.whensent || problem.can_display_external_id %] - <small class="council_sent_info"><br> - [% IF problem.whensent %] - [% problem.duration_string(c) %]<br> - [% END %] - <strong> - [% IF problem.can_display_external_id %] - [% IF problem.whensent %] - Council ref: [% problem.external_id %] - [% ELSE %] - [% problem.external_body %] ref: [% problem.external_id %] - [% END %] - [% END %] - </strong> - </small> + <div class="council_info_box"> + [% IF problem.can_display_external_id %] + <h3> + [% IF problem.whensent %] + Council ref: [% problem.external_id %] + [% ELSE %] + [% problem.external_body %] ref: [% problem.external_id %] + [% END %] + </h3> + [% END %] + + [% IF c.cobrand.problem_response_days(problem) > 0 %] + <p> + Problems in the + [% problem.category %] + category are generally responded to within + [% c.cobrand.problem_response_days(problem) %] + working days. + </p> + [% END %] + + </div> [% END %] diff --git a/templates/web/oxfordshire/report/_main.html b/templates/web/oxfordshire/report/_main.html new file mode 100644 index 000000000..3bb786141 --- /dev/null +++ b/templates/web/oxfordshire/report/_main.html @@ -0,0 +1,98 @@ +[% moderating = c.user && c.user.has_permission_to('moderate', problem.bodies_str) %] + +[% IF moderating %] +[%# TODO: extract stylesheet! %] +<style> + .moderate-edit label { + display: inline-block; + height: 1em; + margin-top: 0; + } + + .moderate-edit input { + display: inline-block; + } + + .moderate-edit { display: none } + .moderate-edit :disabled { + background: #ddd; + } + br { + line-height: 0.5em; + } +</style> +[% END %] + +<div class="problem-header cf" problem-id="[% problem.id %]"> + [% IF moderating %] + [% original = problem.moderation_original_data %] + <form method="post" action="/moderate/report/[% problem.id %]"> + <input type="button" class="btn moderate moderate-display" value="moderate"> + <div class="moderate-edit"> + <input type="checkbox" class="hide-document" name="problem_hide"> + <label for="problem_hide">Hide report completely?</label> + <br /> + <input type="checkbox" name="problem_show_name" [% problem.anonymous ? '' : 'checked' %]> + <label for="problem_show_name">Show name publicly?</label> + [% IF problem.photo or original.photo %] + <br /> + <input type="checkbox" name="problem_show_photo" [% problem.photo ? 'checked' : '' %]> + <label for="problem_show_photo">Show Photo?</label> + [% END %] + </div> + [% END %] + <h1 class="moderate-display">[% problem.title | html %]</h1> + [% IF moderating %] + <div class="moderate-edit"> + [% IF problem.title != original.title %] + <input type="checkbox" name="problem_revert_title" class="revert-title"> + <label for="problem_revert_title">Revert to original title</label> + [% END %] + <h1><input type="text" name="problem_title" value="[% problem.title | html %]"></h1> + </div> + [% END %] + + <p class="report_meta_info"> + [% problem.meta_line(c) | html %] + [%- IF !problem.used_map AND c.cobrand.moniker != 'emptyhomes' %]; <strong>([% loc('there is no pin shown as the user did not use the map') %])</strong>[% END %] + </p> + [% IF problem.whensent %] + <p class="council_sent_info">[% problem.duration_string(c) %]</p> + [% END %] + [% mlog = problem.latest_moderation_log_entry(); IF mlog %] + <p>Moderated by [% mlog.user.from_body.name %] at [% prettify_dt(mlog.whenedited) %]</p> + [% END %] + + [% INCLUDE 'report/_support.html' %] + + [% INCLUDE 'report/photo.html' object=problem %] + <div class="moderate-display"> + [% add_links( problem.detail ) | html_para %] + </div> + + [% IF moderating %] + <div class="moderate-edit"> + [% IF problem.detail != original.detail %] + <input type="checkbox" name="problem_revert_detail" class="revert-textarea"> + <label for="problem_revert_detail">Revert to original text</label> + [% END %] + <textarea name="problem_detail">[% add_links( problem.detail ) %]</textarea> + </div> + + <div class="moderate-edit"> + <label for="moderation_reason">Moderation reason:</label> + <input type="text" name="moderation_reason" placeholder="Describe why you are moderating this"> + <input type="submit" class="red-btn" value="Moderate it"> + <input type="button" class="btn cancel" value="cancel"> + </div> + </form> + [% END %] + + [% IF problem.bodies_str %] + [% INCLUDE 'report/_council_sent_info.html' %] + [% ELSE %] + <div class="council_info_box"> + <p>[% loc('Not reported to council') %]</p> + </div> + [% END %] +</div> diff --git a/templates/web/oxfordshire/reports/_list-entry.html b/templates/web/oxfordshire/reports/_list-entry.html new file mode 100644 index 000000000..cd70410d3 --- /dev/null +++ b/templates/web/oxfordshire/reports/_list-entry.html @@ -0,0 +1,6 @@ +<li class="[% c.cobrand.pin_colour(problem) %]"> + <a href="[% c.uri_for('/report', problem.id ) %]" class="[% problem.category %]"> + <h3>[% problem.title | html %]</h3> + <p>Reported [%- prettify_dt( problem.confirmed, 1 ) %]</p> + </a> +</li> diff --git a/templates/web/oxfordshire/reports/_list-filters.html b/templates/web/oxfordshire/reports/_list-filters.html new file mode 100644 index 000000000..5d610261b --- /dev/null +++ b/templates/web/oxfordshire/reports/_list-filters.html @@ -0,0 +1,32 @@ +[% IF use_section_wrapper %] +<section class="full-width"> + <form method="get" action=""> +[% END %] + + <p class="report-list-filters"> + <label> + Show + <select name="status" id="statuses"> + <option value="all"[% ' selected' IF filter_status == 'all' %]>all reports</option> + <option value="open"[% ' selected' IF filter_status == 'open' %]>unfixed reports</option> + <option value="fixed"[% ' selected' IF filter_status == 'fixed' %]>fixed reports</option> + </select> + </label> + <label> + about + <select name="filter_category" id="filter_categories"> + <option value="">Everything</option> + [% FOR category IN filter_categories %] + <option value="[% category | html %]"[% ' selected' IF filter_category == category %]> + [% category | html %] + </option> + [% END %] + </select> + </label> + <input type=submit value="Go" /> + </p> + +[% IF use_section_wrapper %] + </form> +</section> +[% END %] |