From d051bf48fb53481082b12a6778e7c7863f1979ca Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 23 Apr 2014 16:12:07 +0000 Subject: Changes to use new htmlviewfunctions functions --- provisioning-listclassgroups-html.lsp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'provisioning-listclassgroups-html.lsp') diff --git a/provisioning-listclassgroups-html.lsp b/provisioning-listclassgroups-html.lsp index 8a23ad4..3ba750f 100644 --- a/provisioning-listclassgroups-html.lsp +++ b/provisioning-listclassgroups-html.lsp @@ -25,7 +25,7 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"deleteclassgroup", "editclassgroup"}, session) %> <% htmlviewfunctions.displaycommandresults({"createclassgroup"}, session, true) %> -

Class Groups

+<% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %> @@ -34,14 +34,17 @@ html = require("acf.html") +<% local class_group_id = cfe({ type="hidden", value="" }) %> +<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> <% for k,v in ipairs( view.value ) do %> @@ -58,6 +61,7 @@ html = require("acf.html") <% if #view.value == 0 then %>

No class groups found

<% end %> +<% htmlviewfunctions.displaysectionend(header_level) %> <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createclassgroup") then viewlibrary.dispatch_component("createclassgroup") -- cgit v1.2.3
ActionSequence
- <% if viewlibrary.check_permission("deleteclassgroup") then %> - <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleteclassgroup?submit=true&class_group_id="..v.class_group_id, label="Delete ", class="deletegroup"} %> - <% end %> + <% class_group_id.value = v.class_group_id %> <% if viewlibrary.check_permission("editclassgroup") then %> - <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editclassgroup?class_group_id="..v.class_group_id.."&redir="..page_info.orig_action, label="Edit "} %> + <% htmlviewfunctions.displayitem(cfe({type="link", value={class_group_id=class_group_id, redir=redir}, label="", option="Edit", action="editclassgroup"}), page_info, -1) %> + <% end %> + <% if viewlibrary.check_permission("deleteclassgroup") then %> + <% htmlviewfunctions.displayitem(cfe({type="form", value={class_group_id=class_group_id}, label="", option="Delete", action="deleteclassgroup", class="deletegroup"}), page_info, -1) %> <% end %> <%= html.html_escape(v.name) %>