[% INCLUDE 'admin/header.html' title=loc('Timeline') _ ', ' _ user.name %]
[%
action_map = {
add = 'Added'
delete = 'Deleted'
edit = 'Edited'
merge = 'Merged'
moderation = 'Moderated'
resend = 'Resent'
category_change = 'Changed category of'
state_change = 'Changed state of'
}
%]
[%- date = '' %]
[% FOREACH moment IN time.keys.sort.reverse %]
[%- curdate = time.$moment.0.date.strftime('%A, %e %B %Y') -%]
[%- IF date != curdate %]
[% '' IF date %]
[% curdate %]
[%- date = curdate -%]
[%- END -%]
- [% time.$moment.0.date.hms %]
[% FOREACH item IN time.$moment %]
-
[%~ IF item.obj.problem_id %]
[%~ SET report_url = c.uri_for( '/report', item.obj.problem_id ) _ "#update_" _ item.obj.id %]
[%~ ELSE %]
[%~ SET report_url = c.uri_for('/report', item.obj.id) %]
[%~ END %]
[%~ SET report_link = "" _ item.obj.id _ "" %]
[%- SWITCH item.type -%]
[%~ CASE 'problem' %]
[%- tprintf(loc('Problem %s created'), mark_safe(report_link)) %], ‘[% item.obj.title | html %]’
[%~ CASE 'problemContributedBy' %]
[%- tprintf(loc('Problem %s created on behalf of %s'), mark_safe(report_link), item.obj.name) %], ‘[% item.obj.title | html %]’
[%~ CASE 'update' %]
[% tprintf(loc("Update %s created for problem %d"), mark_safe(report_link), item.obj.problem_id) %]
[% item.obj.text | add_links | markup(item.obj.user) | html_para %]
[%~ CASE 'shortlistAdded' %]
[%- tprintf(loc('Problem %s added to shortlist'), mark_safe(report_link)) %]
[%~ CASE 'shortlistRemoved' %]
[%- tprintf(loc('Problem %s removed from shortlist'), mark_safe(report_link)) %]
[%~ CASE 'log' %]
[%~ SET object_summary = item.log.object_summary %]
[% IF object_summary %]
[%~ SET link = tprintf('%s', item.log.link, object_summary) %]
[%- tprintf('%s %s %s', action_map.${item.log.action}, item.log.actual_object_type, mark_safe(link)) %]
[% ' – ' _ item.log.reason IF item.log.reason %]
[% ELSE %]
[%- tprintf('%s %s %s', action_map.${item.log.action}, item.log.actual_object_type, item.log.object_id) %]
[% END %]
[%- END %]
[%- END %]
[% END %]
[% INCLUDE 'admin/footer.html' %]