<% local view, viewlibrary, pageinfo, session = ... 
htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>

<% htmlviewfunctions.displaycommandresults({"selectbackup"}, session) %>

<H1>Backup Archives</H1>
<DL>
<% if #view.value == 0 then %>
No backup files
<% else %>
	<table><tr>
		<td class="header">Action</td>
		<td class="header">File</td>
	</tr>
	<% for i,name in ipairs(view.value) do %>
		<tr><td>
			<%= html.link{value="selectbackup?backup="..name.."&redir=config&submit=true", label="Revert "} %>
		</td>
		<td><%= html.html_escape(name) %></td></tr>
	<% end
end %>
</table>
</DL>
