diff options
author | Mika Havela <mika.havela@gmail.com> | 2008-04-26 09:59:53 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2008-04-26 09:59:53 +0000 |
commit | 4d2325161be2448fb521b1aacc02965e9dfaba64 (patch) | |
tree | 4ff09a636a69a2600be37c8afc9ef2024b414ed2 /tinydns-expert-html.lsp | |
parent | 62a1ef945a563c7b9b36dcbe889126825ad57fd2 (diff) | |
download | acf-tinydns-4d2325161be2448fb521b1aacc02965e9dfaba64.tar.bz2 acf-tinydns-4d2325161be2448fb521b1aacc02965e9dfaba64.tar.xz |
Saving work for today.
Create new configfile starts working.
Delete configfile (work in progress - still not working).
Added information on filesize/modifydate on each configfile.
git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@1048 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'tinydns-expert-html.lsp')
-rw-r--r-- | tinydns-expert-html.lsp | 30 |
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 .. |