<% local view, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% htmlviewfunctions.displaycommandresults({"deleteclassgroup", "editclassgroup"}, session) %> <% htmlviewfunctions.displaycommandresults({"createclassgroup"}, session, true) %> <% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %> <% 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 %> <% end %>
Action Name Label Sequence
<% class_group_id.value = v.class_group_id %> <% if viewlibrary.check_permission("editclassgroup") then %> <% 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) %> <%= html.html_escape(v.label) %> <%= html.html_escape(v.seq) %>
<% if view.errtxt then %>

<%= html.html_escape(view.errtxt) %>

<% end %> <% 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") end %>