<% local data, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% htmlviewfunctions.displaycommandresults({"deletesource", "editsource", "testsource", "createsource", "importlogs"}, session) %> <% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %> <% local sourcename = cfe({ type="hidden", value="" }) %> <% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> <% for i,source in ipairs(data.value) do %> <% end %>
Action Name Enabled Source Method
<% sourcename.value = source.sourcename htmlviewfunctions.displayitem(cfe({type="link", value={sourcename=sourcename, redir=redir}, label="", option="Edit", action="editsource"}), page_info, -1) htmlviewfunctions.displayitem(cfe({type="form", value={sourcename=sourcename}, label="", option="Delete", action="deletesource" }), page_info, -1) htmlviewfunctions.displayitem(cfe({type="form", value={sourcename=sourcename}, label="", option="Test", action="testsource" }), page_info, -1) %> <%= html.html_escape(source.sourcename) %> <%= html.html_escape(tostring(source.enabled)) %> <%= html.html_escape(source.source) %> <%= html.html_escape(source.method) %>
<% if #data.value == 0 then %>

No sources found

<% end %> <% htmlviewfunctions.displayinfo(data) %> <% htmlviewfunctions.displayitem(cfe({type="link", value={redir=redir}, label="Create New Source", option="Create", action="createsource"}), page_info, 0) %> <% htmlviewfunctions.displayitem(cfe({type="form", value={}, label="Import Logs", option="Import", action="importlogs" }), page_info, 0) %> <% htmlviewfunctions.displaysectionend(header_level) %>