aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/web/base/report/_item.html4
-rw-r--r--templates/web/bromley/report/_item.html23
-rw-r--r--templates/web/bromley/report/_item_heading.html1
-rw-r--r--templates/web/bromley/reports/_list-entry.html4
-rw-r--r--templates/web/buckinghamshire/report/_item.html139
-rw-r--r--templates/web/buckinghamshire/report/_item_heading.html1
6 files changed, 10 insertions, 162 deletions
diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html
index b1fa8fcad..d710f6c81 100644
--- a/templates/web/base/report/_item.html
+++ b/templates/web/base/report/_item.html
@@ -34,7 +34,11 @@
[% IF problem.photo %]
<img class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt="">
[% END %]
+ [% TRY %]
+ [% PROCESS 'report/_item_heading.html' %]
+ [% CATCH file %]
<h3 class="item-list__heading">[% problem.title | html %]</h3>
+ [% END %]
[% IF c.user.has_permission_to('report_inspect', problem.bodies_str_ids) %]
<div class="item-list__description">[% problem.detail | html %]</div>
[% END %]
diff --git a/templates/web/bromley/report/_item.html b/templates/web/bromley/report/_item.html
deleted file mode 100644
index 2540aec98..000000000
--- a/templates/web/bromley/report/_item.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<li class="item-list__item item-list--reports__item item-list__item--with-pin [% c.cobrand.pin_colour(problem) %]">
-<a class="[% problem.category %]" href="[% c.uri_for('/report', problem.id ) %]">
- [% IF problem.photo %]
- <img class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt="">
- [% END %]
- <span>[% problem.title | html %]</span><br />
- <small>[% prettify_dt( problem.confirmed, 1 ) %]
- [%- IF dist %], [% dist %]km[% END %]
- [%- IF include_lastupdate AND problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %],
- [% tprintf(loc('last updated %s'), prettify_dt( problem.lastupdate, 1 ) ) %]
- [%- END %]
- [% IF include_sentinfo %]
- [% IF problem.bodies_str_ids.size > 1 %] [% loc('(sent to both)') %]
- [% ELSIF problem.bodies_str_ids.size == 0 %] [% loc('(not sent to council)') %]
- [% END %]
- [% END %]
- [% IF NOT no_fixed AND problem.is_fixed %]
- [% loc('(fixed)') %]
- [% ELSIF NOT no_fixed AND problem.is_closed %]
- [% loc('(closed)') %]
- [% END %]</small>
-</a>
-</li>
diff --git a/templates/web/bromley/report/_item_heading.html b/templates/web/bromley/report/_item_heading.html
new file mode 100644
index 000000000..e738075ad
--- /dev/null
+++ b/templates/web/bromley/report/_item_heading.html
@@ -0,0 +1 @@
+<span>[% problem.title | html %]</span><br />
diff --git a/templates/web/bromley/reports/_list-entry.html b/templates/web/bromley/reports/_list-entry.html
new file mode 100644
index 000000000..9ceaffc52
--- /dev/null
+++ b/templates/web/bromley/reports/_list-entry.html
@@ -0,0 +1,4 @@
+[% INCLUDE 'report/_item.html'
+ include_sentinfo = 1
+ item_extra_class = 'item-list__item--with-pin ' _ c.cobrand.pin_colour(problem)
+%]
diff --git a/templates/web/buckinghamshire/report/_item.html b/templates/web/buckinghamshire/report/_item.html
deleted file mode 100644
index b87363a6a..000000000
--- a/templates/web/buckinghamshire/report/_item.html
+++ /dev/null
@@ -1,139 +0,0 @@
-[% IF NOT report_blocks_included ~%]
-[% PROCESS 'admin/report_blocks.html' ~%]
-[% END ~%]
-
-[% 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"
- data-label-remove="[% loc('Remove from shortlist') %]"
- data-label-add="[% loc('Add to shortlist') %]"
- [% IF c.user.is_planned_report(problem) ~%]
- name="shortlist-remove" title="[% loc('Remove from shortlist') %]" class="item-list__item__shortlist-remove"
- [%~ ELSE ~%]
- name="shortlist-add" title="[% IF problem.shortlisted_user %]
- [%~ tprintf(loc('Shortlisted by %s'), problem.shortlisted_user.name) %]; [% END %]
- [%~ loc('Add to shortlist') %]" class="item-list__item__shortlist-[% IF problem.shortlisted_user %]take[% ELSE %]add[% END %]"
- [%~ END ~%]
- >
- [%~ END %]
-[% END %]
-
-[% IF shortlist %]
- [% item_extra_class = "item-list__item--indented item-list__item--act-and-sort" %]
- [% item_action = BLOCK %]
- [% item_action %]
- <input type="submit" name="shortlist-up" value="[% loc('Up one') %]" title="[% loc('Up one') %]" class="item-list__item__shortlist-up" [% IF loop.first %]disabled[% END %]>
- <input type="submit" name="shortlist-down" value="[% loc('Down one') %]" title="[% loc('Down one') %]" class="item-list__item__shortlist-down" [% IF loop.last %]disabled[% END %]>
- [% END %]
-[% END %]
-
-<li class="item-list__item item-list--reports__item [% item_extra_class %]"
- data-report-id="[% problem.id | html %]" data-lastupdate="[% problem.lastupdate %]" id="report-[% problem.id | html %]">
-<a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %]">
- [% IF problem.photo %]
- <img class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt="">
- [% END %]
- <h3 class="item-list__heading">[% problem.category | html %]: [% problem.title | html %]</h3>
- [% IF c.user.has_permission_to('report_inspect', problem.bodies_str_ids) %]
- <div class="item-list__description">[% problem.detail | html %]</div>
- [% END %]
- <small>
- [% IF NOT no_fixed AND problem.is_fixed %]
- <span class="item-list__item__state">[% prettify_state('fixed') %]</span>
- [% ELSIF NOT no_fixed AND problem.is_closed %]
- <span class="item-list__item__state">[% prettify_state('closed') %]</span>
- [% ELSIF (c.user.has_permission_to('report_edit_priority', problem.bodies_str_ids) OR c.user.has_permission_to('report_inspect', problem.bodies_str_ids)) AND problem.response_priority %]
- <span class="item-list__item__state">[% problem.response_priority.name %]</span>
- [% END %]
- [%- IF c.cobrand.moniker != 'fixamingata' %] [%# Default: %]
- [%- IF problem.days_ago > 0 AND problem.days_ago <= c.cobrand.display_days_ago_threshold %]
- [% tprintf( nget('Reported %d day ago', 'Reported %d days ago', problem.days_ago), problem.days_ago ) %]
- [%- ELSE %]
- [% prettify_dt( problem.confirmed, 1 ) %]
- [%- END %]
- [%- ELSE %] [%# Swedish cobrand fixamingata: %]
- [%- prettify_dt( problem.confirmed) %]
- [%- END %]
- [%- IF dist %], [% dist %]km[% END %]
- [%- IF problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %],
- [%- IF problem.days_ago('lastupdate') > 0 AND problem.days_ago('lastupdate') <= c.cobrand.display_days_ago_threshold %]
- [% tprintf( nget('last updated %d day ago', 'last updated %d days ago', problem.days_ago('lastupdate') ), problem.days_ago('lastupdate') ) %]
- [%- ELSE %]
- [% tprintf(loc('last updated %s'), prettify_dt( problem.lastupdate, 1 ) ) %]
- [%- END %]
- [%- END %]
- [% IF include_sentinfo %]
- [% IF c.cobrand.is_council && !c.cobrand.owns_problem( problem ) %]
- (sent to [% problem.body %])
- [% ELSIF problem.bodies_str_ids.size > 2 %] [% loc('(sent to all)') %]
- [% ELSIF problem.bodies_str_ids.size == 2 %] [% loc('(sent to both)') %]
- [% ELSIF problem.bodies_str_ids.size == 0 %] [% loc('(not sent to council)') %]
- [% END %]
- [% END %]
- </small>
-
- [% IF c.user.has_permission_to('report_inspect', problem.bodies_str_ids) %]
- <div class="item-list__item__metadata">
- <div>
- <h4>[% loc('Report ID:') %]</h4>
- <p>[% problem.id %]</p>
- </div>
- [% IF problem.local_coords %]
- <div>
- <h4>[% loc('Easting/Northing:') %]</h4>
- <p>[% problem.local_coords.0 %], [% problem.local_coords.1 %]</p>
- </div>
- [% END %]
- <div>
- <h4>[% loc('Latitude/Longitude:') %]</h4>
- <p>[% problem.latitude %], [% problem.longitude %]</p>
- </div>
- <div>
- <h4>[% loc('Category') %]</h4>
- <p>[% (problem.category_display OR '-') | html %]</p>
- </div>
- <div>
- <h4>[% loc('State') %]</h4>
- <p>[% prettify_state(problem.state, 1) %]</p>
- </div>
- <div>
- <h4>[% loc('Priority') %]</h4>
- <p>[% problem.response_priority.name OR '-' %]</p>
- </div>
- <div>
- <h4>[% loc('Traffic management required?') %]</h4>
- <p>[% problem.get_extra_metadata('traffic_information') %]</p>
- </div>
- <div>
- <h4>[% loc('Extra details') %]</h4>
- <p>[% problem.get_extra_metadata('detailed_information') | html %]</p>
- </div>
- [% SET fields = problem.get_extra_fields; IF fields.size %]
- [% FOR f IN fields %]
- <div>
- <h4>[% f.name %]</h4>
- <p>[% f.value %]</p>
- </div>
- [% END %]
- [% END %]
- </div>
- [% END %]
-
-
-</a>
-[% 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>
- [% END ~%]
-[% END %]
-</li>
diff --git a/templates/web/buckinghamshire/report/_item_heading.html b/templates/web/buckinghamshire/report/_item_heading.html
new file mode 100644
index 000000000..75c7bfdfb
--- /dev/null
+++ b/templates/web/buckinghamshire/report/_item_heading.html
@@ -0,0 +1 @@
+<h3 class="item-list__heading">[% problem.category | html %]: [% problem.title | html %]</h3>