aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default/report
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/default/report')
-rw-r--r--templates/web/default/report/_main.html2
-rw-r--r--templates/web/default/report/_support.html2
-rw-r--r--templates/web/default/report/new/category.html3
-rw-r--r--templates/web/default/report/new/councils_text.html4
-rw-r--r--templates/web/default/report/new/councils_text_all.html11
-rw-r--r--templates/web/default/report/new/councils_text_none.html7
-rw-r--r--templates/web/default/report/new/councils_text_some.html8
-rw-r--r--templates/web/default/report/new/fill_in_details_form.html4
-rw-r--r--templates/web/default/report/update-form.html2
-rw-r--r--templates/web/default/report/updates.html16
10 files changed, 29 insertions, 30 deletions
diff --git a/templates/web/default/report/_main.html b/templates/web/default/report/_main.html
index 6b7c1d271..789f8e43e 100644
--- a/templates/web/default/report/_main.html
+++ b/templates/web/default/report/_main.html
@@ -4,7 +4,7 @@
<p><em>
[% 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 %]
- [% IF problem.council %]
+ [% IF problem.bodies_str %]
[% IF problem.whensent || problem.can_display_external_id %]
<small class="council_sent_info"><br>
[% problem.processed_summary_string(c) %]
diff --git a/templates/web/default/report/_support.html b/templates/web/default/report/_support.html
index e8b958940..f4bdb8c20 100644
--- a/templates/web/default/report/_support.html
+++ b/templates/web/default/report/_support.html
@@ -1,7 +1,7 @@
[% IF c.cobrand.can_support_problems %]
<p id="supporter"><small>
[% IF !problem.interest_count %][% text=loc('No supporters') %][% ELSIF problem.interest_count == 1 %][% text = loc('1 supporter') %][% ELSE %][% text = tprintf( loc('%d supporters' ), problem.interest_count ) %][% END %]
- [% IF c.user && c.user.from_council %]<form action="[% c.uri_for( '/report/support' ) %]">
+ [% IF c.user && c.user.from_body %]<form action="[% c.uri_for( '/report/support' ) %]">
[% text %] <input type="hidden" name="id" value="[% problem.id %]"><input type="submit" class="green-btn" value="Add support">
</form>
[% ELSE %]
diff --git a/templates/web/default/report/new/category.html b/templates/web/default/report/new/category.html
index 49be4d25d..a701e0851 100644
--- a/templates/web/default/report/new/category.html
+++ b/templates/web/default/report/new/category.html
@@ -7,7 +7,8 @@
<select name='category' id='form_category'[% ' onchange="form_category_onchange()"' IF category_extras.size %]>
[% FOREACH cat_op IN category_options %]
[% cat_op_lc = cat_op | lower %]
- <option value='[% cat_op | html %]'[% ' selected' IF report.category == cat_op || category == cat_op_lc %]>[% cat_op | html %]</option>
+ <option value='[% cat_op | html %]'[% ' selected' IF report.category == cat_op || category == cat_op_lc -%]
+ >[% IF loop.first %][% cat_op %][% ELSE %][% cat_op | html %][% END %]</option>
[% END %]
</select>
[% END %]
diff --git a/templates/web/default/report/new/councils_text.html b/templates/web/default/report/new/councils_text.html
index 1da5746c1..f526beb28 100644
--- a/templates/web/default/report/new/councils_text.html
+++ b/templates/web/default/report/new/councils_text.html
@@ -1,7 +1,7 @@
[% FILTER collapse %]
-[% IF area_ids_to_list.size == 0 %]
+[% IF bodies_to_list.size == 0 %]
[% PROCESS 'report/new/councils_text_none.html' %]
-[% ELSIF area_ids_to_list.size == all_councils.size %]
+[% ELSIF bodies_to_list.size == bodies.size %]
[% PROCESS 'report/new/councils_text_all.html' %]
[% ELSE %]
[% PROCESS 'report/new/councils_text_some.html' %]
diff --git a/templates/web/default/report/new/councils_text_all.html b/templates/web/default/report/new/councils_text_all.html
index af5d822b0..e9a008e90 100644
--- a/templates/web/default/report/new/councils_text_all.html
+++ b/templates/web/default/report/new/councils_text_all.html
@@ -1,23 +1,24 @@
+[%# XXX The below type checking is assuming that a body ID can be used to look up a mapit type. %]
<p>
-[% IF area_ids_to_list.0 != 2489 && area_ids_to_list.0 != 2482 && all_councils.${area_ids_to_list.0}.type == 'LBO' %]
+[% IF bodies_to_list.0 != 2489 && bodies_to_list.0 != 2482 && all_areas.${bodies_to_list.0}.type == 'LBO' %]
[%
tprintf(
loc('All the information you provide here will be sent to <strong>%s</strong> or a relevant local body such as <strong>TfL</strong>, via the London Report-It system.'),
- all_council_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
+ all_body_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
);
%]
-[% ELSIF all_councils.${area_ids_to_list.0}.type == 'LGD' %]
+[% ELSIF all_areas.${bodies_to_list.0}.type == 'LGD' %]
[%
tprintf(
loc('All the information you provide here will be sent to <strong>%s</strong> or <strong>Roads Service</strong>.'),
- all_council_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
+ all_body_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
);
%]
[% ELSE %]
[%
tprintf(
loc('All the information you provide here will be sent to <strong>%s</strong>.'),
- all_council_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
+ all_body_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
);
%]
[% END %]
diff --git a/templates/web/default/report/new/councils_text_none.html b/templates/web/default/report/new/councils_text_none.html
index 06a4bbe49..3c445b085 100644
--- a/templates/web/default/report/new/councils_text_none.html
+++ b/templates/web/default/report/new/councils_text_none.html
@@ -1,11 +1,8 @@
-
-
<p>[%
-
nget(
"We do not yet have details for the council that covers this location.",
"We do not yet have details for the councils that cover this location.",
- all_councils.size
+ missing_details_bodies.size || all_areas.size
);
%]
[%
@@ -14,7 +11,7 @@
[%
tprintf(
loc("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."),
- all_council_names.join( loc(' or ') ),
+ missing_details_body_names.join( loc(' or ') ) || all_area_names.join( loc(' or ') ),
c.cobrand.contact_email,
c.cobrand.contact_email
);
diff --git a/templates/web/default/report/new/councils_text_some.html b/templates/web/default/report/new/councils_text_some.html
index 042e89914..8d4768612 100644
--- a/templates/web/default/report/new/councils_text_some.html
+++ b/templates/web/default/report/new/councils_text_some.html
@@ -1,9 +1,9 @@
<p>
[% loc('All the information you provide here will be sent to') %]
-[% FOREACH council_id IN area_ids_to_list %]
+[% FOREACH body_id IN bodies_to_list %]
[% loc( ' or ') IF ! loop.first %]
- <strong>[% all_councils.$council_id.name %]</strong>
+ <strong>[% bodies.$body_id.name %]</strong>
[%- '.' IF loop.last %]
[% END %]
@@ -14,13 +14,13 @@
nget(
"We do <strong>not</strong> yet have details for the other council that covers this location.",
"We do <strong>not</strong> yet have details for the other councils that cover this location.",
- missing_details_councils.size
+ missing_details_bodies.size
);
%]
[%
tprintf(
loc("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."),
- missing_details_council_names.join( loc(' or ') ),
+ missing_details_body_names.join( loc(' or ') ),
c.cobrand.contact_email,
c.cobrand.contact_email
);
diff --git a/templates/web/default/report/new/fill_in_details_form.html b/templates/web/default/report/new/fill_in_details_form.html
index 0befb344e..5eff4e147 100644
--- a/templates/web/default/report/new/fill_in_details_form.html
+++ b/templates/web/default/report/new/fill_in_details_form.html
@@ -40,8 +40,8 @@
-[% IF field_errors.council %]
- <div class='form-error'>[% field_errors.council %]</div>
+[% IF field_errors.bodies %]
+ <div class='form-error'>[% field_errors.bodies %]</div>
[% END %]
[% IF field_errors.title %]
diff --git a/templates/web/default/report/update-form.html b/templates/web/default/report/update-form.html
index d993ce28f..50bc2906c 100644
--- a/templates/web/default/report/update-form.html
+++ b/templates/web/default/report/update-form.html
@@ -23,7 +23,7 @@
<textarea name="update" id="form_update" rows="7" cols="30" required>[% update.text | html %]</textarea>
</div>
- [% IF c.user && c.user.belongs_to_council( problem.council ) %]
+ [% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %]
<div class="form-field">
<label for="form_state">[% loc( 'State:' ) %]</label>
<select name="state" id="form_state">
diff --git a/templates/web/default/report/updates.html b/templates/web/default/report/updates.html
index 09c5d4b54..04a8bec33 100644
--- a/templates/web/default/report/updates.html
+++ b/templates/web/default/report/updates.html
@@ -7,21 +7,21 @@
[% IF update.whenanswered %]
[%# A questionnaire update, currently saying report is still open %]
- [% tprintf( loc( 'Still open, via questionnaire, %s' ), prettify_epoch( update.whenanswered_local.epoch ) ) %]
+ [% tprintf( loc( 'Still open, via questionnaire, %s' ), prettify_dt( update.whenanswered_local ) ) %]
[% RETURN %]
[% END %]
[% IF update.anonymous || update.name == '' %]
- [% tprintf( loc( 'Posted anonymously at %s' ), prettify_epoch( update.confirmed_local.epoch ) ) -%]
- [%- ELSIF update.user.from_council;
+ [% tprintf( loc( 'Posted anonymously at %s' ), prettify_dt( update.confirmed_local ) ) -%]
+ [%- ELSIF update.user.from_body;
user_name = update.user.name | html;
- council = update.user.council;
- IF council == 'Bromley Council';
- council = "$council <img src='/cobrands/bromley/favicon.png' alt=''>";
+ body = update.user.body;
+ IF body == 'Bromley Council';
+ body = "$body <img src='/cobrands/bromley/favicon.png' alt=''>";
END %]
- [% tprintf( loc( 'Posted by %s (<strong>%s</strong>) at %s' ), user_name, council, prettify_epoch( update.confirmed_local.epoch ) ) -%]
+ [% tprintf( loc( 'Posted by %s (<strong>%s</strong>) at %s' ), user_name, body, prettify_dt( update.confirmed_local ) ) -%]
[%- ELSE %]
- [% tprintf( loc( 'Posted by %s at %s' ), update.name, prettify_epoch( update.confirmed_local.epoch ) ) | html -%]
+ [% tprintf( loc( 'Posted by %s at %s' ), update.name, prettify_dt( update.confirmed_local ) ) | html -%]
[%- END -%]
[%- update_state = '' %]
[%- IF update.mark_fixed %][% update_state = ", " _ loc( 'marked as fixed' ) %][% END %]