blob: d17a42ff2708fb83fdbbb1acdbfb50ba9fe48f9b (
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
|
<% local data, viewlibrary, page_info, session = ... %>
<% require("viewfunctions") %>
<link rel="stylesheet" type="text/css" href="/js/style.css">
<script type="text/javascript" src="/js/jquery-latest.js"></script>
<script type="text/javascript" src="/js/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#watchlist").tablesorter({headers: {0:{sorter: false}}});
});
</script>
<% displaycommandresults({"deletewatchlistentry"}, session) %>
<% displaycommandresults({"createwatchlistentry"}, session, true) %>
<H1><%= html.html_escape(data.label) %></H1>
<TABLE id="watchlist" class="tablesorter"><THEAD>
<TR style="background:#eee;font-weight:bold;">
<TH>Delete</TH>
<TH>User ID</TH>
<TH>Expiration Date</TH>
</TR>
</THEAD><TBODY>
<% for i,watch in ipairs(data.value) do %>
<TR>
<TD><%= html.link{value = "deletewatchlistentry?clientuserid="..watch.clientuserid, label="Delete "} %></TD>
<TD><%= html.link{value = "viewblocklog?clientuserid="..watch.clientuserid, label=watch.clientuserid} %></TD>
<TD><%= html.html_escape(watch.expiredatetime) %></TD>
</TR>
<% end %>
</TBODY></TABLE>
<% if data.errtxt then %>
<p class='error'><%= html.html_escape(data.errtxt) %></p>
<% end %>
<% if #data.value == 0 then %>
<p>No watchlist entries found</p>
<% end %>
<% if viewlibrary and viewlibrary.dispatch_component and session.permissions[page_info.controller].createwatchlistentry then
viewlibrary.dispatch_component("createwatchlistentry")
end %>
|