diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-04-10 05:50:59 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-04-10 05:50:59 +0000 |
commit | 0f1a9c1d7a56b03579091d4b57acdebf8d4f48b1 (patch) | |
tree | 9abe1f76b4943967da5f3930fcbd1d550088c38d /dansguardian-listfiles-html.lsp | |
parent | 3cf639c412f6ddee6dd36711e5879f038b2e8668 (diff) | |
download | acf-dansguardian-0f1a9c1d7a56b03579091d4b57acdebf8d4f48b1.tar.bz2 acf-dansguardian-0f1a9c1d7a56b03579091d4b57acdebf8d4f48b1.tar.xz |
Changes to use new htmlviewfunctions functions
Diffstat (limited to 'dansguardian-listfiles-html.lsp')
-rw-r--r-- | dansguardian-listfiles-html.lsp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/dansguardian-listfiles-html.lsp b/dansguardian-listfiles-html.lsp index 930f3b3..3479e3c 100644 --- a/dansguardian-listfiles-html.lsp +++ b/dansguardian-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,17 +41,25 @@ end viewlibrary.dispatch_component("status") end %> -<h1>Configuration</h1> +<% local header_level = htmlviewfunctions.displaysectionstart(cfe({label="Configuration"}), 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> -<% - for k,v in ipairs( view.value ) do - io.write( "<tr><td><a href=\"" .. html.html_escape(page_info.script .. page_info.prefix .. page_info.controller) .. "/edit?filename=" .. html.html_escape(v.filename) .. "&redir=" .. html.html_escape(page_info.orig_action) .. "\">" .. html.html_escape(v.filename) .. '</a></td><td><span style="display:none">'..convertsize(v.size).."b</span>" .. html.html_escape(v.size) .."</td><td>" .. html.html_escape(v.mtime) .."</td></tr>\n" ) - end -%> +<% local filename = cfe({ type="hidden", value="" }) %> +<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> +<% for i,file in ipairs( view.value ) do %> + <% filename.value = file.filename %> + <tr> + <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.size) %>b</span><%= html.html_escape(file.size) %></td> + <td><%= html.html_escape(file.mtime) %></td> + <tr> +<% end %> </tbody></table> +<% htmlviewfunctions.displaysectionend(header_level) %> |