aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default/admin/timeline.html
blob: 2e4c3b771754152931ec64aa7267083b355abe75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 ) _ '">' _ 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 ) _ '">' _ 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 _ "'>" _ item.obj.id _ "</a>", item.obj.problem_id, name) %] &lt;[% item.obj.user.email | html %]&gt;
            [% 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' %]