summaryrefslogtreecommitdiffstats
path: root/tinydns-listfiles-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-06-18 20:07:55 +0000
committerTed Trask <ttrask01@yahoo.com>2008-06-18 20:07:55 +0000
commit151f597ce365349add8c21fff63902be0084645f (patch)
treefdfa505adeaea2d4bb0e8c604a0439b211016111 /tinydns-listfiles-html.lsp
parentf0dcd211ed5fca855655d8b60b588b1d193e92fd (diff)
downloadacf-tinydns-151f597ce365349add8c21fff63902be0084645f.tar.bz2
acf-tinydns-151f597ce365349add8c21fff63902be0084645f.tar.xz
Rewrite of tinydns to simplify code and use new cfe model.
Added js to filter records. git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@1219 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'tinydns-listfiles-html.lsp')
-rw-r--r--tinydns-listfiles-html.lsp49
1 files changed, 49 insertions, 0 deletions
diff --git a/tinydns-listfiles-html.lsp b/tinydns-listfiles-html.lsp
new file mode 100644
index 0000000..f61ce25
--- /dev/null
+++ b/tinydns-listfiles-html.lsp
@@ -0,0 +1,49 @@
+<? local form, viewlibrary = ...
+require("viewfunctions")
+?>
+<?
+--[[ DEBUG INFORMATION
+io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
+io.write(html.cfe_unpack(form))
+io.write("</span>")
+--]]
+?>
+
+<? if viewlibrary and viewlibrary.dispatch_component then
+ viewlibrary.dispatch_component("basicstatus")
+end ?>
+
+<h1>CONFIGURATION</h1>
+<h2>Edit/View existing config files</h2>
+<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="padding-right:20px;white-space:nowrap;text-align:right;" class="header">Size</TD>
+ <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Last Modified</TD>
+ <TD style="white-space:nowrap;text-align:left;" class="header">File</TD>
+ </TR>
+<? for i,file in ipairs(form.value) do ?>
+ <TR>
+ <TD style="padding-right:20px;white-space:nowrap;">
+ <? io.write(html.link{value = "delete?filename=" .. file.value.filename.value, label="Delete " }) ?>
+ <? io.write(html.link{value = "edit?filename=" .. file.value.filename.value, label="Edit " }) ?>
+ <? io.write(html.link{value = "expert?filename=" .. file.value.filename.value, label="View " }) ?>
+ </TD>
+ <TD style="padding-right:20px;white-space:nowrap;text-align:right;"><?= file.value.filesize.value ?></TD>
+ <TD style="padding-right:20px;white-space:nowrap;"><?= file.value.mtime.value ?></TD>
+ <TD style="white-space:nowrap;" width="90%"><?= file.value.filename.value ?></TD>
+ </TR>
+<? end ?>
+</TABLE>
+
+<? if viewlibrary and viewlibrary.dispatch_component then
+ local newfileform = viewlibrary.dispatch_component("newfile", nil, true) ?>
+<h2>Create new config file</h2>
+<?
+ newfileform.action = "newfile"
+ displayform(newfileform)
+end ?>
+
+<? if viewlibrary and viewlibrary.dispatch_component then
+ viewlibrary.dispatch_component("startstop")
+end ?>