summaryrefslogtreecommitdiffstats
path: root/kamailio-viewtable-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'kamailio-viewtable-html.lsp')
-rw-r--r--kamailio-viewtable-html.lsp55
1 files changed, 0 insertions, 55 deletions
diff --git a/kamailio-viewtable-html.lsp b/kamailio-viewtable-html.lsp
deleted file mode 100644
index e1531d0..0000000
--- a/kamailio-viewtable-html.lsp
+++ /dev/null
@@ -1,55 +0,0 @@
-<% local form, viewlibrary, page_info, session = ... %>
-<% require("htmlviewfunctions") %>
-<% html = require("acf.html") %>
-
-<% htmlviewfunctions.displaycommandresults({"deletetableentry", "updatetableentry"}, session) %>
-<% htmlviewfunctions.displaycommandresults({"createtableentry"}, session, true) %>
-
-<H1><%= html.html_escape(form.label) %> - <%= html.html_escape(form.value.table.value) %></H1>
-<DL>
-<TABLE>
- <TR style="background:#eee;font-weight:bold;">
- <% if viewlibrary.check_permission("deletetableentry") or viewlibrary.check_permission("updatetableentry") then %>
- <TD style="padding-right:20px;white-space:nowrap;" class="header">Action</TD>
- <% end %>
- <% for i,f in ipairs(form.value.fields.value) do %>
- <TD style="padding-right:20px;white-space:nowrap;" class="header"><%= html.html_escape(f) %></TD>
- <% end %>
- </TR>
-
-<% for i,tableentry in ipairs(form.value.entries.value) do %>
- <TR>
- <% if viewlibrary.check_permission("deletetableentry") or viewlibrary.check_permission("updatetableentry") then %>
- <TD style="padding-right:20px;white-space:nowrap;">
- <% if viewlibrary.check_permission("updatetableentry") then %>
- <form action="updatetableentry" method="POST">
- <input class="hidden" type="hidden" name="table" value="<%= html.html_escape(form.value.table.value) %>">
- <input class="hidden" type="hidden" name="id" value="<%= html.html_escape(tableentry.id) %>">
- <input class="hidden" type="hidden" name="redir" value="<%= html.html_escape(page_info.orig_action.."?table="..form.value.table.value) %>">
- <input class="submit" type="submit" value="Update"></form>
- <% end %>
- <% if viewlibrary.check_permission("deletetableentry") then %>
- <form action="deletetableentry" method="POST">
- <input class="hidden" type="hidden" name="table" value="<%= html.html_escape(form.value.table.value) %>">
- <input class="hidden" type="hidden" name="id" value="<%= html.html_escape(tableentry.id) %>">
- <input class="submit" type="submit" name="submit" value="Delete"></form>
- <% end %>
- </TD>
- <% end %>
- <% for i,f in ipairs(form.value.fields.value) do %>
- <TD><%= html.html_escape(tableentry[f]) %></TD>
- <% end %>
- </TR>
-<% end %>
-</TABLE>
-<% if form.errtxt then %>
-<p class="error"><%= html.html_escape(form.errtxt) %></p>
-<% end %>
-<% if #form.value.entries.value == 0 then %>
-<p>No entries found</p>
-<% end %>
-</DL>
-
-<% 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})
-end %>