From 96879a321edc0cfa3fe7a61d39963e9adaedce08 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 10 Apr 2014 05:42:04 +0000 Subject: Changes to use new htmlviewfunctions functions --- clamav-details-html.lsp | 5 +++-- clamav-listfiles-html.lsp | 12 +++++++++--- 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") %> -

<%= html.html_escape(data.label) %>

<% +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 @@ -41,20 +41,26 @@ end viewlibrary.dispatch_component("status") end %> -

<%= html.html_escape(data.label) %>

+<% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %> + +<% 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 %> - + + <% end %>
Action File Size Last Modified
<%= html.link{value = "expert?filename=" .. file.filename.."&redir="..page_info.orig_action, label=file.filename} %><% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Edit", action="expert"}), page_info, -1) %><%= html.html_escape(file.filename) %> <%= convertsize(file.filesize) %>b<%= html.html_escape(file.filesize) %> <%= html.html_escape(file.mtime) %>
+<% htmlviewfunctions.displaysectionend(header_level) %> -- cgit v1.2.3