% 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) %>
Outlet # | Status | Description | <% if viewlibrary.check_permission("edit") or viewlibrary.check_permission("power") then %>Action | <% end %>
---|---|---|---|
<%= html.html_escape(item.outlet) %> | <%= html.html_escape(item.status) %> | <%= html.html_escape(item.description) %> | <% if viewlibrary.check_permission("edit") or viewlibrary.check_permission("power") then %><% local outlet = cfe({type="hidden", value=item.outlet}) %> <% if viewlibrary.check_permission("edit") then htmlviewfunctions.displayitem(cfe({type="link", value={outlet=outlet, 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={outlet=outlet, redir=redir}, label="", option="Power ON", action="poweron" }), page_info, -1) htmlviewfunctions.displayitem(cfe({type="form", value={outlet=outlet, redir=redir}, label="", option="Power OFF", action="poweroff" }), page_info, -1) end %> | <% end %>