diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2015-07-30 16:40:14 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-07-30 17:42:14 +0100 |
commit | 87f9c198c388f5defa2da72ba51541415c0fda29 (patch) | |
tree | 43526f11052c02d56974aaa2124030b5bc2032e8 /templates | |
parent | 9b61f5a2294d786f97c6bf78375257ca339638bd (diff) |
Add MapIt links to admin from body/co-ordinates.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/base/admin/body.html | 18 | ||||
-rw-r--r-- | templates/web/base/admin/report_edit.html | 6 |
2 files changed, 18 insertions, 6 deletions
diff --git a/templates/web/base/admin/body.html b/templates/web/base/admin/body.html index 867c981e3..84ea6840c 100644 --- a/templates/web/base/admin/body.html +++ b/templates/web/base/admin/body.html @@ -13,14 +13,22 @@ [% IF example_pc %] <a href="[% c.uri_for_email( '/around', { pc => example_pc } ) %]" class="admin-offsite-link">[% tprintf( loc('Example postcode %s'), example_pc ) | html %]</a> | [% END %] - [% IF c.cobrand.moniker == 'emptyhomes' %] - <a href="[% c.uri_for( 'reports', search => 'body:' _ body_id ) %]">[% loc('List all reported problems' ) %]</a> | - [% ELSE %] + [% loc('Area covered') %]: + [% SET body_areas = body.areas %] + [% FOR area IN areas %] + [% SET aid = area.id %] + [% IF body_areas.$aid %] + <a href="[% c.config.MAPIT_URL %][% + '/' UNLESS c.config.MAPIT_URL.search('/$') + %]area/[% aid %].html" class="admin-offsite-link">[% area.name | html %]</a> + [% END %] + [% END %] +<br> <a href="[% c.uri_for_email( '/reports/' _ body_id ) %]" class="admin-offsite-link">[% loc('List all reported problems' ) %]</a> | - [% END %] - <a href="[% c.uri_for( 'body', body_id, { text => 1 } ) %]">[% loc('Text only version') %]</a> + <a href="[% c.uri_for( 'body', body_id, { text => 1 } ) %]">[% loc('Text only version') %]</a> </p> + [% IF body.send_method == 'Open311' %] <h2> Council contacts configured via Open311 diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html index f14c1616a..a63952ec6 100644 --- a/templates/web/base/admin/report_edit.html +++ b/templates/web/base/admin/report_edit.html @@ -20,7 +20,11 @@ <li><label for='detail'>[% loc('Details:') %]</label> <textarea name='detail' id='detail' cols=60 rows=10>[% problem.detail | html %]</textarea></li> -<li>[% loc('Co-ordinates:') %] [% problem.latitude %], [% problem.longitude %] +<li>[% loc('Co-ordinates:') %] +<a href="[% c.config.MAPIT_URL %][% + '/' UNLESS c.config.MAPIT_URL.search('/$') +%]point/4326/[% problem.longitude %],[% problem.latitude %].html" +class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a> ( [% SET postcode_safe = problem.postcode | html; tprintf( loc('originally entered: “%s”'), postcode_safe ) |