From d079b238998b976b8ec0de29723c292e9870cd1e Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 17 Apr 2014 00:37:50 +0000 Subject: Changes to use new htmlviewfunctions functions --- shorewall-details-html.lsp | 5 +++-- shorewall-listfiles-html.lsp | 12 +++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/shorewall-details-html.lsp b/shorewall-details-html.lsp index e3fca74..f113c17 100644 --- a/shorewall-details-html.lsp +++ b/shorewall-details-html.lsp @@ -1,4 +1,4 @@ -<% local data, viewlibrary = ... +<% local data, viewlibrary, page_info, session = ... html = require("acf.html") %> @@ -6,7 +6,8 @@ html = require("acf.html") viewlibrary.dispatch_component("status") end %> -

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

+<% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %>
 <%= html.html_escape(data.value) %>
 
+<% htmlviewfunctions.displaysectionend(header_level) %> diff --git a/shorewall-listfiles-html.lsp b/shorewall-listfiles-html.lsp index ba21043..6f7f3f7 100644 --- a/shorewall-listfiles-html.lsp +++ b/shorewall-listfiles-html.lsp @@ -31,7 +31,7 @@ end @@ -41,19 +41,25 @@ 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 = "edit?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="edit"}), 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