aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-11-22 22:06:53 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-11-26 12:49:23 +0000
commitc69891dffcb3810ebb951af4a563c556b2deeb0d (patch)
tree3ba5a477e0f5d92062c94c032c2f9c9a4feb3e86 /templates
parenteb2aba46eabc8d90656b760cf4900f56119de9ca (diff)
Show moderation history in report/update admin.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/admin/report_edit.html23
-rw-r--r--templates/web/base/admin/update_edit.html18
2 files changed, 41 insertions, 0 deletions
diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html
index 794e19e4c..a38bacb00 100644
--- a/templates/web/base/admin/report_edit.html
+++ b/templates/web/base/admin/report_edit.html
@@ -182,6 +182,29 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
</div>
+[% moderation_history = problem.moderation_history %]
+[% IF moderation_history %]
+<div class="full-width" style="margin-bottom:-2em; padding-bottom: 2em">
+ <h2>[% loc('Moderation history') %]</h2>
+ [% last_history = problem %]
+ <ul>
+ [% FOR history IN moderation_history %]
+ [% SET diff = history.compare_with(last_history) %]
+ <li>[% PROCESS format_time time=history.created %]:
+ [% IF diff.title %]<br>[% loc('Subject:') %] [% diff.title %][% END %]
+ [% IF diff.detail %]<br>[% loc('Details:') %] [% diff.detail %][% END %]
+ [% IF diff.photo %]<br>[% loc('Photo') %]: [% diff.photo %][% END %]
+ [% IF diff.anonymous %]<br>[% loc('Anonymous:') %] [% diff.anonymous %][% END %]
+ [% IF diff.coords %]<br>[% loc('Latitude/Longitude:') %] [% diff.coords %][% END %]
+ [% IF diff.category %]<br>[% loc('Category:') %] [% diff.category %][% END %]
+ [% IF diff.extra %]<br>[% loc('Extra data:') %] [% diff.extra %][% END %]
+ </li>
+ [% last_history = history %]
+ [% END %]
+ </ul>
+</div>
+[% END %]
+
<div class="full-width full-width--bottom">
[% INCLUDE 'admin/list_updates.html' %]
</div>
diff --git a/templates/web/base/admin/update_edit.html b/templates/web/base/admin/update_edit.html
index cb420fc67..d997b89e8 100644
--- a/templates/web/base/admin/update_edit.html
+++ b/templates/web/base/admin/update_edit.html
@@ -81,4 +81,22 @@
</ul>
<input type="submit" class="btn" name="Submit changes" value="[% loc('Submit changes') %]" ></form>
+[% moderation_history = update.moderation_history %]
+[% IF moderation_history %]
+ <h2>[% loc('Moderation history') %]</h2>
+ [% last_history = update %]
+ <ul>
+ [% FOR history IN moderation_history %]
+ [% SET diff = history.compare_with(last_history) %]
+ <li>[% PROCESS format_time time=history.created %]:
+ [% IF diff.detail %]<br>[% loc('Text:') %] [% diff.detail %][% END %]
+ [% IF diff.photo %]<br>[% loc('Photo') %]: [% diff.photo %][% END %]
+ [% IF diff.anonymous %]<br>[% loc('Anonymous:') %] [% diff.anonymous %][% END %]
+ [% IF diff.extra %]<br>[% loc('Extra data:') %] [% diff.extra %][% END %]
+ </li>
+ [% last_history = history %]
+ [% END %]
+ </ul>
+[% END %]
+
[% INCLUDE 'admin/footer.html' %]