summaryrefslogtreecommitdiffstats
path: root/dhcp-listhosts-html.lsp
blob: 6b92ecb5d669b10516794dc5699e72ad972b5f3f (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("viewfunctions") %>

<% 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;"><%= host %></TD>
	</TR>
<% end %>
</TABLE>
		
<dt>Add new host</dt>
<dd><form action="<%= page_info.script .. page_info.prefix .. page_info.controller .. "/createhost" %>" method="POST">
<input class="hidden" type="hidden"  name="redir"  value="<%= page_info.orig_action %>" >
<input type=submit value="New" class="submit">
</form></dd>
</DL>