summaryrefslogtreecommitdiffstats
path: root/dansguardian-listfiles-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'dansguardian-listfiles-html.lsp')
-rw-r--r--dansguardian-listfiles-html.lsp22
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) %>