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-listfiles-html.lsp | 34 ++++++++++++++++++------ kamailio-listtables-html.lsp | 12 ++++----- kamailio-listusers-html.lsp | 56 +++++++++++++++++++++++++++------------- kamailio-searchdatabase-html.lsp | 2 +- kamailio-viewtable-html.lsp | 54 ++++++++++++++++++++++++++------------ 5 files changed, 108 insertions(+), 50 deletions(-) diff --git a/kamailio-listfiles-html.lsp b/kamailio-listfiles-html.lsp index d63398c..564dcce 100644 --- a/kamailio-listfiles-html.lsp +++ b/kamailio-listfiles-html.lsp @@ -3,6 +3,24 @@ htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> + + + + + + <% htmlviewfunctions.displaycommandresults({"edit"}, session) %> <% if viewlibrary and viewlibrary.dispatch_component then @@ -10,16 +28,16 @@ html = require("acf.html") end %>

Configuration

-
- - - - - - +
FileSizeLast Modified
+ + + + + + <% for k,v in ipairs( view.value ) do io.write( "\n" ) end %> -
FileSizeLast Modified
" .. html.html_escape(v.filename) .. "" .. html.html_escape(v.size) .."" .. html.html_escape(v.mtime) .."
+ diff --git a/kamailio-listtables-html.lsp b/kamailio-listtables-html.lsp index e6f8733..801a433 100644 --- a/kamailio-listtables-html.lsp +++ b/kamailio-listtables-html.lsp @@ -4,8 +4,7 @@ <% htmlviewfunctions.displaycommandresults({"createdatabase"}, session) %> -

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

-
+

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

<% for i,table in ipairs(form.value) do %>
  • <% if viewlibrary.check_permission("viewtable") then %> @@ -14,11 +13,12 @@ <%= html.html_escape(table) %> <% end %> <% end %> + <% if #form.value == 0 and viewlibrary.check_permission("createdatabase") then %> -
    Create Database
    +

    Create Database

    +
    "> -
    + - + <% end %> -
  • diff --git a/kamailio-listusers-html.lsp b/kamailio-listusers-html.lsp index c631716..0b7183f 100644 --- a/kamailio-listusers-html.lsp +++ b/kamailio-listusers-html.lsp @@ -2,42 +2,62 @@ <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> + + + + + + <% htmlviewfunctions.displaycommandresults({"deleteuser", "updateuser"}, session) %> <% htmlviewfunctions.displaycommandresults({"createuser"}, session, true) %> -

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

    -
    - - +

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

    +
    + <% if viewlibrary.check_permission("deleteuser") or viewlibrary.check_permission("updateuser") then %> - + <% end %> - - - - + + + + <% for i,user in ipairs(form.value) do %> - + <% if viewlibrary.check_permission("deleteuser") or viewlibrary.check_permission("updateuser") then %> - + <% end %> - + <% if viewlibrary.check_permission("updateuser") then %> - + <% else %> - + <% end %> - + <% end %> -
    ActionActionUser NamePassword
    User NamePassword
    + <% if viewlibrary.check_permission("updateuser") then %> <%= html.link{value = "updateuser?username=" .. user.username.."&redir="..page_info.orig_action, label="Update "} %> <% end %> <% if viewlibrary.check_permission("deleteuser") then %> <%= html.link{value = "deleteuser?submit=true&username=" .. user.username, label="Delete "} %> <% end %> - <%= html.html_escape(user.username) %><%= html.html_escape(user.username) %><%= html.html_escape(user.password) %><%= html.html_escape(user.password) %>************
    -
    + <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createuser") then viewlibrary.dispatch_component("createuser") diff --git a/kamailio-searchdatabase-html.lsp b/kamailio-searchdatabase-html.lsp index 8a55f48..257626d 100644 --- a/kamailio-searchdatabase-html.lsp +++ b/kamailio-searchdatabase-html.lsp @@ -21,7 +21,7 @@ html = require("acf.html") form.value.fields = nil end %> -

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

    +

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

    <% form.value.result = nil form.option = "Search" 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