diff options
author | Ted Trask <ttrask01@yahoo.com> | 2010-10-28 13:47:54 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2010-10-28 13:47:54 +0000 |
commit | 5c93a38c2cc263727be345ff5a197ea9bc78595b (patch) | |
tree | a7524afa5f02d77f1effa6625d249d8968000341 /provisioning-listclasses-html.lsp | |
download | acf-provisioning-5c93a38c2cc263727be345ff5a197ea9bc78595b.tar.bz2 acf-provisioning-5c93a38c2cc263727be345ff5a197ea9bc78595b.tar.xz |
Starting to develop provisioning application.
It has the basics for creating/editing/deleting devices/templates/classes/groups/parameters.
Diffstat (limited to 'provisioning-listclasses-html.lsp')
-rw-r--r-- | provisioning-listclasses-html.lsp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/provisioning-listclasses-html.lsp b/provisioning-listclasses-html.lsp new file mode 100644 index 0000000..21a2b3f --- /dev/null +++ b/provisioning-listclasses-html.lsp @@ -0,0 +1,52 @@ +<% local view, viewlibrary, page_info, session = ... +require("viewfunctions") +%> + +<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"></script> +<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"></script> +<script type="text/javascript"> + $(document).ready(function() { + $("#list").tablesorter({headers: {0:{sorter: false}}}); + }); +</script> + +<% displaycommandresults({"deleteclass", "editclass"}, session) %> +<% displaycommandresults({"createclass"}, session, true) %> + +<h1>Classes</h1> +<DL> +<TABLE id="list" class="tablesorter"><THEAD> + <TR style="background:#eee;font-weight:bold;"> + <TH>Action</TH> + <TH>Name</TH> + <TH>Label</TH> + </TR> +</THEAD><TBODY> +<% for k,v in ipairs( view.value ) do %> + <TR> + <TD> + <% if viewlibrary.check_permission("deleteclass") then %> + <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleteclass?class_id="..v.class_id, label="Delete "} %> + <% end %> + <% if viewlibrary.check_permission("editclass") then %> + <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editclass?class_id="..v.class_id.."&redir="..page_info.orig_action, label="Edit "} %> + <% end %> + </TD> + <TD><%= html.html_escape(v.name) %></TD> + <TD><%= html.html_escape(v.label) %></TD> + </TR> +<% end %> +</TBODY> +</TABLE> + +<% if view.errtxt then %> +<p class="error"><%= html.html_escape(view.errtxt) %></p> +<% end %> +<% if #view.value == 0 then %> +<p>No classes found</p> +<% end %> + +<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createclass") then + viewlibrary.dispatch_component("createclass") +end %> +</DL> |