aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-01-15 14:56:00 +0000
committerMatthew Somerville <matthew@mysociety.org>2016-01-15 14:56:00 +0000
commit3d5e0210feacf96e21e1916ab0df84b83f5f05e2 (patch)
treec9f82ab699f4f4b589345a55a70880ebf5089c90 /templates/web
parent0e257b2201998d428b3624a15dfeeb03a5559371 (diff)
parentb8685054be0e16bc836dc568c0687a6f86400f38 (diff)
Merge branch '1300-multiple-update-photos'
Diffstat (limited to 'templates/web')
-rw-r--r--templates/web/base/admin/report_edit.html32
-rw-r--r--templates/web/base/admin/update_edit.html28
-rw-r--r--templates/web/base/alert/index.html6
-rw-r--r--templates/web/base/alert/list.html6
-rw-r--r--templates/web/base/questionnaire/index.html28
-rw-r--r--templates/web/base/report/_item.html6
-rw-r--r--templates/web/base/report/banner.html16
-rw-r--r--templates/web/base/report/display.html84
-rw-r--r--templates/web/base/report/photo.html18
-rw-r--r--templates/web/base/report/update-form.html267
-rw-r--r--templates/web/base/report/update.html86
-rw-r--r--templates/web/base/report/updates-sidebar-notes.html4
-rw-r--r--templates/web/bromley/report/_item.html6
-rw-r--r--templates/web/bromley/report/banner.html15
-rw-r--r--templates/web/bromley/report/display.html39
-rw-r--r--templates/web/eastsussex/report/update-form.html39
-rw-r--r--templates/web/emptyhomes/index.html6
-rw-r--r--templates/web/fixamingata/report/updates-sidebar-notes.html1
-rw-r--r--templates/web/fixmybarangay/alert/index.html6
-rw-r--r--templates/web/fixmystreet.com/report/banner.html28
-rw-r--r--templates/web/fixmystreet.com/report/updates-sidebar-notes.html6
-rw-r--r--templates/web/fixmystreet/report/banner.html21
-rw-r--r--templates/web/fixmystreet/report/display.html78
-rw-r--r--templates/web/fixmystreet/report/update-form.html152
-rw-r--r--templates/web/fixmystreet/report/update.html70
-rw-r--r--templates/web/fixmystreet/report/updates-sidebar-notes.html7
-rw-r--r--templates/web/zurich/admin/problem_row.html4
-rw-r--r--templates/web/zurich/admin/report_edit-sdm.html6
-rw-r--r--templates/web/zurich/admin/report_edit.html6
-rw-r--r--templates/web/zurich/admin/update_edit.html4
-rw-r--r--templates/web/zurich/report/_item.html6
31 files changed, 443 insertions, 638 deletions
diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html
index d04a1a82b..c0cdead84 100644
--- a/templates/web/base/admin/report_edit.html
+++ b/templates/web/base/admin/report_edit.html
@@ -77,20 +77,26 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
<li><label class="inline" for="non_public">[% loc('Private') %]:</label> <input type="checkbox" name="non_public"[% ' checked' IF problem.non_public %]></li>
[% IF problem.photo %]
-[% photo = problem.get_photo_params %]
-<li><img alt="Photo of this report" height="[% photo.height %]" width="[% photo.width %]" src="[% c.cobrand.base_url %]
- [%~ IF problem.photo.length == 40 ~%]
- /photo/[% problem.photo %].temp.jpeg
- [%~ ELSE ~%]
- [% photo.url %]
- [%~ END %]">
-<br>
-<input type="submit" name="rotate_photo" value="[% loc('Rotate Left') %]">
-<input type="submit" name="rotate_photo" value="[% loc('Rotate Right') %]">
-<br>
-<input type="checkbox" id="remove_photo" name="remove_photo" value="1">
-<label class="inline" for="remove_photo">[% loc("Remove photo (can't be undone!)") %]</label></li>
+<li>
+<ul>
+ [% FOR photo IN problem.photos %]
+ <li>
+ <div class="update-img">
+ <a href="[% c.cobrand.base_url %][% photo.url_temp_full %]" rel="fancy">
+ <img alt="Photo of this report" src="[% c.cobrand.base_url %][% photo.url_temp %]">
+ <span>zoom</span>
+ </a>
+ </div>
+ <input type="submit" name="rotate_photo_[% loop.index %]" value="[% loc('Rotate Left') %]">
+ <input type="submit" name="rotate_photo_[% loop.index %]" value="[% loc('Rotate Right') %]">
+ <input type="checkbox" id="remove_photo_[% loop.index %]" name="remove_photo_[% loop.index %]" value="1">
+ <label class="inline" for="remove_photo_[% loop.index %]">[% loc("Remove photo (can't be undone!)") %]</label></li>
+ </li>
+ [% END %]
+</ul>
+</li>
[% END %]
+
</ul>
<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form>
diff --git a/templates/web/base/admin/update_edit.html b/templates/web/base/admin/update_edit.html
index 5ffce8bc4..a956bb2cb 100644
--- a/templates/web/base/admin/update_edit.html
+++ b/templates/web/base/admin/update_edit.html
@@ -51,16 +51,26 @@
<li>[% loc('Created:') %] [% PROCESS format_time time=update.created %]</li>
[% IF update.photo %]
-[% photo = update.get_photo_params %]
-<li><img alt="Photo of this update" height="[% photo.height %]" width="[% photo.width %]" src="[% c.cobrand.base_url %]
- [%~ IF update.photo.length == 40 ~%]
- /photo/[% update.photo %].temp.jpeg
- [%~ ELSE ~%]
- [% photo.url %]
- [%~ END ~%]">
-<input type="checkbox" id="remove_photo" name="remove_photo" value="1">
-<label for="remove_photo" class="inline">[% loc("Remove photo (can't be undone!)") %]</label></li>
+<li>
+<ul>
+ [% FOR photo IN update.photos %]
+ <li>
+ <div class="update-img">
+ <a href="[% c.cobrand.base_url %][% photo.url_temp_full %]" rel="fancy">
+ <img alt="Photo of this update" src="[% c.cobrand.base_url %][% photo.url_temp %]">
+ <span>zoom</span>
+ </a>
+ </div>
+ <input type="submit" name="rotate_photo_[% loop.index %]" value="[% loc('Rotate Left') %]">
+ <input type="submit" name="rotate_photo_[% loop.index %]" value="[% loc('Rotate Right') %]">
+ <input type="checkbox" id="remove_photo_[% loop.index %]" name="remove_photo_[% loop.index %]" value="1">
+ <label class="inline" for="remove_photo_[% loop.index %]">[% loc("Remove photo (can't be undone!)") %]</label></li>
+ </li>
+ [% END %]
+</ul>
+</li>
[% END %]
+
</ul>
<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form>
diff --git a/templates/web/base/alert/index.html b/templates/web/base/alert/index.html
index 7057c83a3..4965a1103 100644
--- a/templates/web/base/alert/index.html
+++ b/templates/web/base/alert/index.html
@@ -39,11 +39,9 @@ within a certain distance of a particular location.', "%s is the site name"), si
[% IF photos.size %]
<h2>[% loc('Some photos of recent reports') %]</h2>
<div class="alerts__nearby-activity__photos">
- [% FOREACH p IN photos;
- photo = p.get_photo_params;
- %]
+ [% FOREACH p IN photos %]
<a href="/report/[% p.id %]">
- <img border="0" height="100" src="[% photo.url_tn %]"
+ <img border="0" height="100" src="[% p.photos.first.url_tn %]"
alt="[% p.title | html %]" title="[% p.title | html %]">
</a>
[% END %]
diff --git a/templates/web/base/alert/list.html b/templates/web/base/alert/list.html
index 289eb40af..385cd7d32 100644
--- a/templates/web/base/alert/list.html
+++ b/templates/web/base/alert/list.html
@@ -22,11 +22,9 @@
<div class="alerts__nearby-activity">
<h2>[% loc('Photos of recent nearby reports') %]</h2>
<div class="alerts__nearby-activity__photos">
- [% FOREACH p IN photos;
- photo = p.get_photo_params;
- %]
+ [% FOREACH p IN photos %]
<a href="/report/[% p.id %]">
- <img border="0" height="100" src="[% photo.url_tn %]"
+ <img border="0" height="100" src="[% p.photos.first.url_tn %]"
alt="[% p.title | html %]" title="[% p.title | html %]">
</a>
[% END %]
diff --git a/templates/web/base/questionnaire/index.html b/templates/web/base/questionnaire/index.html
index ab3bde9ad..82f0534f4 100644
--- a/templates/web/base/questionnaire/index.html
+++ b/templates/web/base/questionnaire/index.html
@@ -71,15 +71,27 @@
<p><textarea name="update" rows="7" cols="30" placeholder="[% loc('What was your experience of getting the problem fixed?') %]">[% update | html %]</textarea></p>
[% IF c.cobrand.allow_photo_upload %]
-<p id="fileupload_normalUI">
- [% IF upload_fileid %]
- <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt="">
- <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p>
- <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
+ <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
+ <label for="form_photo">[% loc('Photo') %]</label>
+
+ [% IF field_errors.photo %]
+ <p class='form-error'>[% field_errors.photo %]</p>
+ [% END %]
+
+ <div id="form_photos">
+ [% IF upload_fileid %]
+ <script>
+ fixmystreet.uploaded_files = "[% upload_fileid %]".split(',');
+ </script>
+ <p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p>
+ [% FOREACH id IN upload_fileid.split(',') %]
+ <img align="right" src="/photo/[% id %].temp.jpeg" alt="">
+ [% END %]
[% END %]
- <label for="form_photo">[% loc('Photo:') %]</label>
- <input type="file" name="photo" id="form_photo">
-</p>
+ <input type="file" name="photo1" id="form_photo">
+ <input type="file" name="photo2" id="form_photo2">
+ <input type="file" name="photo3" id="form_photo3">
+ </div>
[% END %]
[% IF c.cobrand.moniker != 'emptyhomes' %]
diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html
index d79a4e9f3..6ae43f798 100644
--- a/templates/web/base/report/_item.html
+++ b/templates/web/base/report/_item.html
@@ -1,9 +1,7 @@
<li class="item-list__item item-list--reports__item [% item_extra_class %]">
<a href="[% c.uri_for('/report', problem.id ) %]">
- [% IF problem.photo;
- photo = problem.get_photo_params
- %]
- <img class="img" height="60" width="90" src="[% photo.url_fp %]" alt="">
+ [% IF problem.photo %]
+ <img class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt="">
[% END %]
<h4>[% problem.title | html %]</h4>
<small>
diff --git a/templates/web/base/report/banner.html b/templates/web/base/report/banner.html
index bd7798d79..188e96502 100644
--- a/templates/web/base/report/banner.html
+++ b/templates/web/base/report/banner.html
@@ -1,22 +1,20 @@
[% USE date %]
[% BLOCK banner %]
-<p class="banner" id="[% id %]">
- [% text %]
-</p>
+ <div class="banner">
+ <p id="[% id %]">[% text %]</p>
+ </div>
[% END %]
[% IF problem.is_open AND date.now - problem.lastupdate.epoch > 8 * 7 * 24 * 60 * 60 %]
- [% INCLUDE banner, id = 'unknown', text = loc('This problem is old and of unknown status.') %]
+ [% INCLUDE banner, id = 'unknown', text = loc('Unknown') %]
[% END %]
[% IF problem.is_fixed %]
- [% INCLUDE banner, id = 'fixed', text = loc('This problem has been fixed') %]
+ [% INCLUDE banner, id = 'fixed', text = loc('Fixed') %]
[% END %]
[% IF problem.is_closed %]
- [% INCLUDE banner, id = 'closed', text = loc('This problem has been closed') %]
+ [% INCLUDE banner, id = 'closed', text = loc('Closed') %]
[% END %]
[% states = [ 'investigating', 'in progress', 'planned', 'action scheduled' ];
IF states.grep(problem.state).size %]
- [% INCLUDE banner, id = 'progress', text = loc('This problem is in progress') %]
+ [% INCLUDE banner, id = 'progress', text = loc('In progress') %]
[% END %]
-
-
diff --git a/templates/web/base/report/display.html b/templates/web/base/report/display.html
index 329614488..5f499dd6e 100644
--- a/templates/web/base/report/display.html
+++ b/templates/web/base/report/display.html
@@ -1,60 +1,78 @@
[%
+ SET bodyclass = 'mappage';
+ PROCESS "report/photo-js.html";
PROCESS "maps/${map.type}.html";
problem_title = problem.title_safe _ ' - ' _ loc('Viewing a problem');
- SET rss = [ tprintf(loc('Updates to this problem, %s', "%s is the site name"), site_name), "/rss/$problem.id" ] IF c.cobrand.moniker != 'emptyhomes';
- SET robots = 'index, nofollow';
- SET robots = 'noindex, nofollow' IF c.cobrand.moniker == 'emptyhomes';
INCLUDE 'header.html'
title = problem_title
+ rss = [ tprintf(loc('Updates to this problem, %s', "%s is the site name"), site_name), "/rss/$problem.id" ]
+ robots = 'index, nofollow';
%]
-[% IF c.cobrand.moniker != 'emptyhomes' %]
- [% map_html %]
- </div>
-[% END %]
-
-<div id="side">
+[% map_html %]
+</div>
[% IF login_success %]
<p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p>
[% END %]
[% INCLUDE 'report/banner.html' %]
-[% INCLUDE 'report/_main.html' %]
-<p align="right">
- <small>
- <a rel="nofollow" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Offensive? Unsuitable? Tell us' ) %]</a>
- </small>
-</p>
+[% INCLUDE 'report/_main.html' %]
+[% TRY %][% INCLUDE 'report/_message_manager.html' %][% CATCH file %][% END %]
-[% IF c.cobrand.moniker != 'emptyhomes' %]
-<p style="padding-bottom: 0.5em; border-bottom: dotted 1px #999999;" align="right">
- <a href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'More problems nearby' ) %]</a>
-</p>
+<div class="shadow-wrap">
+ <ul id="key-tools">
+ [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_body( c.cobrand.council_id ) %]
+ <li><form method="post" action="/report/delete/[% problem.id %]" id="remove-from-site-form">
+ <input type="submit" id="key-tool-report-abuse" class="abuse" value="Remove from site">
+ </form></li>
+ [% ELSIF c.cobrand.moniker != 'zurich' %]
+ <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li>
+ [% END %]
+ [% IF c.cobrand.moniker != 'zurich' %]
+ <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
+ [% END %]
+ [% IF c.cobrand.moniker == 'fixmystreet' %]
+ <li><a rel="nofollow" id="key-tool-report-share" class="share" href="#report-share">[% loc('Share') %]</a></li>
+ [% END %]
+ [% IF c.cobrand.moniker == 'zurich' %]
+ <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems on the map' ) %]</a></li>
+ [% ELSE %]
+ <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li>
+ [% END %]
+ </ul>
-<div id="alert_links">
- <a rel="nofollow" id="email_alert" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Email me updates' ) %]</a>
+[% IF c.cobrand.moniker == 'fixmystreet' %]
+ <div id="report-share" class="hidden-js" align="center">
+ <a href="https://twitter.com/share" class="twitter-share-button" data-text="I just reported &lsquo;[% problem.title_safe | html %]&rsquo;" data-via="fixmystreet" data-related="mysociety" data-count="none" data-dnt="true">Tweet</a>
+<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+ <iframe src="//www.facebook.com/plugins/like.php?href=[% c.req.uri | uri %]&amp;send=false&amp;layout=button_count&amp;width=90&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>
+ </div>
+[% END %]
- <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post" id="email_alert_box">
+<div id="report-updates-data" class="hidden-js">
+ <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post">
+ <a href="[% c.uri_for( '/rss', problem.id ) %]">
+ <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0">
+ </a>
<p>[% loc('Receive email when updates are left on this problem.' ) %]</p>
- <label class="n" for="alert_rznvy">[% loc('Email:') %]</label>
- <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30">
+ <fieldset>
+ <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label>
+ <div class="form-txt-submit-box">
+ <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]">
+ <input class="green-btn" type="submit" value="[% loc('Subscribe') %]">
+ </div>
<input type="hidden" name="id" value="[% problem.id %]">
<input type="hidden" name="type" value="updates">
- <input type="submit" value="[% loc('Subscribe') %]">
+ </fieldset>
</form>
- &nbsp;
- <a href="[% c.uri_for( '/rss', problem.id ) %]">
- <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="vertical-align: middle">
- </a>
</div>
-[% INCLUDE 'report/updates.html' %]
-[% INCLUDE 'report/update-form.html' %]
-[% END %]
-
</div>
+[% TRY %][% INCLUDE 'report/sharing.html' %][% CATCH file %][% END %]
+[% INCLUDE 'report/updates.html' %]
+[% INCLUDE 'report/update-form.html' %]
[% INCLUDE 'footer.html' %]
diff --git a/templates/web/base/report/photo.html b/templates/web/base/report/photo.html
index 094f677d8..9be5b6538 100644
--- a/templates/web/base/report/photo.html
+++ b/templates/web/base/report/photo.html
@@ -1,21 +1,9 @@
[% IF c.cobrand.allow_photo_display(object) && object.photo %]
- [% IF object.can('get_photoset') %]
- [% FOR photo IN object.get_photoset(c).images %]
+ [% FOR photo IN object.photos %]
<div class="update-img">
- <a href="[% c.cobrand.base_url %]/photo/[% object.id %].[% loop.index %].full.jpeg?[% photo.0 %]" rel="fancy">
- <img alt="Photo of this report" src="[% c.cobrand.base_url %]/photo/[% object.id %].[% loop.index %].jpeg?[% photo.0 %]">
+ <a href="[% c.cobrand.base_url %][% photo.url_full %]" rel="fancy">
+ <img alt="Photo of this report" src="[% c.cobrand.base_url %][% photo.url %]">
<span>zoom</span></a>
</div>
[% END %]
- [% ELSE %]
- [%# e.g. comments %]
- [% photo = object.get_photo_params %]
- <div class="update-img">
- [% IF photo.url_full %]<a href="[% photo.url_full %]" rel="fancy">[% END %]
- <img alt="Photo of this report"
- [%- IF photo.height %]height="[% photo.height %]" width="[% photo.width %]"[% END -%]
- src="[% photo.url %]">
- [%- IF photo.url_full %]<span>zoom</span></a>[% END %]
- </div>
- [% END %]
[% END %]
diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html
index 3115855d3..8c812cd08 100644
--- a/templates/web/base/report/update-form.html
+++ b/templates/web/base/report/update-form.html
@@ -1,165 +1,162 @@
+[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body) %]
+[% IF allow_creation %]
<div id="update_form">
-
<h2>[% loc( 'Provide an update') %]</h2>
- [% IF c.cobrand.moniker != 'emptyhomes' %]
- <p>
- <small>[% loc( 'Please note that updates are not sent to the council. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</small>
- </p>
+ [% IF c.cobrand.moniker != 'emptyhomes' AND c.cobrand.moniker != 'stevenage' %]
+ <div class="general-notes">
+ [% INCLUDE 'report/updates-sidebar-notes.html' %]
+ </div>
[% END %]
[% INCLUDE 'errors.html' %]
- <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" class="fieldset validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
-
- <input type="hidden" name="submit_update" value="1">
- <input type="hidden" name="id" value="[% problem.id | html %]">
-
- [% IF field_errors.update %]
- <div class='form-error'>[% field_errors.update %]</div>
- [% END %]
- <div class="form-field">
- <label for="form_update">[% loc( 'Update:' ) %]</label>
- <textarea name="update" id="form_update" rows="7" cols="30" required>[% update.text | html %]</textarea>
- </div>
-
- [% 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">
- [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating',
- loc('Investigating')], ['action scheduled', loc('Action Scheduled')],
- ['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')],
- ['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')],
- ['fixed', loc('Fixed')] ] %]
- <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option>
- [% END %]
- </select>
- </div>
- [% ELSE %]
- [% IF problem.is_fixed AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %]
- <div class="checkbox">
- <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]>
- <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
- </div>
- [% ELSIF !problem.is_fixed %]
- <div class="checkbox">
- <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
- <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
- </div>
- [% END %]
- [% END %]
+ <form method="post" action="[% c.uri_for( '/report/update' ) %]" id="form_update_form" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
+ <fieldset>
+ <input type="hidden" name="submit_update" value="1">
+ <input type="hidden" name="id" value="[% problem.id | html %]">
[% IF c.cobrand.allow_photo_upload %]
- [% IF field_errors.photo %]
- <div class='form-error'>[% field_errors.photo %]</div>
- [% END %]
- <div id="fileupload_normalUI">
- [% IF upload_fileid %]
- <p>[% loc('You have already attached a photo to this update, attaching another one will replace it.') %]</p>
<input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
- [% END %]
- <label for="form_photo">[% loc('Photo:') %]</label>
- <input type="file" name="photo" id="form_photo" style="width:20em">
- </div>
- [% END %]
-
-[% IF c.user_exists %]
-
- [% INCLUDE name %]
-
- <div class="checkbox">
- <input type="submit" id="update_post" value="[% loc('Post') %]">
- </div>
-
-[% ELSE %]
-
- [% IF field_errors.email %]
- <div class='form-error'>[% field_errors.email %]</div>
- [% END %]
- <div class="form-field">
- <label for="form_rznvy">[% loc('Your email:' ) %]</label>
- <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" size="30" required>
- </div>
-
-<div id="form_sign_in">
- <h3>[% loc("Now to submit your update&hellip;") %]</h3>
- <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
-
- <div id="form_sign_in_yes">
-
- [% IF field_errors.password %]
- <div class='form-error'>[% field_errors.password %]</div>
+ <label for="form_photo">[% loc('Photo') %]</label>
+
+ [% IF field_errors.photo %]
+ <p class='form-error'>[% field_errors.photo %]</p>
+ [% END %]
+
+ <div id="form_photos">
+ [% IF upload_fileid %]
+ <script>
+ fixmystreet.uploaded_files = "[% upload_fileid %]".split(',');
+ </script>
+ <p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p>
+ [% FOREACH id IN upload_fileid.split(',') %]
+ <img align="right" src="/photo/[% id %].temp.jpeg" alt="">
+ [% END %]
+ [% END %]
+ <input type="file" name="photo1" id="form_photo">
+ <input type="file" name="photo2" id="form_photo2">
+ <input type="file" name="photo3" id="form_photo3">
+ </div>
[% END %]
- <p>
- <label class="n" for="password_sign_in">[% loc('<strong>Yes</strong> I have a password') %]</label>
- <input type="password" name="password_sign_in" id="password_sign_in" value="" size="25">
- </p>
-
- <div class="fieldset">
-
- <p>
- <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
- <label class="n" for="remember_me">
- [% loc('Keep me signed in on this computer') %]
- </label>
- </p>
-
- <p>
- <input type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]">
- </p>
-
- </div>
-
- </div>
- <div id="form_sign_in_no">
-
- <p>[% loc('<strong>No</strong>, let me confirm my update by email:') %]</p>
+ <label for="form_update">[% loc( 'Update' ) %]</label>
+ [% IF field_errors.update %]
+ <div class='form-error'>[% field_errors.update %]</div>
+ [% END %]
+ <textarea rows="7" cols="30" name="update" id="form_update" placeholder="[% loc('Please write your update here') %]" required>[% update.text | html %]</textarea>
+
+ [% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %]
+ <label for="form_state">[% loc( 'State' ) %]</label>
+ <select name="state" id="form_state">
+ [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating',
+ loc('Investigating')], ['action scheduled', loc('Action Scheduled')],
+ ['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')],
+ ['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')],
+ ['fixed', loc('Fixed')] ] %]
+ <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option>
+ [% END %]
+ </select>
+ [% ELSE %]
+ [% IF problem.is_fixed AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %]
+
+ <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]>
+ <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
+
+ [% ELSIF !problem.is_fixed %]
+
+ <div class="checkbox-group">
+ <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
+ <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
+ </div>
+
+ [% END %]
+ [% END %]
- <div class="fieldset">
+ [% IF c.user_exists %]
[% INCLUDE name %]
+
+ <input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]">
+
- <div class="form-field">
- <label for="password_register">[% loc('Enter a new password:') %]</label>
- <input type="password" name="password_register" id="password_register" value="" size="25">
- </div>
-
- <p style="clear:both"><small>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</small></p>
-
- <p>
- <input type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]">
- </p>
-
- </div>
-
- </div>
-
-</div>
+ [% ELSE %]
-[% END %]
+ <label for="form_rznvy">[% loc('Your email' ) %]
+ <span class="muted">([% loc('We never show your email') %])</span>
+ </label>
+ [% IF field_errors.email %]
+ <p class='form-error'>[% field_errors.email %]</p>
+ [% END %]
+ <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required>
+
+ <div id="form_sign_in">
+ <h3>[% loc("Now to submit your update&hellip;") %]</h3>
+ <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
+
+ <div id="form_sign_in_yes" class="form-box">
+ <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>
+
+ <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
+ [% IF field_errors.password %]
+ <p class='form-error'>[% field_errors.password %]</p>
+ [% END %]
+ <div class="form-txt-submit-box">
+ <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
+ <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]">
+ </div>
+
+ <div class="checkbox-group">
+ <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
+ <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
+ </div>
+
+ <div class="general-notes">
+ <p><strong>[% loc('Forgotten your password?') %]</strong>
+ [% loc('Confirm by email below, providing a new password at that point. When you confirm, your password will be updated.') %]</p>
+ </div>
+
+ </div>
+ <div id="form_sign_in_no" class="form-box">
+ <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5>
+
+ [% INCLUDE name %]
+
+ <label for="password_register">[% loc('Password (optional)') %]</label>
+
+ <div class="general-notes">
+ <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
+ </div>
+
+ <div class="form-txt-submit-box">
+ <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
+ <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]">
+ </div>
+
+ </div>
+ </div>
+ [% END %]
+ </fieldset>
</form>
</div>
+[% END %]
[% BLOCK name %]
+ [% INCLUDE 'report/new/extra_name.html' %]
+ <label for="form_name">[% loc('Name') %]</label>
[% IF field_errors.name %]
- <div class='form-error'>[% field_errors.name %]</div>
+ <p class='form-error'>[% field_errors.name %]</p>
[% END %]
+ <input type="text"
+ [%- IF c.cobrand.moniker.match('fixmystreet|bromley') AND problem.bodies_str == '2482' %]class="validName" [% END -%]
+ name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">
- <div>
- <label for="form_name">[% loc('Your name:') %]</label>
- <input type="text" name="name" id="form_name" value="[% update.name || c.user.name | html %]" size="25">
- </div>
-
- <div class="checkbox">
+ <div class="checkbox-group">
<input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF update.anonymous==0 OR (c.cobrand.default_show_name AND update.anonymous=='') %]>
- <label for="form_may_show_name">[% loc('Show my name publicly') %]</label>
- <small>[% loc('(we never show your email)') %]</small>
+ <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
</div>
-
- <div class="checkbox">
+ <div class="checkbox-group">
<input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]>
<label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label>
</div>
diff --git a/templates/web/base/report/update.html b/templates/web/base/report/update.html
index a5fd97870..66e698606 100644
--- a/templates/web/base/report/update.html
+++ b/templates/web/base/report/update.html
@@ -1,24 +1,70 @@
+[% moderating = c.user && c.user.has_permission_to('moderate', problem.bodies_str) %]
+
[% IF loop.first %]
-<div id="updates">
- <h2 class="problem-update-list-header">[% loc('Updates') %]</h2>
+<section class="full-width">
+ <h4 class="static-with-rule">[% loc('Updates') %]</h4>
+ <ul class="item-list item-list--updates">
[% END %]
- <div><div class="problem-update"><p><a name="update_[% update.id %]"></a><em>
- [% INCLUDE meta_line %]
- </em></p></div>
-[% IF NOT update.whenanswered %]
-
- [% INCLUDE 'report/photo.html' object=update %]
-
- <div class="update-text">
- [% add_links( update.text ) | html_para %]
-
- [% IF c.cobrand.allow_update_reporting %]
- <p align="right">
- <small><a rel="nofollow" class="unsuitable-problem" href="[% c.uri_for( '/contact', { id => update.problem_id, update_id => update.id } ) %]">[% loc('Offensive? Unsuitable? Tell us') %]</a></small>
- </p>
- [% END %]
- </div>
+ <li class="item-list__item item-list__item--updates">
+ [% IF moderating; original_update = update.moderation_original_data %]
+ <form method="post" action="/moderate/report/[% problem.id %]/update/[% update.id %]">
+ <input type="button" class="btn moderate moderate-display" value="moderate">
+ <div class="moderate-edit">
+ <input type="checkbox" class="hide-document" name="update_hide">
+ <label for="update_hide">Hide update completely?</label>
+ <br />
+ <input type="checkbox" name="update_show_name" [% update.anonymous ? '' : 'checked' %]>
+ <label for="update_show_name">Show name publicly?</label>
+ [% IF update.photo or original_update.photo %]
+ <br />
+ <input type="checkbox" name="update_show_photo" [% update.photo ? 'checked' : '' %]>
+ <label for="update_show_photo">Show Photo?</label>
+ [% END %]
+ </div>
+ [% END %]
+ <div class="item-list__update-wrap">
+ [% IF update.whenanswered %]
+ <div class="item-list__update-text">
+ <p class="meta-2"> [% INCLUDE meta_line %] </p>
+ </div>
+ [% ELSE %]
+ [% INCLUDE 'report/photo.html' object=update %]
+ <div class="item-list__update-text">
+ <div class="moderate-display">
+ [% add_links( update.text ) | html_para %]
+ </div>
+ [% IF moderating %]
+ <div class="moderate-edit">
+ [% IF update.text != original.detail %]
+ <input type="checkbox" name="update_revert_detail" class="revert-textarea">
+ <label for="update_revert_detail">Revert to original</label>
+ [% END %]
+ <textarea name="update_detail">[% add_links( update.text ) %]</textarea>
+ </div>
+ [% END %]
+ <p class="meta-2">
+ <a name="update_[% update.id %]"></a>
+ [% INCLUDE meta_line %]
+ [% mlog = update.latest_moderation_log_entry(); IF mlog %]
+ <br /> Moderated by [% mlog.user.from_body.name %] at [% prettify_dt(mlog.whenedited) %]
+ [% END %]
+ </p>
+ </div>
+ [% END %]
+ </div>
+ [% IF moderating %]
+ <div class="moderate-edit">
+ <label for="moderation_reason">Moderation reason:</label>
+ <input type="text" name="moderation_reason"
+ placeholder="Describe why you are moderating this">
+ <input type="submit" class="red-btn" value="moderate it">
+ <input type="button" class="btn cancel" value="cancel">
+ </div>
+ </form>
+ [% END %]
+ </li>
+[% IF loop.last %]
+ </ul>
+</section>
[% END %]
- </div>
-[% '</div>' IF loop.last %]
diff --git a/templates/web/base/report/updates-sidebar-notes.html b/templates/web/base/report/updates-sidebar-notes.html
new file mode 100644
index 000000000..1426e4d71
--- /dev/null
+++ b/templates/web/base/report/updates-sidebar-notes.html
@@ -0,0 +1,4 @@
+<p>
+ [% loc( 'Please note that updates are not sent to the council.' ) %]
+ [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]
+</p>
diff --git a/templates/web/bromley/report/_item.html b/templates/web/bromley/report/_item.html
index 3bd8a8686..2540aec98 100644
--- a/templates/web/bromley/report/_item.html
+++ b/templates/web/bromley/report/_item.html
@@ -1,9 +1,7 @@
<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;
- photo = problem.get_photo_params
- %]
- <img class="img" height="60" width="90" src="[% photo.url_fp %]" alt="">
+ [% 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 ) %]
diff --git a/templates/web/bromley/report/banner.html b/templates/web/bromley/report/banner.html
new file mode 100644
index 000000000..ef9379f52
--- /dev/null
+++ b/templates/web/bromley/report/banner.html
@@ -0,0 +1,15 @@
+[% USE date %]
+
+[% BLOCK banner %]
+ <div class="banner">
+ <p id="[% id %]">[% text %]</p>
+ </div>
+[% END %]
+
+[% IF problem.is_fixed %]
+ [% INCLUDE banner, id = 'fixed', text = loc('Fixed') %]
+[% END %]
+
+[% IF problem.is_closed %]
+ [% INCLUDE banner, id = 'closed', text = loc('Closed') %]
+[% END %]
diff --git a/templates/web/bromley/report/display.html b/templates/web/bromley/report/display.html
index 75b7700a5..c9b0e9847 100644
--- a/templates/web/bromley/report/display.html
+++ b/templates/web/bromley/report/display.html
@@ -60,6 +60,30 @@
<input type="hidden" name="submit_update" value="1">
<input type="hidden" name="id" value="[% problem.id | html %]">
+ [% IF c.cobrand.allow_photo_upload %]
+ <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
+ <label for="form_photo">[% loc('Photo') %]</label>
+
+ [% IF field_errors.photo %]
+ <p class='form-error'>[% field_errors.photo %]</p>
+ [% END %]
+
+ <div id="form_photos">
+ [% IF upload_fileid %]
+ <script>
+ fixmystreet.uploaded_files = "[% upload_fileid %]".split(',');
+ </script>
+ <p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p>
+ [% FOREACH id IN upload_fileid.split(',') %]
+ <img align="right" src="/photo/[% id %].temp.jpeg" alt="">
+ [% END %]
+ [% END %]
+ <input type="file" name="photo1" id="form_photo">
+ <input type="file" name="photo2" id="form_photo2">
+ <input type="file" name="photo3" id="form_photo3">
+ </div>
+ [% END %]
+
<label for="form_update">[% loc( 'Update' ) %]</label>
[% IF field_errors.update %]
<div class='form-error'>[% field_errors.update %]</div>
@@ -98,21 +122,6 @@
[% END %]
[% END %]
- [% IF c.cobrand.allow_photo_upload %]
- <div id="fileupload_normalUI">
- [% IF upload_fileid %]
- <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt="">
- <p>[% loc('You have already attached a photo to this update, attaching another one will replace it.') %]</p>
- <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
- [% END %]
- <label for="form_photo">[% loc('Photo') %]</label>
- [% IF field_errors.photo %]
- <p class='form-error'>[% field_errors.photo %]</p>
- [% END %]
- <input type="file" name="photo" id="form_photo">
- </div>
- [% END %]
-
[% IF c.user_exists %]
[% INCLUDE name %]
diff --git a/templates/web/eastsussex/report/update-form.html b/templates/web/eastsussex/report/update-form.html
index af966f417..55d79a930 100644
--- a/templates/web/eastsussex/report/update-form.html
+++ b/templates/web/eastsussex/report/update-form.html
@@ -60,6 +60,30 @@
<input type="hidden" name="submit_update" value="1">
<input type="hidden" name="id" value="[% problem.id | html %]">
+ [% IF c.cobrand.allow_photo_upload %]
+ <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
+ <label for="form_photo">[% loc('Photo') %]</label>
+
+ [% IF field_errors.photo %]
+ <p class='form-error'>[% field_errors.photo %]</p>
+ [% END %]
+
+ <div id="form_photos">
+ [% IF upload_fileid %]
+ <script>
+ fixmystreet.uploaded_files = "[% upload_fileid %]".split(',');
+ </script>
+ <p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p>
+ [% FOREACH id IN upload_fileid.split(',') %]
+ <img align="right" src="/photo/[% id %].temp.jpeg" alt="">
+ [% END %]
+ [% END %]
+ <input type="file" name="photo1" id="form_photo">
+ <input type="file" name="photo2" id="form_photo2">
+ <input type="file" name="photo3" id="form_photo3">
+ </div>
+ [% END %]
+
<label for="form_update">[% loc( 'Update:' ) %]
<span class="label-warning public-warning">
[% loc('public') %]
@@ -97,21 +121,6 @@
[% END %]
[% END %]
- [% IF c.cobrand.allow_photo_upload %]
- <div id="fileupload_normalUI">
- [% IF upload_fileid %]
- <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt="">
- <p>[% loc('You have already attached a photo to this update, attaching another one will replace it.') %]</p>
- <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
- [% END %]
- <label for="form_photo">[% loc('Photo') %]</label>
- [% IF field_errors.photo %]
- <p class='form-error'>[% field_errors.photo %]</p>
- [% END %]
- <input type="file" name="photo" id="form_photo">
- </div>
- [% END %]
-
[% IF c.user_exists %]
[% INCLUDE name %]
diff --git a/templates/web/emptyhomes/index.html b/templates/web/emptyhomes/index.html
index ca70d1d9c..1d17c3423 100644
--- a/templates/web/emptyhomes/index.html
+++ b/templates/web/emptyhomes/index.html
@@ -45,11 +45,9 @@
[% IF recent_photos.size %]
<p id="front_photos">
- [% FOREACH p IN recent_photos;
- photo = p.get_photo_params;
- %]
+ [% FOREACH p IN recent_photos %]
<a href="/report/[% p.id %]"><img border="0" height="100"
- src="[% photo.url_tn %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a>
+ src="[% p.photos.first.url_tn %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a>
[% END %]
</p>
[% END %]
diff --git a/templates/web/fixamingata/report/updates-sidebar-notes.html b/templates/web/fixamingata/report/updates-sidebar-notes.html
new file mode 100644
index 000000000..bb75bd1f1
--- /dev/null
+++ b/templates/web/fixamingata/report/updates-sidebar-notes.html
@@ -0,0 +1 @@
+<p>[% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]</p>
diff --git a/templates/web/fixmybarangay/alert/index.html b/templates/web/fixmybarangay/alert/index.html
index c168fa41b..c842a7683 100644
--- a/templates/web/fixmybarangay/alert/index.html
+++ b/templates/web/fixmybarangay/alert/index.html
@@ -30,11 +30,9 @@ FixMyBarangay has a RSS feeds and email alerts for local problems.
<div id="alert_recent">
<aside>
<h2>[% loc('Some photos of recent reports') %]</h2>
- [% FOREACH p IN photos;
- photo = p.get_photo_params
- %]
+ [% FOREACH p IN photos %]
<a href="/report/[% p.id %]"><img border="0" height="100"
- src="[% photo.url_tn %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a>
+ src="[% p.photos.first.url_tn %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a>
[% END %]
</aside>
</div>
diff --git a/templates/web/fixmystreet.com/report/banner.html b/templates/web/fixmystreet.com/report/banner.html
new file mode 100644
index 000000000..35d7be179
--- /dev/null
+++ b/templates/web/fixmystreet.com/report/banner.html
@@ -0,0 +1,28 @@
+[% USE date %]
+
+[% BLOCK banner %]
+ <div class="banner">
+ <p id="[% id %]">[% text %]</p>
+ </div>
+[% END %]
+
+[% IF problem.is_fixed %]
+ [% INCLUDE banner, id = 'fixed', text = loc('Fixed') %]
+[% END %]
+
+[% IF problem.is_closed %]
+ [% INCLUDE banner, id = 'closed', text = loc('Closed') %]
+[% END %]
+
+[% IF NOT problem.bodies_str == '2482' %]
+
+ [% IF problem.is_open AND date.now - problem.lastupdate.epoch > 8 * 7 * 24 * 60 * 60 %]
+ [% INCLUDE banner, id = 'unknown', text = loc('Unknown') %]
+ [% END %]
+
+ [% states = [ 'investigating', 'in progress', 'planned', 'action scheduled' ];
+ IF states.grep(problem.state).size %]
+ [% INCLUDE banner, id = 'progress', text = loc('In progress') %]
+ [% END %]
+
+[% END %]
diff --git a/templates/web/fixmystreet.com/report/updates-sidebar-notes.html b/templates/web/fixmystreet.com/report/updates-sidebar-notes.html
new file mode 100644
index 000000000..276ab4106
--- /dev/null
+++ b/templates/web/fixmystreet.com/report/updates-sidebar-notes.html
@@ -0,0 +1,6 @@
+<p>
+ [% IF problem.send_method_used != 'Open311' OR ( NOT problem.bodies_str.match('2482|2347') ) %]
+ [% loc( 'Please note that updates are not sent to the council.' ) %]
+ [% END %]
+ [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]
+</p>
diff --git a/templates/web/fixmystreet/report/banner.html b/templates/web/fixmystreet/report/banner.html
deleted file mode 100644
index 83c780958..000000000
--- a/templates/web/fixmystreet/report/banner.html
+++ /dev/null
@@ -1,21 +0,0 @@
-[% USE date %]
-[% BLOCK banner %]
- <div class="banner">
- <p id="[% id %]">[% text %]</p>
- </div>
-[% END %]
-
-[% IF c.cobrand.moniker != 'bromley' AND problem.bodies_str != '2482' AND problem.is_open AND date.now - problem.lastupdate.epoch > 8 * 7 * 24 * 60 * 60 %]
- [% INCLUDE banner, id = 'unknown', text = loc('Unknown') %]
-[% END %]
-[% IF problem.is_fixed %]
- [% INCLUDE banner, id = 'fixed', text = loc('Fixed') %]
-[% END %]
-[% IF problem.is_closed %]
- [% INCLUDE banner, id = 'closed', text = loc('Closed') %]
-[% END %]
-[% states = [ 'investigating', 'in progress', 'planned', 'action scheduled' ];
- IF c.cobrand.moniker != 'bromley' AND problem.bodies_str != '2482' && states.grep(problem.state).size %]
- [% INCLUDE banner, id = 'progress', text = loc('In progress') %]
-[% END %]
-
diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html
deleted file mode 100644
index 5f499dd6e..000000000
--- a/templates/web/fixmystreet/report/display.html
+++ /dev/null
@@ -1,78 +0,0 @@
-[%
- SET bodyclass = 'mappage';
- PROCESS "report/photo-js.html";
- PROCESS "maps/${map.type}.html";
-
- problem_title = problem.title_safe _ ' - ' _ loc('Viewing a problem');
- INCLUDE 'header.html'
- title = problem_title
- rss = [ tprintf(loc('Updates to this problem, %s', "%s is the site name"), site_name), "/rss/$problem.id" ]
- robots = 'index, nofollow';
-%]
-
-[% map_html %]
-</div>
-
-[% IF login_success %]
- <p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p>
-[% END %]
-
-[% INCLUDE 'report/banner.html' %]
-
-[% INCLUDE 'report/_main.html' %]
-[% TRY %][% INCLUDE 'report/_message_manager.html' %][% CATCH file %][% END %]
-
-<div class="shadow-wrap">
- <ul id="key-tools">
- [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_body( c.cobrand.council_id ) %]
- <li><form method="post" action="/report/delete/[% problem.id %]" id="remove-from-site-form">
- <input type="submit" id="key-tool-report-abuse" class="abuse" value="Remove from site">
- </form></li>
- [% ELSIF c.cobrand.moniker != 'zurich' %]
- <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li>
- [% END %]
- [% IF c.cobrand.moniker != 'zurich' %]
- <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
- [% END %]
- [% IF c.cobrand.moniker == 'fixmystreet' %]
- <li><a rel="nofollow" id="key-tool-report-share" class="share" href="#report-share">[% loc('Share') %]</a></li>
- [% END %]
- [% IF c.cobrand.moniker == 'zurich' %]
- <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems on the map' ) %]</a></li>
- [% ELSE %]
- <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li>
- [% END %]
- </ul>
-
-[% IF c.cobrand.moniker == 'fixmystreet' %]
- <div id="report-share" class="hidden-js" align="center">
- <a href="https://twitter.com/share" class="twitter-share-button" data-text="I just reported &lsquo;[% problem.title_safe | html %]&rsquo;" data-via="fixmystreet" data-related="mysociety" data-count="none" data-dnt="true">Tweet</a>
-<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
- <iframe src="//www.facebook.com/plugins/like.php?href=[% c.req.uri | uri %]&amp;send=false&amp;layout=button_count&amp;width=90&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>
- </div>
-[% END %]
-
-<div id="report-updates-data" class="hidden-js">
- <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post">
- <a href="[% c.uri_for( '/rss', problem.id ) %]">
- <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0">
- </a>
- <p>[% loc('Receive email when updates are left on this problem.' ) %]</p>
- <fieldset>
- <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label>
- <div class="form-txt-submit-box">
- <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]">
- <input class="green-btn" type="submit" value="[% loc('Subscribe') %]">
- </div>
- <input type="hidden" name="id" value="[% problem.id %]">
- <input type="hidden" name="type" value="updates">
- </fieldset>
- </form>
-</div>
-
-</div>
-
-[% TRY %][% INCLUDE 'report/sharing.html' %][% CATCH file %][% END %]
-[% INCLUDE 'report/updates.html' %]
-[% INCLUDE 'report/update-form.html' %]
-[% INCLUDE 'footer.html' %]
diff --git a/templates/web/fixmystreet/report/update-form.html b/templates/web/fixmystreet/report/update-form.html
deleted file mode 100644
index a69b793b7..000000000
--- a/templates/web/fixmystreet/report/update-form.html
+++ /dev/null
@@ -1,152 +0,0 @@
-[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body) %]
-[% IF allow_creation %]
-<div id="update_form">
- <h2>[% loc( 'Provide an update') %]</h2>
-
- [% IF c.cobrand.moniker != 'emptyhomes' AND c.cobrand.moniker != 'stevenage' %]
- <div class="general-notes">
- [% INCLUDE 'report/updates-sidebar-notes.html' %]
- </div>
- [% END %]
-
- [% INCLUDE 'errors.html' %]
-
- <form method="post" action="[% c.uri_for( '/report/update' ) %]" id="form_update_form" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
- <fieldset>
- <input type="hidden" name="submit_update" value="1">
- <input type="hidden" name="id" value="[% problem.id | html %]">
-
- <label for="form_update">[% loc( 'Update' ) %]</label>
- [% IF field_errors.update %]
- <div class='form-error'>[% field_errors.update %]</div>
- [% END %]
- <textarea rows="7" cols="30" name="update" id="form_update" placeholder="[% loc('Please write your update here') %]" required>[% update.text | html %]</textarea>
-
- [% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %]
- <label for="form_state">[% loc( 'State' ) %]</label>
- <select name="state" id="form_state">
- [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating',
- loc('Investigating')], ['action scheduled', loc('Action Scheduled')],
- ['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')],
- ['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')],
- ['fixed', loc('Fixed')] ] %]
- <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option>
- [% END %]
- </select>
- [% ELSE %]
- [% IF problem.is_fixed AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %]
-
- <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]>
- <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
-
- [% ELSIF !problem.is_fixed %]
-
- <div class="checkbox-group">
- <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
- <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
- </div>
-
- [% END %]
- [% END %]
-
- [% IF c.cobrand.allow_photo_upload %]
- <div id="fileupload_normalUI">
- [% IF upload_fileid %]
- <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt="">
- <p>[% loc('You have already attached a photo to this update, attaching another one will replace it.') %]</p>
- <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
- [% END %]
- <label for="form_photo">[% loc('Photo') %]</label>
- [% IF field_errors.photo %]
- <p class='form-error'>[% field_errors.photo %]</p>
- [% END %]
- <input type="file" name="photo" id="form_photo">
- </div>
- [% END %]
-
- [% IF c.user_exists %]
-
- [% INCLUDE name %]
-
- <input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]">
-
-
- [% ELSE %]
-
- <label for="form_rznvy">[% loc('Your email' ) %]
- <span class="muted">([% loc('We never show your email') %])</span>
- </label>
- [% IF field_errors.email %]
- <p class='form-error'>[% field_errors.email %]</p>
- [% END %]
- <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required>
-
- <div id="form_sign_in">
- <h3>[% loc("Now to submit your update&hellip;") %]</h3>
- <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
-
- <div id="form_sign_in_yes" class="form-box">
- <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>
-
- <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
- [% IF field_errors.password %]
- <p class='form-error'>[% field_errors.password %]</p>
- [% END %]
- <div class="form-txt-submit-box">
- <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
- <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]">
- </div>
-
- <div class="checkbox-group">
- <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
- <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
- </div>
-
- <div class="general-notes">
- <p><strong>[% loc('Forgotten your password?') %]</strong>
- [% loc('Confirm by email below, providing a new password at that point. When you confirm, your password will be updated.') %]</p>
- </div>
-
- </div>
- <div id="form_sign_in_no" class="form-box">
- <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5>
-
- [% INCLUDE name %]
-
- <label for="password_register">[% loc('Password (optional)') %]</label>
-
- <div class="general-notes">
- <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
- </div>
-
- <div class="form-txt-submit-box">
- <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
- <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]">
- </div>
-
- </div>
- </div>
-
- [% END %]
- </fieldset>
- </form>
-</div>
-[% END %]
-
-[% BLOCK name %]
- [% INCLUDE 'report/new/extra_name.html' %]
- <label for="form_name">[% loc('Name') %]</label>
- [% IF field_errors.name %]
- <p class='form-error'>[% field_errors.name %]</p>
- [% END %]
- <input type="text" [% IF problem.bodies_str == '2482' %]class="validName" [% END %]name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">
-
- <div class="checkbox-group">
- <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF update.anonymous==0 OR (c.cobrand.default_show_name AND update.anonymous=='') %]>
- <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
- </div>
- <div class="checkbox-group">
- <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]>
- <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label>
- </div>
-[% END %]
diff --git a/templates/web/fixmystreet/report/update.html b/templates/web/fixmystreet/report/update.html
deleted file mode 100644
index 66e698606..000000000
--- a/templates/web/fixmystreet/report/update.html
+++ /dev/null
@@ -1,70 +0,0 @@
-[% moderating = c.user && c.user.has_permission_to('moderate', problem.bodies_str) %]
-
-[% IF loop.first %]
-<section class="full-width">
- <h4 class="static-with-rule">[% loc('Updates') %]</h4>
- <ul class="item-list item-list--updates">
-[% END %]
- <li class="item-list__item item-list__item--updates">
- [% IF moderating; original_update = update.moderation_original_data %]
- <form method="post" action="/moderate/report/[% problem.id %]/update/[% update.id %]">
- <input type="button" class="btn moderate moderate-display" value="moderate">
- <div class="moderate-edit">
- <input type="checkbox" class="hide-document" name="update_hide">
- <label for="update_hide">Hide update completely?</label>
- <br />
- <input type="checkbox" name="update_show_name" [% update.anonymous ? '' : 'checked' %]>
- <label for="update_show_name">Show name publicly?</label>
- [% IF update.photo or original_update.photo %]
- <br />
- <input type="checkbox" name="update_show_photo" [% update.photo ? 'checked' : '' %]>
- <label for="update_show_photo">Show Photo?</label>
- [% END %]
- </div>
- [% END %]
- <div class="item-list__update-wrap">
- [% IF update.whenanswered %]
- <div class="item-list__update-text">
- <p class="meta-2"> [% INCLUDE meta_line %] </p>
- </div>
- [% ELSE %]
- [% INCLUDE 'report/photo.html' object=update %]
- <div class="item-list__update-text">
- <div class="moderate-display">
- [% add_links( update.text ) | html_para %]
- </div>
- [% IF moderating %]
- <div class="moderate-edit">
- [% IF update.text != original.detail %]
- <input type="checkbox" name="update_revert_detail" class="revert-textarea">
- <label for="update_revert_detail">Revert to original</label>
- [% END %]
- <textarea name="update_detail">[% add_links( update.text ) %]</textarea>
- </div>
- [% END %]
-
- <p class="meta-2">
- <a name="update_[% update.id %]"></a>
- [% INCLUDE meta_line %]
- [% mlog = update.latest_moderation_log_entry(); IF mlog %]
- <br /> Moderated by [% mlog.user.from_body.name %] at [% prettify_dt(mlog.whenedited) %]
- [% END %]
- </p>
- </div>
- [% END %]
- </div>
- [% IF moderating %]
- <div class="moderate-edit">
- <label for="moderation_reason">Moderation reason:</label>
- <input type="text" name="moderation_reason"
- placeholder="Describe why you are moderating this">
- <input type="submit" class="red-btn" value="moderate it">
- <input type="button" class="btn cancel" value="cancel">
- </div>
- </form>
- [% END %]
- </li>
-[% IF loop.last %]
- </ul>
-</section>
-[% END %]
diff --git a/templates/web/fixmystreet/report/updates-sidebar-notes.html b/templates/web/fixmystreet/report/updates-sidebar-notes.html
deleted file mode 100644
index 9f2420392..000000000
--- a/templates/web/fixmystreet/report/updates-sidebar-notes.html
+++ /dev/null
@@ -1,7 +0,0 @@
- <p>
- [% IF c.cobrand.moniker != 'fixamingata' %]
- [% IF problem.send_method_used != 'Open311' OR c.cobrand.moniker != 'fixmystreet' OR ( problem.bodies_str != '2482' AND !problem.bodies_str.match('2347') ) %]
- [% loc( 'Please note that updates are not sent to the council.' ) %]
- [% END %]
- [% END %]
- [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]</p>
diff --git a/templates/web/zurich/admin/problem_row.html b/templates/web/zurich/admin/problem_row.html
index baa8d3ac7..acbf17017 100644
--- a/templates/web/zurich/admin/problem_row.html
+++ b/templates/web/zurich/admin/problem_row.html
@@ -36,9 +36,9 @@
<td>
[% IF problem.photo %]
- [% FOR photo IN problem.get_photoset(c).images %]
+ [% FOR photo IN problem.photos %]
<div class="update-img">
- <img height="60" width="90" alt="" src="[% c.cobrand.base_url %]/photo/[% photo.0 %].temp.jpeg">
+ <img height="60" width="90" alt="" src="[% c.cobrand.base_url %][% photo.url_temp %]">
</div>
[% END %]
[% END %]
diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html
index 8e576a718..a0ff1038d 100644
--- a/templates/web/zurich/admin/report_edit-sdm.html
+++ b/templates/web/zurich/admin/report_edit-sdm.html
@@ -82,10 +82,10 @@
[% IF problem.photo %]
<dd>
- [% FOR photo IN problem.get_photoset(c).images %]
+ [% FOR photo IN problem.photos %]
<div class="update-img">
- <a href="[% c.cobrand.base_url %]/photo/[% photo.0 %].fulltemp.jpeg" rel="fancy">
- <img alt="Photo of this report" src="[% c.cobrand.base_url %]/photo/[% photo.0 %].temp.jpeg">
+ <a href="[% c.cobrand.base_url %][% photo.url_temp_full %]" rel="fancy">
+ <img alt="Photo of this report" src="[% c.cobrand.base_url %][% photo.url_temp %]">
<span>zoom</span>
</a>
</div>
diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html
index 64d0950ee..dd876935c 100644
--- a/templates/web/zurich/admin/report_edit.html
+++ b/templates/web/zurich/admin/report_edit.html
@@ -106,10 +106,10 @@
[% IF problem.photo %]
<dd>
- [% FOR photo IN problem.get_photoset(c).images %]
+ [% FOR photo IN problem.photos %]
<div class="update-img">
- <a href="[% c.cobrand.base_url %]/photo/[% photo.0 %].fulltemp.jpeg" rel="fancy">
- <img alt="Photo of this report" src="[% c.cobrand.base_url %]/photo/[% photo.0 %].temp.jpeg">
+ <a href="[% c.cobrand.base_url %][% photo.url_temp_full %]" rel="fancy">
+ <img alt="Photo of this report" src="[% c.cobrand.base_url %][% photo.url_temp %]">
<span>zoom</span>
</a>
</div>
diff --git a/templates/web/zurich/admin/update_edit.html b/templates/web/zurich/admin/update_edit.html
index ab40981a5..fbd96f3a5 100644
--- a/templates/web/zurich/admin/update_edit.html
+++ b/templates/web/zurich/admin/update_edit.html
@@ -29,8 +29,8 @@
<li>[% loc('Created:') %] [% PROCESS format_date this_date=update.created %] [% update.created.hms %]</li>
[% IF update.photo %]
-[% photo = update.get_photo_params %]
-<li><img alt="" height="[% photo.height %]" width="[% photo.width %]" src="[% photo.url %]">
+[% photo = update.photos.first %]
+<li><img alt="" src="[% photo.url %]">
<input type="checkbox" id="remove_photo" name="remove_photo" value="1">
<label for="remove_photo" class="inline">[% loc("Remove photo (can't be undone!)") %]</label></li>
[% END %]
diff --git a/templates/web/zurich/report/_item.html b/templates/web/zurich/report/_item.html
index 9ba5e6fcb..a4d274a8e 100644
--- a/templates/web/zurich/report/_item.html
+++ b/templates/web/zurich/report/_item.html
@@ -1,9 +1,7 @@
<li class="item-list__item item-list--reports__item">
<a href="[% c.uri_for('/report', problem.id ) %]">
- [% IF problem.state != 'unconfirmed' AND problem.photo AND c.cobrand.allow_photo_display(problem);
- photo = problem.get_photo_params
- %]
- <img class="img" height="60" width="90" src="[% photo.url_fp %]" alt="">
+ [% IF problem.state != 'unconfirmed' AND problem.photo AND c.cobrand.allow_photo_display(problem) %]
+ <img class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt="">
[% END %]
[% IF problem.state != 'unconfirmed' %]
<h4>[% problem.title | html %]</h4>