<% local view, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% htmlviewfunctions.displaycommandresults({"editpasswdentry"}, session) %> <% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %> <% htmlviewfunctions.displayitem(view.value.filename) %> <% if view.value.data then %> <% for i,f in ipairs(view.value.fields.value) do %> <% end %> <% local filename = cfe({ type="hidden", value=view.value.filename.value }) %> <% local entry = cfe({ type="hidden", value="" }) %> <% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> <% -- This is a hack to redirect back to viewing the same file redir.value = redir.value.."?filename="..html.url_encode(view.value.filename.value) %> <% for i,r in ipairs( view.value.data.value ) do %> <% for j,f in ipairs(r) do %> <% end %> <% end %>
Action<%= html.html_escape(f) %>
<% entry.value = i %> <% if viewlibrary.check_permission("editpasswdentry") then %> <% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, entry=entry, redir=redir}, label="", option="Edit", action="editpasswdentry"}), page_info, -1) %> <% end %> <%= html.html_escape(f) %>
<% end %> <% htmlviewfunctions.displaysectionend(header_level) %>