From 5c93a38c2cc263727be345ff5a197ea9bc78595b Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 28 Oct 2010 13:47:54 +0000 Subject: Starting to develop provisioning application. It has the basics for creating/editing/deleting devices/templates/classes/groups/parameters. --- provisioning-listdevices-html.lsp | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 provisioning-listdevices-html.lsp (limited to 'provisioning-listdevices-html.lsp') diff --git a/provisioning-listdevices-html.lsp b/provisioning-listdevices-html.lsp new file mode 100644 index 0000000..d93c096 --- /dev/null +++ b/provisioning-listdevices-html.lsp @@ -0,0 +1,57 @@ +<% local view, viewlibrary, page_info, session = ... +require("viewfunctions") +%> + + + + + +<% displaycommandresults({"deletedevice", "editdevice", "editdeviceparams", "overridedeviceparams"}, session) %> +<% displaycommandresults({"createdevice"}, session, true) %> + +

Devices

+
+ + + + + + + +<% for k,v in ipairs( view.value ) do %> + + + + + +<% end %> + +
ActionNameLabel
+ <% if viewlibrary.check_permission("deletedevice") then %> + <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletedevice?device_id="..v.device_id, label="Delete "} %> + <% end %> + <% if viewlibrary.check_permission("editdevice") then %> + <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editdevice?device_id="..v.device_id.."&redir="..page_info.orig_action, label="Edit "} %> + <% end %> + <% if viewlibrary.check_permission("overridedeviceparams") then %> + <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/overridedeviceparams?device_id="..v.device_id.."&redir="..page_info.orig_action, label="Params "} %> + <% elseif viewlibrary.check_permission("editdeviceparams") then %> + <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editdeviceparams?device_id="..v.device_id.."&redir="..page_info.orig_action, label="Params "} %> + <% end %> + <%= html.html_escape(v.name) %><%= html.html_escape(v.label) %>
+ +<% if view.errtxt then %> +

<%= html.html_escape(view.errtxt) %>

+<% end %> +<% if #view.value == 0 then %> +

No devices found

+<% end %> + +<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createdevice") then + viewlibrary.dispatch_component("createdevice") +end %> +
-- cgit v1.2.3