% local form, viewlibrary, page_info, session = ... %> <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> <% htmlviewfunctions.displaycommandresults({"deletetableentry", "updatetableentry"}, session) %> <% htmlviewfunctions.displaycommandresults({"createtableentry"}, session, true) %> <% form.label = form.label.." - "..form.value.table.value %> <% local header_level = htmlviewfunctions.displaysectionstart(form, page_info) %>
Action | <% end %> <% for i,f in ipairs(form.value.fields.value) do %><%= html.html_escape(f) %> | <% end %>
---|---|
<% if viewlibrary.check_permission("updatetableentry") then %> <% htmlviewfunctions.displayitem(cfe({type="link", value={table=table, id=id, redir=redir}, label="", option="Update", action="updatetableentry"}), page_info, -1) %> <% end %> <% if viewlibrary.check_permission("deletetableentry") then %> <% htmlviewfunctions.displayitem(cfe({type="form", value={table=table, id=id}, label="", option="Delete", action="deletetableentry", class="deletetableentry"}), page_info, -1) %> <% end %> | <% end %> <% for i,f in ipairs(form.value.fields.value) do %><%= html.html_escape(tableentry[f]) %> | <% end %>
No entries found
<% end %> <% htmlviewfunctions.displaysectionend(header_level) %> <% if page_info.action == "viewtable" and viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createtableentry") then viewlibrary.dispatch_component("createtableentry", {table=form.value.table.value}) end %>