forked from chilek/lms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransactions.html
94 lines (83 loc) · 3.01 KB
/
transactions.html
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!--// $Id$ //-->
<FORM name="search" method="post" action="?m=archiveview">
<INPUT type="submit" class="hiddenbtn">
<INPUT type="hidden" name="search[resourcetype]" value="{$resourcetype}">
<INPUT type="hidden" name="search[resourceid]" value="{$resourceid}">
<INPUT type="hidden" name="search[userid]" value="{$userid}">
</FORM>
{tab_container id="transactions"}
{tab_header content_id="transactionpanel"}
{tab_header_cell icon="lms-ui-icon-transactions"}
<strong>{trans("Transaction Log:")}</strong> ({t a=300}last $a transactions{/t})
{/tab_header_cell}
{tab_header_cell}
<A href="#" id="more-transactions">{trans("More")} »</A>
{/tab_header_cell}
{/tab_header}
{tab_contents id="transactionpanel"}
{tab_table}
<TABLE id="transactions-datatable" class="lmsbox-inner{if $transactions} lms-ui-datatable{/if}"{if $transactions} data-order='[[ 0, "desc" ]]' data-page-length="10" style="display: none;"{/if} width="100%">
<COLGROUP>
<COL style="width: 1%;">
<COL style="width: 1%;">
<COL style="width: 1%;">
<COL style="width: 97%;">
</COLGROUP>
{if $transactions}
<THEAD>
<TR>
<TH class="bold nobr">{trans("Date:")}</TH>
<TH class="bold nobr">{trans("User:")}</TH>
<TH class="bold nobr">{trans("Module:")}</TH>
<TH class="bold nobr" data-orderable="false">{trans("Operations:")}</TH>
</TR>
</THEAD>
<TBODY>
{foreach $transactions as $tr}
<TR>
<TD class="valign-bottom nobr">
{$tr.time|date_format:"Y.m.d H:i:s"}
</TD>
<TD class="text-center valign-bottom nobr">
<a href="?m=userinfo&id={$tr.userid}">{$tr.login}</a>
</TD>
<TD class="text-center valign-bottom nobr">
{$tr.module}
</TD>
<TD class="valign-bottom">
{if $tr.messages}
{if count($tr.messages) > 10}{$start = 9 - count($tr.messages)}...<br>
{else}{$start=-1}{/if}
{section name=messages loop=$tr.messages start=$start step=-1}
{$message = $tr.messages[messages]}
<span class="bold">{SYSLOG::getResourceName($message.resource)}: <span style="{SYSLOG::getOperationStyle($message.operation)}">{SYSLOG::getOperationName($message.operation)}</span></span>
{foreach $message.keys as $key => $msgkey}{$key}: {if $msgkey.value}<a href="?m=archiveinfo&type={$msgkey.type}&id={$msgkey.value}&date={$tr.time}">{/if}{$msgkey.value}{if $msgkey.value}</a>{/if}{if !$msgkey@last}, {/if}{/foreach}
{foreach $message.data as $key => $value}{$key}: {$value}{if !$value@last}, {/if}{/foreach}
{if !$messages@last}<br>{/if}
{/section}
{/if}
</TD>
</TR>
{/foreach}
</TBODY>
{else}
<TBODY>
<TR>
<TD class="empty-table" colspan="4">
<p>{trans("No such transactions in database.")}</p>
</TD>
</TR>
</TBODY>
{/if}
</TABLE>
{/tab_table}
{/tab_contents}
{/tab_container}
<SCRIPT>
$(function() {
$('#more-transactions').click(function(e) {
e.stopPropagation();
$('form[name=search]').submit();
});
});
</SCRIPT>