From 2e9893a02d83e1b0c93756ae16dd67e91ef5f2c3 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sat, 28 Jun 2014 20:59:24 +0000 Subject: Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, use lowercase tags, remove styling, and use new htmlviewfunctions functions --- db-listdatabases-html.lsp | 59 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 14 deletions(-) (limited to 'db-listdatabases-html.lsp') diff --git a/db-listdatabases-html.lsp b/db-listdatabases-html.lsp index 4fd9362..b4c6694 100644 --- a/db-listdatabases-html.lsp +++ b/db-listdatabases-html.lsp @@ -1,19 +1,50 @@ <% local form, viewlibrary, page_info, session = ... %> -<% require("htmlviewfunctions") %> +<% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> -

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

-
-<% if form.errtxt then %>

<%= string.gsub(html.html_escape(form.errtxt), "\n", "
") %>

<% end %> -<% for i,database in ipairs(form.value) do %> -
  • - <% if viewlibrary.check_permission("listtables") then %> - <%= html.link{value = "listtables?database=" .. database, label=database} %> - <% else %> - <%= html.html_escape(database) %> - <% end %> +<% if #form.value>0 then %> + + + + + +<% end %> + +<% local header_level = htmlviewfunctions.displaysectionstart(form, page_info) %> +<% htmlviewfunctions.displayinfo(form) %> +<% if #form.value>0 then %> + + + + + + +<% local database = cfe({ type="hidden" }) %> +<% for i,dbase in ipairs(form.value) do %> + <% database.value = dbase %> + + + + <% end %> -<% if #form.value == 0 then %> -No databases found +
    ActionDatabase
    + <% if viewlibrary.check_permission("listtables") then %> + <% htmlviewfunctions.displayitem(cfe({type="link", value={database=database}, label="", option="View", action="listtables"}), page_info, -1) %> + <% end %> + <%= html.html_escape(dbase) %>
    +<% else %> +

    No databases found

    <% end %> -
  • +<% htmlviewfunctions.displaysectionend(header_level) %> -- cgit v1.2.3