<% local view, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% htmlviewfunctions.displaycommandresults({"editshare", "deleteshare"}, session) %> <% htmlviewfunctions.displaycommandresults({"createshare"}, session, true) %> <% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %> <% local name = cfe({ type="hidden", value="" }) %> <% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> <% for i,share in ipairs(view.value) do %> <% name.value = share.name %> <% end %>
Action Name Path Comment
<% if viewlibrary.check_permission("editshare") then %> <% htmlviewfunctions.displayitem(cfe({type="link", value={name=name, redir=redir}, label="", option="Edit", action="editshare"}), page_info, -1) %> <% end %> <% if viewlibrary.check_permission("deleteshare") then %> <% htmlviewfunctions.displayitem(cfe({type="form", value={name=name}, label="", option="Delete", action="deleteshare"}), page_info, -1) %> <% end %> <%= html.html_escape(share.name) %> <%= html.html_escape(share.path) %> <%= html.html_escape(share.comment) %>
<% if #view.value == 0 then %>

No Shares Found

<% end %> <% if viewlibrary and viewlibrary.check_permission("createshare") then %> <% htmlviewfunctions.displayitem(cfe({type="link", value={redir=redir}, label="Create new share", option="Create Share", action="createshare"}), page_info, htmlviewfunctions.incrementheader(header_level)) %> <% end %> <% htmlviewfunctions.displaysectionend(header_level) %>