% local view, viewlibrary, page_info, session = ... %> <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> <% htmlviewfunctions.displaycommandresults({"edit", "startstop", "poweron", "poweroff"}, session) %> <% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %>
Socket # | Status | Description | <% if viewlibrary.check_permission("edit") or viewlibrary.check_permission("power") then %>Action | <% end %>
---|---|---|---|
<%= html.html_escape(item.socket) %> | <%= html.html_escape(item.status) %> | <%= html.html_escape(item.description) %> | <% if viewlibrary.check_permission("edit") or viewlibrary.check_permission("power") then %><% local socket = cfe({type="hidden", value=item.socket}) %> <% if viewlibrary.check_permission("edit") then htmlviewfunctions.displayitem(cfe({type="link", value={socket=socket, redir=redir}, label="", option="Edit", action="edit" }), page_info, -1) end %> <% if viewlibrary.check_permission("poweron") or viewlibrary.check_permission("poweroff") then htmlviewfunctions.displayitem(cfe({type="form", value={socket=socket, redir=redir}, label="", option="Power ON", action="poweron" }), page_info, -1) htmlviewfunctions.displayitem(cfe({type="form", value={socket=socket, redir=redir}, label="", option="Power OFF", action="poweroff" }), page_info, -1) end %> | <% end %>