Show More
@@ -1,60 +1,65 b'' | |||||
1 | <%namespace name="base" file="/base/base.mako"/> |
|
1 | <%namespace name="base" file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | %if c.audit_logs: |
|
3 | %if c.audit_logs: | |
4 | <table class="rctable admin_log"> |
|
4 | <table class="rctable admin_log"> | |
5 | <tr> |
|
5 | <tr> | |
6 | <th>${_('Username')}</th> |
|
6 | <th>${_('Username')}</th> | |
7 | <th>${_('Action')}</th> |
|
7 | <th>${_('Action')}</th> | |
8 | <th>${_('Action Data')}</th> |
|
8 | <th>${_('Action Data')}</th> | |
9 | <th>${_('Repository')}</th> |
|
9 | <th>${_('Repository')}</th> | |
10 | <th>${_('Date')}</th> |
|
10 | <th>${_('Date')}</th> | |
11 | <th>${_('IP')}</th> |
|
11 | <th>${_('IP')}</th> | |
12 | </tr> |
|
12 | </tr> | |
13 |
|
13 | |||
14 | %for cnt,l in enumerate(c.audit_logs): |
|
14 | %for cnt,l in enumerate(c.audit_logs): | |
15 | <tr class="parity${cnt%2}"> |
|
15 | <tr class="parity${cnt%2}"> | |
16 | <td class="td-user"> |
|
16 | <td class="td-user"> | |
17 | %if l.user is not None: |
|
17 | %if l.user is not None: | |
18 | ${base.gravatar_with_user(l.user.email)} |
|
18 | ${base.gravatar_with_user(l.user.email)} | |
19 | %else: |
|
19 | %else: | |
20 | ${l.username} |
|
20 | ${l.username} | |
21 | %endif |
|
21 | %endif | |
22 | </td> |
|
22 | </td> | |
23 | <td class="td-journalaction"> |
|
23 | <td class="td-journalaction"> | |
24 | % if l.version == l.VERSION_1: |
|
24 | % if l.version == l.VERSION_1: | |
25 | ${h.action_parser(l)[0]()} |
|
25 | ${h.action_parser(l)[0]()} | |
26 | % else: |
|
26 | % else: | |
27 | ${h.literal(l.action)} |
|
27 | ${h.literal(l.action)} | |
28 | % endif |
|
28 | % endif | |
29 |
|
29 | |||
30 | <div class="journal_action_params"> |
|
30 | <div class="journal_action_params"> | |
31 | % if l.version == l.VERSION_1: |
|
31 | % if l.version == l.VERSION_1: | |
32 | ${h.literal(h.action_parser(l)[1]())} |
|
32 | ${h.literal(h.action_parser(l)[1]())} | |
33 | % endif |
|
33 | % endif | |
34 | </div> |
|
34 | </div> | |
35 | </td> |
|
35 | </td> | |
36 | <td> |
|
36 | <td> | |
37 | % if l.version == l.VERSION_2: |
|
37 | % if l.version == l.VERSION_2: | |
38 | ${l.action_data} |
|
38 | <a href="#" onclick="$('#entry-'+${l.user_log_id}).toggle();return false">${_('toggle')}</a> | |
|
39 | <div id="entry-${l.user_log_id}" style="display: none"> | |||
|
40 | <pre>${h.json.dumps(l.action_data, indent=4, sort_keys=True)}</pre> | |||
|
41 | </div> | |||
|
42 | % else: | |||
|
43 | ${_('not available in v1 type')} | |||
39 | % endif |
|
44 | % endif | |
40 | </td> |
|
45 | </td> | |
41 | <td class="td-componentname"> |
|
46 | <td class="td-componentname"> | |
42 | %if l.repository is not None: |
|
47 | %if l.repository is not None: | |
43 | ${h.link_to(l.repository.repo_name,h.url('summary_home',repo_name=l.repository.repo_name))} |
|
48 | ${h.link_to(l.repository.repo_name,h.url('summary_home',repo_name=l.repository.repo_name))} | |
44 | %else: |
|
49 | %else: | |
45 | ${l.repository_name} |
|
50 | ${l.repository_name} | |
46 | %endif |
|
51 | %endif | |
47 | </td> |
|
52 | </td> | |
48 |
|
53 | |||
49 | <td class="td-time">${h.format_date(l.action_date)}</td> |
|
54 | <td class="td-time">${h.format_date(l.action_date)}</td> | |
50 | <td class="td-ip">${l.user_ip}</td> |
|
55 | <td class="td-ip">${l.user_ip}</td> | |
51 | </tr> |
|
56 | </tr> | |
52 | %endfor |
|
57 | %endfor | |
53 | </table> |
|
58 | </table> | |
54 |
|
59 | |||
55 | <div class="pagination-wh pagination-left"> |
|
60 | <div class="pagination-wh pagination-left"> | |
56 | ${c.audit_logs.pager('$link_previous ~2~ $link_next')} |
|
61 | ${c.audit_logs.pager('$link_previous ~2~ $link_next')} | |
57 | </div> |
|
62 | </div> | |
58 | %else: |
|
63 | %else: | |
59 | ${_('No actions yet')} |
|
64 | ${_('No actions yet')} | |
60 | %endif No newline at end of file |
|
65 | %endif |
General Comments 0
You need to be logged in to leave comments.
Login now