<% local view, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% htmlviewfunctions.displaycommandresults({"editsmtpfile", "delsmtpfile"}, session) %> <% htmlviewfunctions.displaycommandresults({"createsmtpfile"}, session, true) %> <% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %> <% local filename = cfe({ type="hidden", value="" }) %> <% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> <% for i,file in ipairs(view.value) do %> <% end %>
Action File Size Last Modified
<% filename.value = file.filename if viewlibrary.check_permission("editsmtpfile") then htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Edit", action="editsmtpfile"}), page_info, -1) end if viewlibrary.check_permission("delsmtpfile") then htmlviewfunctions.displayitem(cfe({type="form", value={filename=filename}, label="", option="Delete", action="delsmtpfile"}), page_info, -1) end %> <%= html.html_escape(file.filename) %> <%= html.html_escape(file.size or 0) %>b<%= format.formatfilesize(file.size) %> <%= format.formattime(file.mtime) %>
<% htmlviewfunctions.displaysectionend(header_level) %> <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createsmtpfile") then viewlibrary.dispatch_component("createsmtpfile") end %>