diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-04-17 00:37:50 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-04-17 00:37:50 +0000 |
commit | d079b238998b976b8ec0de29723c292e9870cd1e (patch) | |
tree | c6b01e8fd548e3253cb37d7f6ef4b9bfaf7e6cd7 | |
parent | ceea735afcc0628fbc614fb216a9dc801f96883a (diff) | |
download | acf-shorewall-d079b238998b976b8ec0de29723c292e9870cd1e.tar.bz2 acf-shorewall-d079b238998b976b8ec0de29723c292e9870cd1e.tar.xz |
Changes to use new htmlviewfunctions functions
-rw-r--r-- | shorewall-details-html.lsp | 5 | ||||
-rw-r--r-- | 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 %> -<h2><%= html.html_escape(data.label) %></h2> +<% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %> <pre> <%= html.html_escape(data.value) %> </pre> +<% 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 <script type="text/javascript"> $(document).ready(function() { - $("#list").tablesorter({widgets: ['zebra']}); + $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); }); </script> @@ -41,19 +41,25 @@ 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 = "edit?filename=" .. file.filename.."&redir="..page_info.orig_action, label=file.filename} %></td> + <% filename.value = file.filename %> + <td><% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Edit", action="edit"}), 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) %> |