<% local data, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% htmlviewfunctions.displaycommandresults({"editentry", "deleteentry", "createentry"}, session) %> <% local header_level = htmlviewfunctions.displaysectionstart(data, page_info) %> <% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> <% for i,entry in ipairs(data.value) do %> <% end %>
Action Remote Host Enabled Method Remote Mailbox / Domain
<% local remotehost = cfe({ type="hidden", value=entry.remotehost }) local entrymethod = cfe({ type="hidden", value=entry.method }) local remotemailbox = cfe({ type="hidden", value=entry.remotemailbox }) local localdomain = cfe({ type="hidden", value=entry.localdomain }) htmlviewfunctions.displayitem(cfe({type="link", value={remotehost=remotehost, method=entrymethod, remotemailbox=remotemailbox, localdomain=localdomain, redir=redir}, label="", option="Edit", action="editentry"}), page_info, -1) htmlviewfunctions.displayitem(cfe({type="form", value={remotehost=remotehost, method=entrymethod, remotemailbox=remotemailbox, localdomain=localdomain}, label="", option="Delete", action="deleteentry"}), page_info, -1) %> <%= html.html_escape(entry.remotehost) %> <%= html.html_escape(tostring(entry.enabled)) %> <%= html.html_escape(entry.method) %> <% if entry.localdomain and entry.localdomain ~= "" then io.write(html.html_escape(entry.localdomain)) else io.write(html.html_escape(entry.remotemailbox)) end %>
<% htmlviewfunctions.displayitem(cfe({type="link", value={redir=redir}, label="Add new entry", option="New", action="createentry"}), page_info, 0) %> <% htmlviewfunctions.displaysectionend(header_level) %>