aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-11-23 18:40:31 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-11-27 10:40:57 +0000
commitd1c6217e353702440854187495501932f1be31fb (patch)
treebda8f33f21735e9c19cb4be7e2aaca563ef9d717 /templates
parentc69891dffcb3810ebb951af4a563c556b2deeb0d (diff)
Associate moderation history with admin log.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/admin/report_edit.html4
-rw-r--r--templates/web/base/admin/update_edit.html4
2 files changed, 6 insertions, 2 deletions
diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html
index a38bacb00..175863549 100644
--- a/templates/web/base/admin/report_edit.html
+++ b/templates/web/base/admin/report_edit.html
@@ -190,7 +190,9 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
<ul>
[% FOR history IN moderation_history %]
[% SET diff = history.compare_with(last_history) %]
- <li>[% PROCESS format_time time=history.created %]:
+ [% SET log = history.admin_log %]
+ <li><i>[% tprintf(loc('Moderated by %s at %s'), log.user.name OR loc('an administrator'), prettify_dt(history.created)) %]
+ [%~ IF log.reason %]<br>“[% log.reason %]”[% END %]</i>
[% 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 %]
diff --git a/templates/web/base/admin/update_edit.html b/templates/web/base/admin/update_edit.html
index d997b89e8..fca9b1904 100644
--- a/templates/web/base/admin/update_edit.html
+++ b/templates/web/base/admin/update_edit.html
@@ -88,7 +88,9 @@
<ul>
[% FOR history IN moderation_history %]
[% SET diff = history.compare_with(last_history) %]
- <li>[% PROCESS format_time time=history.created %]:
+ [% SET log = history.admin_log %]
+ <li><i>[% tprintf(loc('Moderated by %s at %s'), log.user.name OR loc('an administrator'), prettify_dt(history.created)) %]
+ [%~ IF log.reason %]<br>“[% log.reason %]”[% END %]</i>
[% 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 %]