summaryrefslogtreecommitdiffstats
path: root/lbu-listbackups-html.lsp
blob: ad26069dfa22d164a063d6f52255ba6c549630fd (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
31
32
33
34
35
36
37
38
39
<? local view, viewlibrary, pageinfo, session = ... 
require("viewfunctions")
?>
<?
--[[ DEBUG INFORMATION
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
io.write(html.cfe_unpack(view))
io.write("</span>")
--]]
?>

<H1>Backup Archive</H1>
<DL>
<? if #view.value == 0 then ?>
No backup files
<? else
	local selected = false ?>
	<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="deletebackup?backup="..name, label="Delete "} ?>
		<? if name == view.selected then
			selected = true ?>
			selected
		<? else ?>
			<?= html.link{value="selectbackup?backup="..name, label="Select "} ?>
		<? end ?>
		</td>
		<td><?= name ?></td></tr>
	<? end
	if not selected then ?>
		Warning!!  Selecting a backup file will cause the current lbu overlay to be lost!!
	<? end
end ?>
</table>
</DL>