From 018c7d1a0cef09a7558a7ee8970ab67c9dfc7cb8 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sun, 13 Apr 2014 22:28:28 +0000 Subject: Changes to use new htmlviewfunctions functions --- postgresql-details-html.lsp | 9 ++++----- postgresql-listfiles-html.lsp | 14 +++++++++++--- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/postgresql-details-html.lsp b/postgresql-details-html.lsp index 78db808..831e9f3 100644 --- a/postgresql-details-html.lsp +++ b/postgresql-details-html.lsp @@ -1,11 +1,10 @@ -<% 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) %>

-<% -htmlviewfunctions.displayitem(data) -%> +<% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %> +<% htmlviewfunctions.displayitem(data) %> +<% htmlviewfunctions.displaysectionend(header_level) %> diff --git a/postgresql-listfiles-html.lsp b/postgresql-listfiles-html.lsp index 41849e2..c571b48 100644 --- a/postgresql-listfiles-html.lsp +++ b/postgresql-listfiles-html.lsp @@ -31,7 +31,7 @@ end @@ -41,19 +41,27 @@ 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 %> - + + <% end %>
Action File Size Last Modified
<%= html.link{value = "expert?filename=" .. file.filename.."&redir="..page_info.orig_action, label=file.filename} %><% + filename.value = 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