diff options
Diffstat (limited to 'templates/web/base/admin/timeline.html')
-rw-r--r-- | templates/web/base/admin/timeline.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/templates/web/base/admin/timeline.html b/templates/web/base/admin/timeline.html new file mode 100644 index 000000000..6bf350a58 --- /dev/null +++ b/templates/web/base/admin/timeline.html @@ -0,0 +1,44 @@ +[% INCLUDE 'admin/header.html' title=loc('Timeline') %] + +[%- BLOCK problem_name %] + [%- tprintf(loc('by %s'), problem.name) | html %] <[% problem.user.email | html %]>, '[% problem.title | html %]' +[%- END %] + +[%- date = '' %] +[% FOREACH moment IN time.keys.sort.reverse %] + [%- curdate = time.$moment.0.date.strftime('%A, %e %B %Y') -%] + [%- IF date != curdate %] + [% '</dl>' IF date %] + <h2>[% curdate %]</h2> + + <dl> + [%- date = curdate -%] + [%- END -%] + <dt><b>[% time.$moment.0.date.hms %]</b></dt> + <dd> + [% FOREACH item IN time.$moment %] + [%- SWITCH item.type -%] + [% CASE 'problemCreated' %] + [%- tprintf(loc('Problem %d created'), item.obj.id) %]; [% PROCESS problem_name problem=item.obj -%] + [% CASE 'problemConfirmed' %] + [%- tprintf( loc('Problem %s confirmed'), '<a href="' _ c.uri_for_email( '/report', item.obj.id ) _ '" class="admin-offsite-link">' _ item.obj.id _ '</a>') %]; [% PROCESS problem_name problem=item.obj -%] + [% CASE 'problemSent' %] + [% tprintf(loc("Problem %s sent to council %s"), '<a href="' _ c.uri_for_email( '/report', item.obj.id ) _ '" class="admin-offsite-link">' _ item.obj.id _ '</a>', item.obj.bodies_str ) %] + [% CASE 'quesSent' %] + [% tprintf(loc("Questionnaire %d sent for problem %d"), item.obj.id, item.obj.problem_id ) %] + [% CASE 'quesAnswered' %] + [% tprintf(loc("Questionnaire %d answered for problem %d, %s to %s"), item.obj.id, item.obj.problem_id, item.obj.old_state, item.obj.new_state ) %] + [% CASE 'update' %] + [% name = ( item.obj.name || 'anonymous' ) | html %] + [% tprintf(loc("Update %s created for problem %d; by %s"), "<a href='" _ c.uri_for_email( '/report', item.obj.problem_id ) _ "#update_" _ item.obj.id _ "' class='admin-offsite-link'>" _ item.obj.id _ "</a>", item.obj.problem_id, name) %] <[% item.obj.user.email | html %]> + [% CASE 'alertSub' %] + [% tprintf(loc("Alert %d created for %s, type %s, parameters %s / %s"), item.obj.id, item.obj.user.email, item.obj.alert_type.ref, item.obj.parameter, item.obj.parameter2) | html %] + [% CASE 'alertDel' %] + [% tprintf(loc("Alert %d disabled (created %s)"), item.obj.id, item.obj.whensubscribed.strftime('%H:%M:%S %e %B %Y') ) %] + [%- END %] + <br /> + [%- END %] + </dd> +[% END %] + +[% INCLUDE 'admin/footer.html' %] |