summaryrefslogtreecommitdiffstats
path: root/tinydns-expert-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'tinydns-expert-html.lsp')
-rw-r--r--tinydns-expert-html.lsp30
1 files changed, 24 insertions, 6 deletions
diff --git a/tinydns-expert-html.lsp b/tinydns-expert-html.lsp
index d3248b1..83e8bf7 100644
--- a/tinydns-expert-html.lsp
+++ b/tinydns-expert-html.lsp
@@ -21,20 +21,38 @@ displayinfo(myform,tags,"viewonly")
<h1>CONFIGURATION</h1>
<h2>Expert config</h2>
-<h3>List of files</h3>
+<h3>Edit/View existing configfiles</h3>
<DL>
+
<TABLE>
-<?
-local myform = form.status.configfiles
-for k,v in pairs(myform.value) do
-?>
+ <TR style="background:#eee;font-weight:bold;">
+ <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">File</TD>
+ <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Size</TD>
+ <TD style="white-space:nowrap;text-align:left;" class="header">Last Modified</TD>
+ </TR>
+<? local myform = form.config ?>
+<? for i = 1, table.maxn(myform) do ?>
<TR>
- <TD style="padding-right:20px;white-space:nowrap;"><?= html.link{value = "edit?name=" .. v , label=v } ?></TD>
+ <TD style="padding-right:20px;white-space:nowrap;"><? io.write(html.link{value = "edit?name=" .. myform[i].filename.value , label=myform[i].filename.value }) ?></TD>
+ <TD style="padding-right:20px;white-space:nowrap;"><? io.write(myform[i].filesize.value or "--") ?></TD>
+ <TD style="white-space:nowrap;" width="90%"><? io.write(myform[i].mtime.value or "--") ?></TD>
</TR>
<? end ?>
</TABLE>
</DL>
+<h3>Create new configfile</h3>
+<form action="<?= form.option.script .. "/" .. form.option.prefix ..
+ form.option.controller .. "/" .. form.option.action ..
+ (form.option.extra or "") ?>" method="POST">
+<DL>
+<?
+local myform = form.create
+local tags = { "name", "cmdnew", }
+displayinfo(myform,tags)
+?>
+</DL>
+</form>
<form action="<?= form.option.script .. "/" .. form.option.prefix ..
form.option.controller .. "/" .. form.option.action ..