From cc4fd41686f103acdc72c72a8e8295c3c169a28f Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 3 Feb 2014 21:32:09 +0000 Subject: Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags --- ipsectools-details-html.lsp | 20 +++++++++---------- ipsectools-listcerts-html.lsp | 45 +++++++++++++++++++++++++++++------------- ipsectools-uploadcert-html.lsp | 2 +- ipsectools-viewcert-html.lsp | 2 +- 4 files changed, 42 insertions(+), 27 deletions(-) diff --git a/ipsectools-details-html.lsp b/ipsectools-details-html.lsp index b1df6a7..1e8bfe6 100644 --- a/ipsectools-details-html.lsp +++ b/ipsectools-details-html.lsp @@ -5,33 +5,31 @@ html = require("acf.html") <% viewlibrary.dispatch_component("status") %> -

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

-
+

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

<% if not data.value.show_isakmp or #data.value.show_isakmp.value == 0 then - io.write("No status details available") + io.write("

No status details available

") else for i,entry in pairs(data.value.show_isakmp.value) do if (type(entry) == "table") and (entry.Destination) and (entry.Destination.value) and (#entry.Destination.value > 0) then - io.write("

".. html.html_escape(entry.Destination.value) .. "

") - io.write("\n") + io.write(".png' width='16' height='16'> ".. html.html_escape(entry.Destination.value) .. "") + io.write("
\n") local tags = {"Created","Source","Destination", "St", "Phase2details"} for j,tag in pairs(tags) do - io.write("") + io.write("") end - io.write("
" .. - html.html_escape(entry[tag].label) .. ""..string.gsub(html.html_escape(entry[tag].value), "\n", "
")) + io.write("
" .. + html.html_escape(entry[tag].label) .. ""..string.gsub(html.html_escape(entry[tag].value), "\n", "
")) if (entry[tag].descr) and (#entry[tag].descr > 0) then io.write(" (".. html.html_escape(entry[tag].descr) .. ")") end - io.write("
") + io.write("") end end end --htmlviewfunctions.displayitem(data.value.ip_xfrm_policy) %> -
diff --git a/ipsectools-listcerts-html.lsp b/ipsectools-listcerts-html.lsp index e7a30dc..465d0e7 100644 --- a/ipsectools-listcerts-html.lsp +++ b/ipsectools-listcerts-html.lsp @@ -2,29 +2,46 @@ <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> + + + + + + <% htmlviewfunctions.displaycommandresults({"deletecert"}, session) %> <% htmlviewfunctions.displaycommandresults({"uploadcert"}, session, true) %> -

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

- -
- - - - - +

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

+
ActionCertificate
+ + + + + <% for i,cert in ipairs(view.value) do %> - - + - - + + + <% end %> -
ActionCertificate
+
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletecert?submit=true&cert="..cert, label="Delete "} %> <% if not string.find(cert, "%-key") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/viewcert?cert="..cert, label="View "} %> <% end %> - <%= html.html_escape(cert) %>
<%= html.html_escape(cert) %>
+ <% if viewlibrary.dispatch_component and viewlibrary.check_permission("uploadcert") then viewlibrary.dispatch_component("uploadcert") diff --git a/ipsectools-uploadcert-html.lsp b/ipsectools-uploadcert-html.lsp index 4f9d5ee..41048e4 100644 --- a/ipsectools-uploadcert-html.lsp +++ b/ipsectools-uploadcert-html.lsp @@ -2,7 +2,7 @@ <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> -

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

+

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

<% form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action form.enctype = "multipart/form-data" diff --git a/ipsectools-viewcert-html.lsp b/ipsectools-viewcert-html.lsp index d31c1eb..fb8b196 100644 --- a/ipsectools-viewcert-html.lsp +++ b/ipsectools-viewcert-html.lsp @@ -3,7 +3,7 @@ <% html = require("acf.html") %> <% if view.value.result then %> -

Certificate Details

+

Certificate Details

<% htmlviewfunctions.displayitem(view.value.cert, 1, page_info) %>
<%= html.html_escape(view.value.result.value) %>
<% else -- cgit v1.2.3