From 50b8c1bd4d52e53ab9ce98c67550b995a5682865 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 4 Feb 2014 17:02:41 +0000 Subject: Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags --- kamailio-viewtable-html.lsp | 54 +++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 17 deletions(-) (limited to 'kamailio-viewtable-html.lsp') diff --git a/kamailio-viewtable-html.lsp b/kamailio-viewtable-html.lsp index 5e8f83a..41b9b82 100644 --- a/kamailio-viewtable-html.lsp +++ b/kamailio-viewtable-html.lsp @@ -2,53 +2,73 @@ <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> + + + + + + <% htmlviewfunctions.displaycommandresults({"deletetableentry", "updatetableentry"}, session) %> <% htmlviewfunctions.displaycommandresults({"createtableentry"}, session, true) %> -

<%= html.html_escape(form.label) %> - <%= html.html_escape(form.value.table.value) %>

-
- - +

<%= html.html_escape(form.label) %> - <%= html.html_escape(form.value.table.value) %>

+
+ <% if viewlibrary.check_permission("deletetableentry") or viewlibrary.check_permission("updatetableentry") then %> - + <% end %> <% for i,f in ipairs(form.value.fields.value) do %> - + <% end %> - - + + <% for i,tableentry in ipairs(form.value.entries.value) do %> - + <% if viewlibrary.check_permission("deletetableentry") or viewlibrary.check_permission("updatetableentry") then %> - + <% end %> <% for i,f in ipairs(form.value.fields.value) do %> - + <% end %> - + <% end %> -
ActionAction<%= html.html_escape(f) %><%= html.html_escape(f) %>
+ <% if viewlibrary.check_permission("updatetableentry") then %> -
+
<% end %> <% if viewlibrary.check_permission("deletetableentry") then %> -
+
<% end %> -
<%= html.html_escape(tableentry[f]) %><%= html.html_escape(tableentry[f]) %>
+ <% if form.errtxt then %>

<%= html.html_escape(form.errtxt) %>

<% end %> <% if #form.value.entries.value == 0 then %>

No entries found

<% end %> -
<% if page_info.action == "viewtable" and viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createtableentry") then viewlibrary.dispatch_component("createtableentry", {table=form.value.table.value}) -- cgit v1.2.3