summaryrefslogtreecommitdiffstats
path: root/provisioning-listgroups-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-04-23 16:12:07 +0000
committerTed Trask <ttrask01@yahoo.com>2014-04-23 16:12:07 +0000
commitd051bf48fb53481082b12a6778e7c7863f1979ca (patch)
treec36b471fe04729755c3c3bb264f2698a08505384 /provisioning-listgroups-html.lsp
parent9e6bec69bac4ee45a8355aa5993bbd3f1c71dfcf (diff)
downloadacf-provisioning-d051bf48fb53481082b12a6778e7c7863f1979ca.tar.bz2
acf-provisioning-d051bf48fb53481082b12a6778e7c7863f1979ca.tar.xz
Changes to use new htmlviewfunctions functions
Diffstat (limited to 'provisioning-listgroups-html.lsp')
-rw-r--r--provisioning-listgroups-html.lsp14
1 files changed, 9 insertions, 5 deletions
diff --git a/provisioning-listgroups-html.lsp b/provisioning-listgroups-html.lsp
index 9d8268b..b6435af 100644
--- a/provisioning-listgroups-html.lsp
+++ b/provisioning-listgroups-html.lsp
@@ -25,7 +25,7 @@ html = require("acf.html")
<% htmlviewfunctions.displaycommandresults({"deletegroup", "editgroup"}, session) %>
<% htmlviewfunctions.displaycommandresults({"creategroup"}, session, true) %>
-<h1>Groups</h1>
+<% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %>
<table id="list" class="tablesorter"><thead>
<tr>
<th>Action</th>
@@ -34,14 +34,17 @@ html = require("acf.html")
<th>Sequence</th>
</tr>
</thead><tbody>
+<% local group_id = cfe({ type="hidden", value="" }) %>
+<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %>
<% for k,v in ipairs( view.value ) do %>
<tr>
<td>
- <% if viewlibrary.check_permission("deletegroup") then %>
- <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletegroup?submit=true&group_id="..v.group_id, label="Delete ", class="deletegroup"} %>
- <% end %>
+ <% group_id.value = v.group_id %>
<% if viewlibrary.check_permission("editgroup") then %>
- <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editgroup?group_id="..v.group_id.."&redir="..page_info.orig_action, label="Edit "} %>
+ <% htmlviewfunctions.displayitem(cfe({type="link", value={group_id=group_id, redir=redir}, label="", option="Edit", action="editgroup"}), page_info, -1) %>
+ <% end %>
+ <% if viewlibrary.check_permission("deletegroup") then %>
+ <% htmlviewfunctions.displayitem(cfe({type="form", value={group_id=group_id}, label="", option="Delete", action="deletegroup", class="deletegroup"}), page_info, -1) %>
<% end %>
</td>
<td><%= html.html_escape(v.name) %></td>
@@ -58,6 +61,7 @@ html = require("acf.html")
<% if #view.value == 0 then %>
<p>No groups found</p>
<% end %>
+<% htmlviewfunctions.displaysectionend(header_level) %>
<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("creategroup") then
viewlibrary.dispatch_component("creategroup")