summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clamav-details-html.lsp5
-rw-r--r--clamav-listfiles-html.lsp12
2 files changed, 12 insertions, 5 deletions
diff --git a/clamav-details-html.lsp b/clamav-details-html.lsp
index 78db808..7a71ba1 100644
--- a/clamav-details-html.lsp
+++ b/clamav-details-html.lsp
@@ -1,11 +1,12 @@
-<% local data, viewlibrary = ...
+<% local data, viewlibrary, page_info, session = ...
htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>
<% viewlibrary.dispatch_component("status") %>
-<h2><%= html.html_escape(data.label) %></h2>
<%
+local header_level = htmlviewfunctions.displaysectionstart(data, page_info)
htmlviewfunctions.displayitem(data)
+htmlviewfunctions.displaysectionend(header_level)
%>
diff --git a/clamav-listfiles-html.lsp b/clamav-listfiles-html.lsp
index d07bb2d..1bc85ae 100644
--- a/clamav-listfiles-html.lsp
+++ b/clamav-listfiles-html.lsp
@@ -31,7 +31,7 @@ end
<script type="text/javascript">
$(document).ready(function() {
- $("#list").tablesorter({widgets: ['zebra']});
+ $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']});
});
</script>
@@ -41,20 +41,26 @@ end
viewlibrary.dispatch_component("status")
end %>
-<h1><%= html.html_escape(data.label) %></h1>
+<% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %>
<table id="list" class="tablesorter"><thead>
<tr>
+ <th>Action</th>
<th>File</th>
<th>Size</th>
<th>Last Modified</th>
</tr>
</thead><tbody>
+<% local filename = cfe({ type="hidden", value="" }) %>
+<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %>
<% for i,file in ipairs(data.value) do %>
+ <% filename.value = file.filename %>
<tr>
- <td><%= html.link{value = "expert?filename=" .. file.filename.."&redir="..page_info.orig_action, label=file.filename} %></td>
+ <td><% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Edit", action="expert"}), page_info, -1) %></td>
+ <td><%= html.html_escape(file.filename) %></td>
<td><span style="display:none"><%= convertsize(file.filesize) %>b</span><%= html.html_escape(file.filesize) %></td>
<td><%= html.html_escape(file.mtime) %></td>
</tr>
<% end %>
</tbody></table>
+<% htmlviewfunctions.displaysectionend(header_level) %>