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-listtemplates-html.lsp | 59 +++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 provisioning-listtemplates-html.lsp (limited to 'provisioning-listtemplates-html.lsp') diff --git a/provisioning-listtemplates-html.lsp b/provisioning-listtemplates-html.lsp new file mode 100644 index 0000000..09e76df --- /dev/null +++ b/provisioning-listtemplates-html.lsp @@ -0,0 +1,59 @@ +<% local view, viewlibrary, page_info, session = ... +require("viewfunctions") +%> + + + + + +<% displaycommandresults({"deletetemplate", "edittemplate"}, session) %> +<% displaycommandresults({"createtemplate"}, session, true) %> + +

Templates

+
+ + + + + + + + + +<% for k,v in ipairs( view.value ) do %> + + + + + + + +<% end %> + +
ActionFile NameLabelFile SizeLast Modified
+ <% if viewlibrary.check_permission("deletetemplate") and v.template_id then %> + <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletetemplate?template_id="..v.template_id, label="Delete "} %> + <% end %> + <% if viewlibrary.check_permission("edittemplate") and v.template_id then %> + <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/edittemplate?template_id="..v.template_id.."&redir="..page_info.orig_action, label="Edit "} %> + <% end %> + <% if viewlibrary.check_permission("createtemplate") and not v.template_id then %> + <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/createtemplate?filename="..v.filename.."&redir="..page_info.orig_action, label="Create "} %> + <% end %> + <%= html.html_escape(v.filename) %><%= html.html_escape(v.label) %><%= html.html_escape(v.filesize) %><%= html.html_escape(v.mtime) %>
+ +<% if view.errtxt then %> +

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

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

No templates found

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