summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-04-10 06:23:54 +0000
committerTed Trask <ttrask01@yahoo.com>2014-04-10 06:23:54 +0000
commitc89ce7c262be85419e22a168963b30d079e13c4d (patch)
treecc940d74a96266cabe6cb033da48023d96364d35
parent8dd18fc4b8a97bc50dd030db5ae5bc0c5310799b (diff)
downloadacf-freeswitch-c89ce7c262be85419e22a168963b30d079e13c4d.tar.bz2
acf-freeswitch-c89ce7c262be85419e22a168963b30d079e13c4d.tar.xz
Changes to use new htmlviewfunctions functions
-rw-r--r--freeswitch-listfiles-html.lsp25
1 files changed, 12 insertions, 13 deletions
diff --git a/freeswitch-listfiles-html.lsp b/freeswitch-listfiles-html.lsp
index 02fc1e2..92265ed 100644
--- a/freeswitch-listfiles-html.lsp
+++ b/freeswitch-listfiles-html.lsp
@@ -42,7 +42,7 @@ 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>
@@ -51,14 +51,17 @@ end %>
<th>Last Modified</th>
</tr>
</thead><tbody>
+<% local filename = cfe({ type="hidden", value="" }) %>
+<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %>
<% for k,v in ipairs( view.value ) do %>
<tr>
<td>
+ <% filename.value = v.filename %>
<% if viewlibrary.check_permission("editfile") then %>
- <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editfile?filename="..v.filename.."&redir="..page_info.orig_action, label="Edit "} %>
+ <% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Edit", action="editfile"}), page_info, -1) %>
<% end %>
<% if viewlibrary.check_permission("deletefile") then %>
- <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletefile?submit=true&filename="..v.filename, label="Delete "} %>
+ <% htmlviewfunctions.displayitem(cfe({type="form", value={filename=filename}, label="", option="Delete", action="deletefile"}), page_info, -1) %>
<% end %>
</td>
<td><%= html.html_escape(v.filename) %></td>
@@ -69,18 +72,14 @@ end %>
</tbody></table>
<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createfile") then
- local createform = viewlibrary.dispatch_component("createfile", nil, true) %>
-<h2><%= html.html_escape(createform.label) %></h2>
-<%
+ local createform = viewlibrary.dispatch_component("createfile", nil, true)
createform.action = page_info.script .. page_info.prefix .. page_info.controller .. "/createfile"
- htmlviewfunctions.displayform(createform)
+ htmlviewfunctions.displayitem(createform, page_info, htmlviewfunctions.incrementheader(header_level))
end %>
+<% htmlviewfunctions.displaysectionend(header_level) %>
<% if viewlibrary.check_permission("reloadxml") then %>
-<h1>Reload XML</h1>
- <div class='item'><p class='left'>Reload XML</p>
- <div class='right'>
- <form action="<%= html.html_escape(page_info.script .. page_info.prefix) %>freeswitch/reloadxml" method="post">
- <input class="submit" type="submit" name="submit" value="Reload"></form>
- </div></div><!-- end .item -->
+<% htmlviewfunctions.displaysectionstart(cfe({label="Reload XML"}), page_info, header_level) %>
+<% htmlviewfunctions.displayitem(cfe({type="form", value={filename=filename}, label="Reload XML", option="Reload", action="reloadxml"}), page_info, 0) %>
+<% htmlviewfunctions.displaysectionend(header_level) %>
<% end %>