diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/email/default/problem-moderated.html | 4 | ||||
-rw-r--r-- | templates/email/default/problem-moderated.txt | 4 | ||||
-rw-r--r-- | templates/web/base/admin/list_updates.html | 31 | ||||
-rw-r--r-- | templates/web/base/admin/report_edit.html | 25 | ||||
-rw-r--r-- | templates/web/base/admin/update_edit.html | 20 |
5 files changed, 66 insertions, 18 deletions
diff --git a/templates/email/default/problem-moderated.html b/templates/email/default/problem-moderated.html index 1a12446d0..142f27fc2 100644 --- a/templates/email/default/problem-moderated.html +++ b/templates/email/default/problem-moderated.html @@ -25,8 +25,8 @@ the team at <a href="[% report_complain_uri %]">[% report_complain_uri %]</a></p [% end_padded_box %] </th> [% WRAPPER '_email_sidebar.html' object = problem %] - <h2 style="[% h2_style %]">[% problem.moderation_original_data.title | html %]</h2> - <p style="[% secondary_p_style %]">[% problem.moderation_original_data.detail | html %]</p> + <h2 style="[% h2_style %]">[% moderated_data.title | html %]</h2> + <p style="[% secondary_p_style %]">[% moderated_data.detail | html %]</p> [% END %] [% INCLUDE '_email_bottom.html' %] diff --git a/templates/email/default/problem-moderated.txt b/templates/email/default/problem-moderated.txt index 7c1c3b5c2..ee219672f 100644 --- a/templates/email/default/problem-moderated.txt +++ b/templates/email/default/problem-moderated.txt @@ -15,11 +15,11 @@ The following data has been changed: Your report had the title: -[% problem.moderation_original_data.title %] +[% moderated_data.title %] And details: -[% problem.moderation_original_data.detail %] +[% moderated_data.detail %] [% UNLESS types == 'hide' %] You can see the report at [% report_uri %] diff --git a/templates/web/base/admin/list_updates.html b/templates/web/base/admin/list_updates.html index a28c4ff81..b23cd7ca3 100644 --- a/templates/web/base/admin/list_updates.html +++ b/templates/web/base/admin/list_updates.html @@ -9,24 +9,25 @@ <th>[% loc('Council') %]</th> <th>[% loc('Cobrand') %]</th> <th>[% loc('State') %]</th> - <th>[% loc('Text') %]</th> <th>*</th> </tr> [% FOREACH update IN updates -%] <tr[% ' class="adminhidden"' IF update.state == 'hidden' || update.problem.state == 'hidden' %]> - <td>[%- IF update.state == 'confirmed' && update.problem.state != 'hidden' -%] - [%- cobrand_data = update.cobrand_data; - cobrand_data = c.data_for_generic_update IF !update.cobrand; - IF cobrand_data; + <td rowspan=2> + [%~ IF update.state == 'confirmed' && update.problem.state != 'hidden' -%] + [%- cobrand_data = update.cobrand_data; + cobrand_data = c.data_for_generic_update IF !update.cobrand; + IF cobrand_data; uri = c.uri_for_email( '/report', update.problem.id, cobrand_data ); - ELSE; + ELSE; uri = c.uri_for_email( '/report', update.problem.id ); - END; - %] - <a href="[% uri %]#update_[% update.id %]" class="admin-offsite-link">[% update.id %]</a> - [%- ELSE %] - [%- update.id %] - [%- END -%]</td> + END; + %] + <a href="[% uri %]#update_[% update.id %]" class="admin-offsite-link">[% update.id %]</a> + [%- ELSE %] + [%- update.id %] + [%- END ~%] + </td> <td>[% PROCESS value_or_nbsp value=update.name %] <br>[% PROCESS value_or_nbsp value=update.user.email %] <br>[% loc('Anonymous') %]: [% IF update.anonymous %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %] @@ -38,13 +39,15 @@ [% loc('Created:') %] [% PROCESS format_time time=update.created %] <br>[% loc('Confirmed:') %] [% PROCESS format_time time=update.confirmed %] </small></td> - <td>[% update.text | html %]</td> - <td> + <td rowspan=2> [% IF c.user.has_permission_to('report_edit', update.problem.bodies_str_ids) %] <a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a> [% END %] </td> </tr> + <tr> + <td colspan=5>[% update.text | html %]</td> + </tr> [% END -%] </table> diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html index 794e19e4c..175863549 100644 --- a/templates/web/base/admin/report_edit.html +++ b/templates/web/base/admin/report_edit.html @@ -182,6 +182,31 @@ 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) %] + [% 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 %] + [% 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..fca9b1904 100644 --- a/templates/web/base/admin/update_edit.html +++ b/templates/web/base/admin/update_edit.html @@ -81,4 +81,24 @@ </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) %] + [% 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 %] + [% IF diff.extra %]<br>[% loc('Extra data:') %] [% diff.extra %][% END %] + </li> + [% last_history = history %] + [% END %] + </ul> +[% END %] + [% INCLUDE 'admin/footer.html' %] |