summaryrefslogtreecommitdiffstats
path: root/dhcp-listhosts-html.lsp
blob: f19c9d19acbf3f0e79268d06a229df5474adb668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<% local view, viewlibrary, page_info, session = ... %>
<% require("htmlviewfunctions") %>

<% htmlviewfunctions.displaycommandresults({"edithost", "delhost", "createhost"}, session) %>

<H1>Host Declarations</H1>

<DL>
<TABLE>
	<TR style="background:#eee;font-weight:bold;">
		<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Action</TD>
		<TD style="white-space:nowrap;text-align:left;" class="header">Host</TD>
	</TR>
<% for i,host in ipairs(view.value) do %>
	<TR>
		<TD style="padding-right:20px;white-space:nowrap;">
			<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/edithost?host="..host.."&redir="..page_info.orig_action, label="Edit "} %>
			<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/delhost?host="..host, label="Delete "} %>
		</TD>
		<TD style="white-space:nowrap;"><%= html.html_escape(host) %></TD>
	</TR>
<% end %>
</TABLE>
		
<dt>Add new host</dt>
<dd><form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/createhost") %>" method="POST">
<input class="hidden" type="hidden"  name="redir"  value="<%= html.html_escape(page_info.orig_action) %>" >
<input type=submit value="New" class="submit">
</form></dd>
</DL>