diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-04-23 16:12:07 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-04-23 16:12:07 +0000 |
commit | d051bf48fb53481082b12a6778e7c7863f1979ca (patch) | |
tree | c36b471fe04729755c3c3bb264f2698a08505384 /provisioning-listfiles-html.lsp | |
parent | 9e6bec69bac4ee45a8355aa5993bbd3f1c71dfcf (diff) | |
download | acf-provisioning-d051bf48fb53481082b12a6778e7c7863f1979ca.tar.bz2 acf-provisioning-d051bf48fb53481082b12a6778e7c7863f1979ca.tar.xz |
Changes to use new htmlviewfunctions functions
Diffstat (limited to 'provisioning-listfiles-html.lsp')
-rw-r--r-- | provisioning-listfiles-html.lsp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/provisioning-listfiles-html.lsp b/provisioning-listfiles-html.lsp index b1c0e5e..8269e65 100644 --- a/provisioning-listfiles-html.lsp +++ b/provisioning-listfiles-html.lsp @@ -31,23 +31,31 @@ end <script type="text/javascript"> $(document).ready(function() { - $("#list").tablesorter({widgets: ['zebra']}); + $("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); }); </script> <% htmlviewfunctions.displaycommandresults({"editfile"}, session) %> -<h1>Provisioning Script Files</h1> +<% local header_level = htmlviewfunctions.displaysectionstart(view, 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) .. "/editfile?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="editfile"}), page_info, -1) %></td> + <td><%= html.html_escape(file.filename) %></td> + <td><span class="hide"><%= 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) %> |