diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-04-17 00:55:44 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-04-17 00:55:44 +0000 |
commit | fb7ce759c1045daf20e416547e6111f796030b60 (patch) | |
tree | fdc449de923b3e925d3f686e082d6454e519df10 /weblog-listfiles-html.lsp | |
parent | d77bf9609380d27301abeba31e467039517cb8d5 (diff) | |
download | acf-weblog-fb7ce759c1045daf20e416547e6111f796030b60.tar.bz2 acf-weblog-fb7ce759c1045daf20e416547e6111f796030b60.tar.xz |
Started changes to use new htmlviewfunctions functions
Still work to do to remove styling and long messy links
Diffstat (limited to 'weblog-listfiles-html.lsp')
-rw-r--r-- | weblog-listfiles-html.lsp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/weblog-listfiles-html.lsp b/weblog-listfiles-html.lsp index ea2ab2c..a5f28b8 100644 --- a/weblog-listfiles-html.lsp +++ b/weblog-listfiles-html.lsp @@ -31,21 +31,32 @@ end <script type="text/javascript"> $(document).ready(function() { - $("#files").tablesorter({headers: {1:{sorter: 'digit'}, 2:{sorter: 'usLongDate'}}, widgets: ['zebra']}); + $("#files").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']}); }); </script> <% htmlviewfunctions.displaycommandresults({"editfile"}, session) %> -<h1>File List</h1> +<% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %> <table id="files" 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 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) %> |