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-listclasses-html.lsp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'provisioning-listclasses-html.lsp') diff --git a/provisioning-listclasses-html.lsp b/provisioning-listclasses-html.lsp index 59933d3..4770954 100644 --- a/provisioning-listclasses-html.lsp +++ b/provisioning-listclasses-html.lsp @@ -33,7 +33,7 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"deleteclass", "editclass"}, session) %> <% htmlviewfunctions.displaycommandresults({"createclass"}, session, true) %> -

Classes

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

No classes found

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