diff options
Diffstat (limited to 'weblog-viewwatchlist-html.lsp')
-rw-r--r-- | weblog-viewwatchlist-html.lsp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/weblog-viewwatchlist-html.lsp b/weblog-viewwatchlist-html.lsp new file mode 100644 index 0000000..d17a42f --- /dev/null +++ b/weblog-viewwatchlist-html.lsp @@ -0,0 +1,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 %> |