diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-04-23 16:12:07 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-04-23 16:12:07 +0000 |
commit | d051bf48fb53481082b12a6778e7c7863f1979ca (patch) | |
tree | c36b471fe04729755c3c3bb264f2698a08505384 /provisioning-listclasses-html.lsp | |
parent | 9e6bec69bac4ee45a8355aa5993bbd3f1c71dfcf (diff) | |
download | acf-provisioning-d051bf48fb53481082b12a6778e7c7863f1979ca.tar.bz2 acf-provisioning-d051bf48fb53481082b12a6778e7c7863f1979ca.tar.xz |
Changes to use new htmlviewfunctions functions
Diffstat (limited to 'provisioning-listclasses-html.lsp')
-rw-r--r-- | provisioning-listclasses-html.lsp | 16 |
1 files changed, 10 insertions, 6 deletions
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) %> -<h1>Classes</h1> +<% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %> <table id="list" class="tablesorter"><thead> <tr> <th>Action</th> @@ -42,17 +42,20 @@ html = require("acf.html") <th>Sequence</th> </tr> </thead><tbody> +<% 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 %> <tr> <td> - <% 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 %> </td> <td><%= html.html_escape(v.group) %></td> @@ -69,6 +72,7 @@ html = require("acf.html") <% if #view.value == 0 then %> <p>No classes found</p> <% end %> +<% htmlviewfunctions.displaysectionend(header_level) %> <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createclass") then viewlibrary.dispatch_component("createclass") |