Commit 9a4319f2 authored by Ted Trask's avatar Ted Trask

Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags

parent ee94bc70
......@@ -3,29 +3,47 @@ htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>
<script type="text/javascript">
if (typeof jQuery == 'undefined') {
document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>');
}
</script>
<script type="text/javascript">
if (typeof $.tablesorter == 'undefined') {
document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"><\/script>');
}
</script>
<script type="text/javascript">
$(document).ready(function() {
$("#list").tablesorter({widgets: ['zebra']});
});
</script>
<% htmlviewfunctions.displaycommandresults({"deletepeer", "editpeer"}, session) %>
<% htmlviewfunctions.displaycommandresults({"createpeer"}, session, true) %>
<h1>Peer Files</h1>
<DL><TABLE>
<TR style="background:#eee;font-weight:bold;">
<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Action</TD>
<TD style="white-space:nowrap;text-align:left;" class="header">Peer File</TD>
</TR>
<table id="list" class="tablesorter"><thead>
<tr>
<th>Action</th>
<th>Peer File</th>
</tr>
</thead><tbody>
<% for i,file in ipairs(form.value) do %>
<TR>
<TD style="padding-right:20px;white-space:nowrap;">
<tr>
<td>
<%
if viewlibrary.check_permission("deletepeer") then io.write(html.link{value = "deletepeer?submit=true&name=" .. file, label="Delete " }) end
if viewlibrary.check_permission("editpeer") then io.write(html.link{value = "editpeer?name=" .. file.."&redir="..page_info.orig_action, label="Edit " }) end
%>
</TD>
<TD style="white-space:nowrap;" width="90%"><%= html.html_escape(string.gsub(file, "^.*/", "")) %></TD>
</TR>
</td>
<td><%= html.html_escape(string.gsub(file, "^.*/", "")) %></td>
</tr>
<% end %>
</TABLE></DL>
</tbody></table>
<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createpeer") then
viewlibrary.dispatch_component("createpeer")
end %>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment