From a8f45b97bd0b91f714ff77fa9d3fbdf0e6981a15 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 19 Nov 2014 12:44:55 +0000 Subject: Move tips/sidebar to separate templates. Also apply to UK council cobrands. Fixes #926, more food for #344. --- .../web/base/report/new/fill_in_details_form.html | 6 ++-- .../web/base/report/new/fill_in_details_text.html | 5 +-- .../report/new/fill_in_details_text.html | 10 ------ .../report/new/inline-tips.html | 12 +++++++ .../report/new/sidebar.html | 0 .../fixmystreet.com/report/new/inline-tips.html | 12 +++++++ .../web/fixmystreet.com/report/new/sidebar.html | 0 .../report/new/fill_in_details_form.html | 40 +++------------------- .../report/new/fill_in_details_text.html | 10 ------ templates/web/fixmystreet/report/new/sidebar.html | 14 ++++++++ .../web/oxfordshire/report/new/after_photo.html | 3 ++ .../report/new/fill_in_details_text.html | 6 ---- .../web/oxfordshire/report/new/inline-tips.html | 12 +++++++ 13 files changed, 62 insertions(+), 68 deletions(-) delete mode 100644 templates/web/eastsussex/report/new/fill_in_details_text.html create mode 100644 templates/web/fixmystreet-uk-councils/report/new/inline-tips.html create mode 100644 templates/web/fixmystreet-uk-councils/report/new/sidebar.html create mode 100644 templates/web/fixmystreet.com/report/new/inline-tips.html create mode 100644 templates/web/fixmystreet.com/report/new/sidebar.html delete mode 100644 templates/web/fixmystreet/report/new/fill_in_details_text.html create mode 100644 templates/web/fixmystreet/report/new/sidebar.html create mode 100644 templates/web/oxfordshire/report/new/after_photo.html delete mode 100644 templates/web/oxfordshire/report/new/fill_in_details_text.html create mode 100644 templates/web/oxfordshire/report/new/inline-tips.html diff --git a/templates/web/base/report/new/fill_in_details_form.html b/templates/web/base/report/new/fill_in_details_form.html index 1e687cf88..ec05e127e 100644 --- a/templates/web/base/report/new/fill_in_details_form.html +++ b/templates/web/base/report/new/fill_in_details_form.html @@ -2,10 +2,10 @@ [% IF report.used_map %]

[% loc('Wrong location? Just click again on the map.') %]

+[% END %] - [% IF partial_token %] -

[% loc('Please note your report has not yet been sent. Choose a category and add further information below, then submit.') %]

- [% END %] +[% IF partial_token %] +

[% loc('Please note your report has not yet been sent. Choose a category and add further information below, then submit.') %]

[% END %] [% IF js %] diff --git a/templates/web/base/report/new/fill_in_details_text.html b/templates/web/base/report/new/fill_in_details_text.html index 5d9716915..05527bb24 100644 --- a/templates/web/base/report/new/fill_in_details_text.html +++ b/templates/web/base/report/new/fill_in_details_text.html @@ -1,9 +1,6 @@ [% IF area_ids_to_list.size != 0; - loc('Please fill in details of the problem below. The council won\'t be able -to help unless you leave as much detail as you can, so please describe the exact location of -the problem (e.g. on a wall), what it is, how long it has been there, a description (and a -photo of the problem if you have one), etc.'); + loc('The council won’t be able to help unless you leave as much detail as you can. Please describe the exact location of the problem (e.g. on a wall), what it is, how long it has been there, a description (and a photo of the problem if you have one), etc.'); IF category_extras; ' ' _ loc('Some categories may require additional information.'); END; diff --git a/templates/web/eastsussex/report/new/fill_in_details_text.html b/templates/web/eastsussex/report/new/fill_in_details_text.html deleted file mode 100644 index 3f967a72a..000000000 --- a/templates/web/eastsussex/report/new/fill_in_details_text.html +++ /dev/null @@ -1,10 +0,0 @@ -[% - IF area_ids_to_list.size != 0; - loc('East Sussex County Council won’t be able to help unless you leave as much detail as you can. Please describe the exact location of the problem (e.g. on a wall), what it is, how long it has been there, a description (and a photo of the problem if you have one), etc.'); - IF category_extras; - ' ' _ loc('Some categories may require additional information.'); - END; - ELSE; - loc('Please fill in details of the problem below.'); - END; -%] diff --git a/templates/web/fixmystreet-uk-councils/report/new/inline-tips.html b/templates/web/fixmystreet-uk-councils/report/new/inline-tips.html new file mode 100644 index 000000000..12b60beeb --- /dev/null +++ b/templates/web/fixmystreet-uk-councils/report/new/inline-tips.html @@ -0,0 +1,12 @@ +
+

Tips for successful reports:

+ + +
diff --git a/templates/web/fixmystreet-uk-councils/report/new/sidebar.html b/templates/web/fixmystreet-uk-councils/report/new/sidebar.html new file mode 100644 index 000000000..e69de29bb diff --git a/templates/web/fixmystreet.com/report/new/inline-tips.html b/templates/web/fixmystreet.com/report/new/inline-tips.html new file mode 100644 index 000000000..12b60beeb --- /dev/null +++ b/templates/web/fixmystreet.com/report/new/inline-tips.html @@ -0,0 +1,12 @@ +
+

Tips for successful reports:

+ + +
diff --git a/templates/web/fixmystreet.com/report/new/sidebar.html b/templates/web/fixmystreet.com/report/new/sidebar.html new file mode 100644 index 000000000..e69de29bb diff --git a/templates/web/fixmystreet/report/new/fill_in_details_form.html b/templates/web/fixmystreet/report/new/fill_in_details_form.html index f474355b9..78c3f420b 100644 --- a/templates/web/fixmystreet/report/new/fill_in_details_form.html +++ b/templates/web/fixmystreet/report/new/fill_in_details_form.html @@ -17,30 +17,11 @@ [% PROCESS 'report/new/councils_text.html' %] [% END %] - [% IF c.cobrand.moniker == "fixmystreet" && report.used_map && partial_token %] + [% IF report.used_map && partial_token %]

[% loc('Please note your report has not yet been sent. Choose a category and add further information below, then submit.') %]

[% END %] - [% IF c.cobrand.moniker != "fixmystreet" && (c.cobrand.moniker != 'fixmybarangay' || ( c.user && c.user.from_body ) ) %] -
- - -
- [% END %] + [% TRY %][% PROCESS 'report/new/sidebar.html' %][% CATCH file %][% END %] [% INCLUDE 'errors.html' %] @@ -65,20 +46,7 @@ [% END %] - [% IF c.cobrand.moniker == "fixmystreet" %] -
-

Tips for successful reports:

- - -
- [% END %] + [% TRY %][% PROCESS 'report/new/inline-tips.html' %][% CATCH file %][% END %] [% IF js %]
@@ -121,6 +89,8 @@ [% END %] + [% TRY %][% PROCESS 'report/new/after_photo.html' %][% CATCH file %][% END %] + [% IF c.user_exists %] [% PROCESS "report/new/form_user_loggedin.html" %] [% ELSE %] diff --git a/templates/web/fixmystreet/report/new/fill_in_details_text.html b/templates/web/fixmystreet/report/new/fill_in_details_text.html deleted file mode 100644 index 05527bb24..000000000 --- a/templates/web/fixmystreet/report/new/fill_in_details_text.html +++ /dev/null @@ -1,10 +0,0 @@ -[% - IF area_ids_to_list.size != 0; - loc('The council won’t be able to help unless you leave as much detail as you can. Please describe the exact location of the problem (e.g. on a wall), what it is, how long it has been there, a description (and a photo of the problem if you have one), etc.'); - IF category_extras; - ' ' _ loc('Some categories may require additional information.'); - END; - ELSE; - loc('Please fill in details of the problem below.'); - END; -%] diff --git a/templates/web/fixmystreet/report/new/sidebar.html b/templates/web/fixmystreet/report/new/sidebar.html new file mode 100644 index 000000000..083c7db70 --- /dev/null +++ b/templates/web/fixmystreet/report/new/sidebar.html @@ -0,0 +1,14 @@ +
+ + +
diff --git a/templates/web/oxfordshire/report/new/after_photo.html b/templates/web/oxfordshire/report/new/after_photo.html new file mode 100644 index 000000000..bd8b7076f --- /dev/null +++ b/templates/web/oxfordshire/report/new/after_photo.html @@ -0,0 +1,3 @@ +

Please be aware that you can only attach one picture so ensure that +you provide a picture that clearly shows the location not just the fault. +

diff --git a/templates/web/oxfordshire/report/new/fill_in_details_text.html b/templates/web/oxfordshire/report/new/fill_in_details_text.html deleted file mode 100644 index 065005956..000000000 --- a/templates/web/oxfordshire/report/new/fill_in_details_text.html +++ /dev/null @@ -1,6 +0,0 @@ -Oxfordshire County Council won’t be able to help unless you leave as much -detail as you can. Please describe the exact location of the problem (e.g. in -the carriageway), what it is, how long it has been there, a description and a -photo of the problem if you have one. Please be aware that you can only attach -one picture so ensure that you provide a picture that clearly shows the -location not just the fault. diff --git a/templates/web/oxfordshire/report/new/inline-tips.html b/templates/web/oxfordshire/report/new/inline-tips.html new file mode 100644 index 000000000..810c04363 --- /dev/null +++ b/templates/web/oxfordshire/report/new/inline-tips.html @@ -0,0 +1,12 @@ +
+

Tips for successful reports:

+
    +
  • Be polite
  • +
  • Use exact locations (e.g. carriageway)
  • +
  • Say how long the issue’s been present
  • +
+
    +
  • Don’t leave abusive or libellous messages
  • +
  • Don’t include private contact details in the description
  • +
+
-- cgit v1.2.3