diff options
Diffstat (limited to 'templates')
25 files changed, 192 insertions, 100 deletions
diff --git a/templates/email/rutland/_email_color_overrides.html b/templates/email/rutland/_email_color_overrides.html new file mode 100644 index 000000000..12ec97bc3 --- /dev/null +++ b/templates/email/rutland/_email_color_overrides.html @@ -0,0 +1,21 @@ +[% + +color_rutland_dark_green = '#265123' +color_rutland_mid_green = '#A7B980' +color_rutland_pale_green = '#DCE6C9' +color_rutland_dark_grey = '#3C3C3C' + +body_font_family = "'PT Sans', Verdana, sans-serif" + +header_background_color = color_rutland_mid_green +header_text_color = color_black + +secondary_column_background_color = color_rutland_pale_green + +button_background_color = color_rutland_dark_green +button_text_color = color_white + +logo_width = "150" # pixel measurement, but without 'px' suffix +logo_height = "77" # pixel measurement, but without 'px' suffix + +%] diff --git a/templates/email/warwickshire/archive.txt b/templates/email/warwickshire/archive.txt new file mode 100644 index 000000000..51ad37453 --- /dev/null +++ b/templates/email/warwickshire/archive.txt @@ -0,0 +1,26 @@ +Subject: Your reports on Warwickshire FixMyStreet + +Hello [% user.name %], + +FixMyStreet is being updated in Warwickshire to improve how problems get fixed. + +As part of these updates, we are closing old reports that appear to be resolved but remain open in the system. + +We noticed that you have [% report_count %] old [% nget('report', 'reports', report_count) %] on the system, which we've listed below. + +If your report is no longer an issue, you don't need to do anything. + +If you believe that your report is still a problem, you can reopen it by clicking or copying and pasting +the link marked 'View report' by a report and leaving an update. + +[% FOR report IN reports %] + +[% report.title %] + +Reported [% report.time_ago %] ago. + +View report: [% cobrand.base_url_for_report( report ) %][% report.tokenised_url( user, { reopen => 'true' } ) %]#update_form + +---- + +[% END %] diff --git a/templates/web/base/admin/bodies.html b/templates/web/base/admin/bodies.html index 9bd85940b..eab0f4c49 100644 --- a/templates/web/base/admin/bodies.html +++ b/templates/web/base/admin/bodies.html @@ -20,7 +20,7 @@ </p> [% END %] - <table cellspacing="0" cellpadding="2" border="1"> + <table cellspacing="0" cellpadding="2" border="1" id="admin_bodies"> <tr> <th>[% loc('Name') %]</th> [% IF c.cobrand.moniker == 'zurich' %] diff --git a/templates/web/base/admin/list_updates.html b/templates/web/base/admin/list_updates.html index d759a2354..4b8b26d3c 100644 --- a/templates/web/base/admin/list_updates.html +++ b/templates/web/base/admin/list_updates.html @@ -39,7 +39,11 @@ <br>[% loc('Confirmed:') %] [% PROCESS format_time time=update.confirmed %] </small></td> <td>[% update.text | html %]</td> - <td><a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a></td> + <td> + [% IF c.user.has_permission_to('report_edit', update.problem.bodies_str_ids) %] + <a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a> + [% END %] + </td> </tr> [% END -%] </table> diff --git a/templates/web/base/admin/open311-form-fields.html b/templates/web/base/admin/open311-form-fields.html index d1067205c..6e6eb96f0 100644 --- a/templates/web/base/admin/open311-form-fields.html +++ b/templates/web/base/admin/open311-form-fields.html @@ -49,6 +49,17 @@ </p> [% IF show_body_fields %] + <div class="admin-hint"> + <p> + [% loc( + "Enabling this will suppress the error message that is normally emitted when an update has no description" + ) %] + </p> + </div> + <p> + <input type="checkbox" id="blank_updates_permitted" name="blank_updates_permitted"[% ' checked' IF object.blank_updates_permitted %]> + <label for="blank_updates_permitted" class="inline">[% loc('Permit blank updates') %]</label> + </p> [%# These fields aren't shown for contacts %] <div class="admin-hint"> <p> @@ -68,6 +79,21 @@ <div class="admin-hint"> <p> [% loc( + "Enable <strong>Open311 problem-fetching</strong> if you want to display reports created at + the endpoint to FixMyStreet. If you're not sure, you probably do not, so leave this unchecked. + For more information, see + <a href='https://www.mysociety.org/2013/02/20/open311-extended/' class='admin-offsite-link'>this article</a>." + ) %] + </p> + </div> + <p> + <input type="checkbox" id="fetch_problems" name="fetch_problems"[% ' checked' IF object.fetch_problems %]> + <label for="fetch_problems" class="inline">[% loc('Use Open311 problem fetching') %]</label> + </p> + + <div class="admin-hint"> + <p> + [% loc( "If you've enabled Open311 update-sending above, you must identify which FixMyStreet <strong>user</strong> will be attributed as the creator of those updates when they are shown on the site. Enter the ID (number) of that user." diff --git a/templates/web/base/admin/problem_row.html b/templates/web/base/admin/problem_row.html index 446e94d66..99142af4e 100644 --- a/templates/web/base/admin/problem_row.html +++ b/templates/web/base/admin/problem_row.html @@ -38,6 +38,10 @@ [%- IF problem.is_closed %]<br>[% prettify_state('closed') %]: [% PROCESS format_time time=problem.lastupdate %][% END -%] [%- IF problem.is_open %]<br>[% loc('Last update:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%] </small></td> - <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td> + <td> + [% IF c.user.has_permission_to('report_edit', problem.bodies_str_ids) %] + <a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a> + [% END %] + </td> </tr> [%- END -%] diff --git a/templates/web/base/admin/report-category.html b/templates/web/base/admin/report-category.html index a2290089b..2d9ffcdb1 100644 --- a/templates/web/base/admin/report-category.html +++ b/templates/web/base/admin/report-category.html @@ -4,9 +4,9 @@ <option selected value="[% problem.category | html %]">[% (problem.category_display OR '-') | html %]</option> </optgroup> [% END %] - [% IF category_options_copy.size %] + [% IF category_options.size %] <optgroup label="[% loc('Available categories') %]"> - [% FOREACH cat IN category_options_copy %] + [% FOREACH cat IN category_options %] <option value="[% cat.name | html %]"[% ' selected' IF problem.category == cat.name %]>[% cat.value | html %]</option> [% END %] </optgroup> diff --git a/templates/web/base/footer.html b/templates/web/base/footer.html index e2bdbb01a..e2bdbb01a 100644..100755 --- a/templates/web/base/footer.html +++ b/templates/web/base/footer.html diff --git a/templates/web/base/report/_inspect.html b/templates/web/base/report/_inspect.html index 111e71283..6923dbb1a 100644 --- a/templates/web/base/report/_inspect.html +++ b/templates/web/base/report/_inspect.html @@ -58,7 +58,7 @@ [% INCLUDE 'admin/report-category.html' %] </p> - [% FOREACH category IN category_options_copy %] + [% FOREACH category IN category_options %] [% cat_name = category.name; cat_prefix = cat_name | lower | replace('[^a-z]', ''); cat_prefix = "category_" _ cat_prefix _ "_" %] diff --git a/templates/web/base/report/new/category_extras_fields.html b/templates/web/base/report/new/category_extras_fields.html index ca5cb1461..cf5cc37b4 100644 --- a/templates/web/base/report/new/category_extras_fields.html +++ b/templates/web/base/report/new/category_extras_fields.html @@ -1,7 +1,7 @@ [%- FOR meta IN metas %] [%- meta_name = meta.code -%] - [% IF c.cobrand.category_extra_hidden(meta_name) AND NOT show_hidden %] + [% IF c.cobrand.category_extra_hidden(meta) AND NOT show_hidden %] <input type="hidden" value="[% report_meta.$meta_name.value | html %]" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"> @@ -14,6 +14,7 @@ [% IF meta.variable != 'false' %] [% IF meta.exists('values') %] <select class="form-control" name="[% cat_prefix %][% meta_name %]" id="[% cat_prefix %]form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> + <option value="">[% loc('-- Pick an option --') %]</option> [% FOR option IN meta.values %] <option value="[% option.key %]"[% IF option.key == report_meta.$meta_name.value %] selected[% END %]>[% option.name %]</option> [% END %] diff --git a/templates/web/rutland/front/footer-marketing.html b/templates/web/rutland/front/footer-marketing.html new file mode 100755 index 000000000..7d998eba6 --- /dev/null +++ b/templates/web/rutland/front/footer-marketing.html @@ -0,0 +1,8 @@ + <div class="tablewrapper bordered footer-marketing"> + <p> + [% loc('') %] + </p> + <p> + [% loc('Powered by <a class="platform-logo" href="http://fixmystreet.org/">FixMyStreet Platform</a>') %] + </p> + </div> diff --git a/templates/web/rutland/site-name.html b/templates/web/rutland/site-name.html new file mode 100755 index 000000000..62188c84a --- /dev/null +++ b/templates/web/rutland/site-name.html @@ -0,0 +1 @@ +Rutland County Council FixMyStreet diff --git a/templates/web/zurich/admin/body.html b/templates/web/zurich/admin/body.html index 468f7adff..11be6eef7 100644 --- a/templates/web/zurich/admin/body.html +++ b/templates/web/zurich/admin/body.html @@ -16,14 +16,16 @@ <th>[% loc('Last editor') %]</th> <th>[% loc('Note') %]</th> <th>[% loc('When edited') %]</th> + <th>Kürzel</th> </tr> [% WHILE ( cat = contacts.next ) %] - <tr[% IF cat.deleted %] class="is-deleted"[% END %]> + <tr[% IF cat.state == 'deleted' %] class="is-deleted"[% END %]> <td><a href="[% c.uri_for( 'body', body_id, cat.category ) %]">[% cat.category_display %]</a></td> <td>[% cat.email | html %]</td> <td>[% cat.editor %]</td> <td>[% cat.note | html %]</td> <td>[% PROCESS format_date this_date=cat.whenedited %]</td> + <td>[% cat.get_extra_metadata('abbreviation') %]</td> </tr> [% END %] </table> @@ -37,31 +39,7 @@ </div> [% END %] - <form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - - <p> - <strong>[% loc('Category:') %] </strong> - <input type="text" class="form-control" name="category" size="30" value="[% contact.category | html %]"> - </p> - - <p> - <strong>[% loc('Email:') %] </strong> - <input type="text" class="form-control" name="email" size="30" value="[% contact.email | html %]"> - </p> - - <input type="hidden" name="confirmed" value="1" id="confirmed"> - - <p> - <strong>[% loc('Note:') %] </strong> - <textarea class="form-control" name="note" rows="3" cols="40"></textarea> - </p> - - <p> - <input type="hidden" name="posted" value="new" > - <input type="hidden" name="token" value="[% csrf_token %]" > - <input type="submit" class="btn" name="Create category" value="[% errors ? loc('Save changes') : loc('Create category') %]"> - </p> - </form> + [% INCLUDE 'admin/contact-form.html' %] [% END %] diff --git a/templates/web/zurich/admin/contact-form.html b/templates/web/zurich/admin/contact-form.html index 236b169d0..064eba3f0 100644 --- a/templates/web/zurich/admin/contact-form.html +++ b/templates/web/zurich/admin/contact-form.html @@ -1,11 +1,24 @@ <form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8" id="category_edit"> - <p><strong>[% loc('Category:') %] </strong>[% contact.category_display | html %] + + [% IF contact.in_storage %] + <h1>[% contact.category_display | html %]</h1> <input type="hidden" name="category" value="[% contact.category | html %]" > - <input type="hidden" name="token" value="[% csrf_token %]" > + [% ELSE %] + <p> + <strong>[% loc('Category:') %] </strong> + <input type="text" class="form-control" name="category" size="30" value="[% contact.category | html %]" required> + </p> + [% END %] + + <p> + <strong>Kürzel</strong> + <input type="text" class="form-control" name="extra[abbreviation]" id="abbreviation" size="30" value="[% contact.get_extra_metadata('abbreviation') | html %]"> + </p> <p><strong>[% loc('Email:') %] </strong> <input type="text" class="form-control" name="email" value="[% contact.email | html %]" size="30"> + [% IF contact.in_storage %] <p> <label for="state">[% loc('State') %]</label> <select name="state" id="state"> @@ -15,9 +28,15 @@ <input type="checkbox" name="photo_required" value="1" id="photo_required"[% ' checked' IF contact.get_extra_metadata('photo_required') %]> <label class="inline" for="photo_required">[% loc('Photo required') %]</label> </p> + [% ELSE %] + <input type="hidden" name="confirmed" value="1" id="confirmed"> + [% END %] <p><strong>[% loc('Note:') %] </strong><textarea class="form-control" name="note" rows="3" cols="40"></textarea> <input type="hidden" name="posted" value="new"> - <p><input type="submit" class="btn" name="Save changes" value="[% loc('Save changes') %]"> + <input type="hidden" name="token" value="[% csrf_token %]" > + <p><input type="submit" class="btn" name="Create category" value="[% contact.in_storage ? loc('Save changes') : loc('Create category') %]"> + </p> + </form> diff --git a/templates/web/zurich/admin/header.html b/templates/web/zurich/admin/header.html index 40847f190..91ac24faa 100644 --- a/templates/web/zurich/admin/header.html +++ b/templates/web/zurich/admin/header.html @@ -1,20 +1,6 @@ [% SET bodyclass = bodyclass || 'fullwidthpage'; INCLUDE 'header.html' admin = 1, bodyclass = bodyclass _ ' admin'; - - states = { - 'unconfirmed' = loc('Submitted'), - 'confirmed' = loc('Open'), - 'in progress' = loc('In progress'), - 'planned' = loc('Planned'), - 'fixed - council' = loc('Closed'), - 'hidden' = loc('Hidden'), - 'closed' = loc('Extern'), - 'partial' = loc('Not contactable'), - 'investigating' = loc('Wish'), - 'unable to fix' = loc('Jurisdiction unknown'), - 'fixed - council' = loc('Closed'), - } %] <style type="text/css"> .adminhidden { color: #666666; } diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html index e0b62d5d2..4d77cf264 100644 --- a/templates/web/zurich/admin/index-dm.html +++ b/templates/web/zurich/admin/index-dm.html @@ -4,10 +4,10 @@ [% status_message %] <h2 id="submitted">[% loc('Submitted') %]</h2> -[% INCLUDE list, problems = unconfirmed.all, hash = 'submitted' %] +[% INCLUDE list, problems = submitted.all, hash = 'submitted' %] -<h2 id="planned">[% loc('Planned') %]</h2> -[% INCLUDE list, problems = approval.all, hash = 'planned' %] +<h2 id="feedback_pending">Rückmeldung ausstehend</h2> +[% INCLUDE list, problems = approval.all, hash = 'feedback_pending' %] <h2 id="alle">[% loc('All reports') %]</h2> [% INCLUDE list, problems = other.all, include_subdiv = 1, hash = 'alle' %] diff --git a/templates/web/zurich/admin/index-sdm.html b/templates/web/zurich/admin/index-sdm.html index 707bb2d9d..68a2fcf62 100644 --- a/templates/web/zurich/admin/index-sdm.html +++ b/templates/web/zurich/admin/index-sdm.html @@ -5,7 +5,7 @@ [% INCLUDE list, problems = reports_new.all, hash = 'new' %] <h2 id="wait">[% loc('Reports awaiting approval') %]</h2> -[% INCLUDE list, problems = reports_unpublished.all, no_edit = 1, hash = 'wait' %] +[% INCLUDE list, problems = reports_unpublished.all, hash = 'wait' %] <h2 id="alle">[% loc('Reports published') %]</h2> [% INCLUDE list, problems = reports_published.all, no_edit = 1, hash = 'alle' %] diff --git a/templates/web/zurich/admin/index.html b/templates/web/zurich/admin/index.html index fb3609bb3..62cd1a52c 100644 --- a/templates/web/zurich/admin/index.html +++ b/templates/web/zurich/admin/index.html @@ -9,8 +9,7 @@ <h2>[% loc('Problem breakdown by state') %]</h2> <ul> [% FOREACH state IN problems.keys.sort %] - [% NEXT IF NOT states.$state %] - <li>[% problems.$state %] [% states.$state %]</li> + <li>[% problems.$state %] [% prettify_state(state) %]</li> [% END %] </ul> diff --git a/templates/web/zurich/admin/problem_row.html b/templates/web/zurich/admin/problem_row.html index a83e22b27..973d9f651 100644 --- a/templates/web/zurich/admin/problem_row.html +++ b/templates/web/zurich/admin/problem_row.html @@ -18,9 +18,10 @@ <td>[% PROCESS value_or_nbsp value=problem.category_display %]</td> <td>[% PROCESS format_date this_date=problem.created %]</td> <td>[% PROCESS format_date this_date=problem.lastupdate %]</td> - <td> [% states.${problem.state} %][% IF problem.state == 'planned'; + <td>[% prettify_state(problem.state) %] + [% IF problem.state == 'feedback pending'; SET cs=problem.get_extra_metadata('closure_status'); - IF cs %] ([% states.$cs %]) [% END; END %]</td> + IF cs %] ([% prettify_state(cs) %]) [% END; END %]</td> [% IF include_subdiv %] <td> diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html index 0319fc565..d07629d01 100644 --- a/templates/web/zurich/admin/report_edit-sdm.html +++ b/templates/web/zurich/admin/report_edit-sdm.html @@ -73,7 +73,7 @@ <dd>[% problem.category_display | html %]</dd> <dt class="print-only">[% loc('State:') %] <!-- Status --></dt> - <dd class="print-only">[% states.${problem.state} %]</dd> + <dd class="print-only">[% prettify_state(problem.state) %]</dd> <dt>[% loc('Time spent (in minutes):') %]</dt> <dd>[% problem.get_time_spent %]</dd> @@ -101,28 +101,28 @@ <div class="admin-report-edit admin-report-edit--interact"> -<p align="right" class="screen-only"><input type="submit" class="btn" name="send_back" value="[% loc('Not for my subdivision') %]"></p> -<p align="right" class="screen-only"><input type="submit" class="btn" name="not_contactable" value="[% loc('Customer not contactable') %]"></p> +<p align="right" class="screen-only"><input [% sdm_disabled %] type="submit" class="btn" name="send_back" value="[% loc('Not for my subdivision') %]"></p> +<p align="right" class="screen-only"><input [% sdm_disabled %] type="submit" class="btn" name="not_contactable" value="[% loc('Customer not contactable') %]"></p> <ul class="no-bullets screen-only"> <li> <label for="new_internal_note">[% loc('New internal note:') %]</label> - <textarea class="form-control" name='new_internal_note' id='new_internal_note' cols=60 rows=4></textarea> + <textarea [% sdm_disabled %] class="form-control" name='new_internal_note' id='new_internal_note' cols=60 rows=4></textarea> </li> <li> <label for="status_update">[% loc('New note to DM:') %]</label> - <textarea class="form-control" name='status_update' id='status_update' cols=60 rows=4></textarea> + <textarea [% sdm_disabled %] class="form-control" name='status_update' id='status_update' cols=60 rows=4></textarea> </li> </ul> <p class="screen-only"> <label for="time_spent">[% loc('Time spent (in minutes):') %]</label> - <input type="text" class="form-control" name="time_spent" id="form_time_spent" style="width: 4em" value="0"> + <input [% sdm_disabled %] type="text" class="form-control" name="time_spent" id="form_time_spent" style="width: 4em" value="0"> </p> <p class="clearfix screen-only"> - <input style="float:left" type="submit" class="btn" name="Submit changes" value="[% loc('Submit changes') %]" > - <input style="float:right" type="submit" class="btn" name="no_more_updates" value="[% loc('No further updates') %]"> + <input [% sdm_disabled %] style="float:left" type="submit" class="btn" name="Submit changes" value="[% loc('Submit changes') %]" > + <input [% sdm_disabled %] style="float:right" type="submit" class="btn" name="no_more_updates" value="[% loc('No further updates') %]"> </p> [% INCLUDE 'admin/list_updates.html' %] diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html index fd03fb044..ad14b2d45 100644 --- a/templates/web/zurich/admin/report_edit.html +++ b/templates/web/zurich/admin/report_edit.html @@ -27,7 +27,7 @@ <dd class="screen-only">» <a href="http://webgis.intra.stzh.ch/stapo/GoogleStreetView.asp?lat=[% problem.latitude %]&lon=[% problem.longitude %]" target="_blank">[% loc('Street View') %]</a></dd> - [% IF c.cobrand.problem_is_closed(problem) %] + [% IF problem.is_fixed || problem.is_closed || problem.is_hidden %] <dt><span class="mock-label">[% loc('Details:') %]</span></dt> <dd>[% problem.detail | html %]</dd> [% IF problem.extra.original_detail %] @@ -101,7 +101,7 @@ <dd>[% problem.category_display | html %]</dd> <dt class="print-only">[% loc('State:') %] <!-- Status --></dt> - <dd class="print-only">[% states_trans.${problem.state} %]</dd> + <dd class="print-only">[% prettify_state(problem.state) %]</dd> <dt>[% loc('Time spent (in minutes):') %]</dt> <dd>[% problem.get_time_spent %]</dd> @@ -154,7 +154,8 @@ <select class="form-control" name="state" id="state" data-pstate="[% pstate %]"> <option value="">--</option> [% FOREACH s IN states %] - <option [% 'selected ' IF s.state == pstate %] value="[% s.state %]">[% s.trans %]</option> + <option [% 'selected ' IF s.state == pstate %] value="[% s.state %]"> + [% IF s.trans; s.trans; ELSE; prettify_state(s.state); END %]</option> [% END %] </select> </dd> @@ -170,7 +171,8 @@ <select class="form-control" name="category" id="category"> <option value="">--</option> [% FOREACH cat IN category_options %] - <option value="[% cat.name %]">[% cat.value %]</option> + <option value="[% cat.name %]">[% cat.value ~%] + [% ' (' _ cat.abbreviation _ ')' IF cat.abbreviation %]</option> [% END %] </select> </div> @@ -195,15 +197,15 @@ </ul> -[% IF problem.state == 'planned' %] +[% IF problem.state == 'feedback pending' %] [%# 3rd party messages sent for Extern/Wunsch states %] [% SWITCH pstate %] - [% CASE ['closed','investigating'] %] + [% CASE ['external','wish'] %] <ul class="no-bullets screen-only"> <li class="assignation" id="assignation__external"> <span class="error hidden">[% loc('Please select a body.') %]</span> <label for="body_external"> - [% IF pstate == 'closed' %] + [% IF pstate == 'external' %] [% loc('Assign to external body:') %] [% ELSE %] [% loc('Assign to competent body:') %] @@ -218,7 +220,7 @@ </select> </li> <li> - [% IF pstate == 'closed' %] + [% IF pstate == 'external' %] <input type="checkbox" name="third_personal" id="third_personal" value="1"[% ' checked' IF problem.extra.third_personal %]> <label for="third_personal" class="inline">[% loc('Include reporter personal details') %]</label> [% END %] @@ -234,12 +236,11 @@ # (e.g. various pstates) %] <ul class="no-bullets screen-only"> <li id="status_update_container"><label for="status_update"> - [% SWITCH pstate %] - [% CASE ['hidden', 'investigating', 'partial'] %][%# Hidden/Wish/Not contactable %] - [% loc('Reply to user:') %] - [% CASE DEFAULT %] - [% loc('Public response:') %] - [% END %] + [% IF c.cobrand.zurich_user_response_states.$pstate %] + [% loc('Reply to user:') %] + [% ELSE %] + [% loc('Public response:') %] + [% END %] </label> [% INCLUDE 'admin/response_templates_select.html' for='status_update' %] <textarea class="form-control" name='status_update' id='status_update' cols=60 rows=5> @@ -252,7 +253,7 @@ <p align="right" class="screen-only"> [% IF show_publish_response %] [%# While we call this 'publish_response', the response will not actually - # be "published" for these cases: Wish / Hidden / Not contactable (for these, + # be "published" for these cases: Hidden / Not contactable (for these, # only a private email will be sent to the user. However, in all cases, # this is the end of processing, so we mark this with the same text used # for 'No further updates %] @@ -272,9 +273,9 @@ [% END %] [% SWITCH problem.state %] - [% CASE ['closed','investigating'] %] + [% CASE ['external','wish'] %] <h2> - [% IF problem.state == 'closed' %] + [% IF problem.state == 'external' %] [% loc('Message to external body:') %] [% ELSE %] [% loc('Message to competent body:') %] diff --git a/templates/web/zurich/admin/stats/index.html b/templates/web/zurich/admin/stats/index.html index ce8e238f7..9f2906d0a 100644 --- a/templates/web/zurich/admin/stats/index.html +++ b/templates/web/zurich/admin/stats/index.html @@ -2,14 +2,12 @@ [% PROCESS 'admin/report_blocks.html' %] [% USE date %] -<p style="float:right"><a href="[% c.uri_with( { export=1 } ) %]">[% loc('All Reports as CSV') %]</a></p> +<form method="get" action="[% c.uri_for('/admin/stats') %]"> +<div class="filters"> -[% IF start_date AND end_date %] -<p><strong>[% tprintf( loc( 'All reports between %s and %s' ), start_date.ymd, end_date.ymd ) | html %]</strong></p> -[% END %] - -<form method="get" action="[% c.uri_for('stats') %]"> -<p><select class="form-control" name="ym"> +<p> + <label for="ym">[% loc('Month') %]</label> + <select class="form-control" name="ym" id="ym"> <option value="">[% loc('All reports') %]</option> [% FOR y IN [ 2013 .. date.format(date.now, '%Y') ]; SET max = 12; @@ -21,11 +19,34 @@ <option[% ' selected' IF v == ym %]>[% v %]</option> [% END %] [% END %] -</select> + </select> +</p> + +<p> + <label for="category">[% loc('Category') %]</label> + <select class="form-control" name="category" id="category"> + <option value="">--</option> + [% FOREACH cat IN category_options %] + <option value="[% cat.name %]"[% ' selected' IF cat.name == category %]>[% cat.value ~%] + [% ' (' _ cat.abbreviation _ ')' IF cat.abbreviation %]</option> + [% END %] + </select> +</p> + +<p class="no-label"> + <input type="submit" class="btn" value="[% loc('Go') %]"> +</p> -<input type="submit" class="btn" value="[% loc('Go') %]"> +</div> </form> +<ul class="dashboard-options-tabs"> + [% IF start_date AND end_date %] + <li><strong>[% tprintf( loc( 'All reports between %s and %s' ), start_date.ymd, end_date.ymd ) | html %]</strong></li> + [% END %] + <li class="pull-right"><a href="[% c.uri_with( { export=1 } ) %]">[% loc('All Reports as CSV') %]</a></li> +</ul> + <ul> <li>[% loc('Total') %]: [% reports_total || 0 %] <li>[% loc('Closed') %]: [% reports_solved || 0 %] diff --git a/templates/web/zurich/report/_item.html b/templates/web/zurich/report/_item.html index ccae84271..f20b2021d 100644 --- a/templates/web/zurich/report/_item.html +++ b/templates/web/zurich/report/_item.html @@ -1,11 +1,11 @@ <li class="item-list__item item-list--reports__item"> <a href="[% c.uri_for('/report', problem.id ) %]"> [% photo_to_display = c.cobrand.allow_photo_display(problem) %] - [% IF problem.state != 'unconfirmed' AND problem.photo AND photo_to_display %] + [% IF problem.state != 'submitted' AND problem.photo AND photo_to_display %] [% photo_idx = photo_to_display - 1 ~%] <img class="img" height="60" width="90" src="[% problem.photos.${photo_idx}.url_fp %]" alt=""> [% END %] - [% IF problem.state != 'unconfirmed' %] + [% IF problem.state != 'submitted' %] <h3 class="item-list__heading">[% problem.title | html %]</h3> [% ELSE %] <h3 class="item-list__heading"><em>[% loc('Awaiting moderation') %]</em></h3> diff --git a/templates/web/zurich/report/_main.html b/templates/web/zurich/report/_main.html index 912e8b0c9..c9225b4aa 100644 --- a/templates/web/zurich/report/_main.html +++ b/templates/web/zurich/report/_main.html @@ -5,7 +5,7 @@ [%- IF !problem.used_map %]<br>[% loc('there is no pin shown as the user did not use the map') %][% END %] </p> - [% IF problem.state != 'unconfirmed' %] + [% IF problem.state != 'submitted' %] [% INCLUDE 'report/photo.html' object=problem %] [% problem.detail | add_links | html_para %] [% ELSE %] diff --git a/templates/web/zurich/report/updates.html b/templates/web/zurich/report/updates.html index 4489fea34..8a09d0bc7 100644 --- a/templates/web/zurich/report/updates.html +++ b/templates/web/zurich/report/updates.html @@ -1,15 +1,11 @@ -[% IF problem.state == 'fixed - council' OR problem.state == 'closed' %] +[% IF c.cobrand.problem_has_public_response(problem) %] <h4 class="static-with-rule">[% loc('Updates') %]</h4> <ul class="item-list item-list--updates"> <li class="item-list__item item-list__item--updates"> <div class="item-list__update-wrap"> <div class="item-list__update-text"> <p class="meta-2">[% prettify_dt( problem.lastupdate, 'zurich' ) %]</p> - [%# XXX following should honour zurich_closed_states instead? %] - [% IF problem.state == 'fixed - council' - || ( problem.external_body AND problem.state == 'closed' ) %] [% problem.extra.public_response | add_links | html_para %] - [% END %] </div> </div> </li> |