diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-04-13 22:28:28 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-04-13 22:28:28 +0000 |
commit | 018c7d1a0cef09a7558a7ee8970ab67c9dfc7cb8 (patch) | |
tree | 7e2a54b784c0286751ca7f8bdaf2751f921d785c | |
parent | cb12a51c84b10711f17dc86ccd1829f902357f96 (diff) | |
download | acf-postgresql-018c7d1a0cef09a7558a7ee8970ab67c9dfc7cb8.tar.bz2 acf-postgresql-018c7d1a0cef09a7558a7ee8970ab67c9dfc7cb8.tar.xz |
Changes to use new htmlviewfunctions functions
-rw-r--r-- | postgresql-details-html.lsp | 9 | ||||
-rw-r--r-- | 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") %> -<h2><%= html.html_escape(data.label) %></h2> -<% -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 <script type="text/javascript"> $(document).ready(function() { - $("#list").tablesorter({widgets: ['zebra']}); + $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); }); </script> @@ -41,19 +41,27 @@ end viewlibrary.dispatch_component("status") end %> -<h1><%= html.html_escape(data.label) %></h1> +<% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %> <table id="list" class="tablesorter"><thead> <tr> + <th>Action</th> <th>File</th> <th>Size</th> <th>Last Modified</th> </tr> </thead><tbody> +<% local filename = cfe({ type="hidden", value="" }) %> +<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> <% for i,file in ipairs(data.value) do %> <tr> - <td><%= html.link{value = "expert?filename=" .. file.filename.."&redir="..page_info.orig_action, label=file.filename} %></td> + <td><% + filename.value = file.filename + htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Edit", action="expert"}), page_info, -1) + %></td> + <td><%= html.html_escape(file.filename) %></td> <td><span style="display:none"><%= convertsize(file.filesize) %>b</span><%= html.html_escape(file.filesize) %></td> <td><%= html.html_escape(file.mtime) %></td> </tr> <% end %> </tbody></table> +<% htmlviewfunctions.displaysectionend(header_level) %> |