diff options
author | Matthew Somerville <matthew@mysociety.org> | 2016-01-08 11:27:12 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2016-01-08 11:27:12 +0000 |
commit | 5c1f5df6e9942f307cade6215074c3d004da14c0 (patch) | |
tree | b9b32123e698c88a517cee0849272c7a02c24912 /templates | |
parent | 98c4305003a7fdd468822cd45a605dd935943f72 (diff) |
Handle multiple photo rotation/removal in admin.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/base/admin/report_edit.html | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html index d04a1a82b..8cb513be8 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.get_photoset(c).images %] + <li> + <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"> + <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> |