diff options
author | Mika Havela <mika.havela@gmail.com> | 2008-04-09 13:23:31 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2008-04-09 13:23:31 +0000 |
commit | f83a1a729f68ab79138857a884308084e23cd595 (patch) | |
tree | 2850811ad13f0ba62a22b36435d34c8377be6f46 /lbu-status-html.lsp | |
parent | 17b2b7ad8ab66c4911cff345ddcbf1594cd2418e (diff) | |
download | acf-alpine-conf-f83a1a729f68ab79138857a884308084e23cd595.tar.bz2 acf-alpine-conf-f83a1a729f68ab79138857a884308084e23cd595.tar.xz |
Cleaning up the code.
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-conf/trunk@966 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lbu-status-html.lsp')
-rw-r--r-- | lbu-status-html.lsp | 45 |
1 files changed, 9 insertions, 36 deletions
diff --git a/lbu-status-html.lsp b/lbu-status-html.lsp index 99d1dbe..eb1997b 100644 --- a/lbu-status-html.lsp +++ b/lbu-status-html.lsp @@ -1,4 +1,6 @@ -<? local form = ... ?> +<? local form = ... +require("viewfunctions") +?> <? --[[ DEBUG INFORMATION io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") @@ -6,55 +8,26 @@ io.write(html.cfe_unpack(form)) io.write("</span>") --]] ?> -<? -function displayinfo(myform,tags,viewonly) - io.write("<DL>") - for k,v in pairs(tags) do - if (myform[v]) and (myform[v]["value"]) then - local val = myform[v] - io.write("\t<DT") - if (#val.errtxt > 0) then io.write(" class='error'") end - io.write(">" .. val.label .. "</DT>\n") - if (viewonly) then - io.write("\t\t<DD>" .. val.value .. "\n") - else - io.write("\t\t<DD>" .. html.form[val.type](val) .. "\n") - end - if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end - if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end - io.write("\t\t</DD>\n") - end - end - io.write("</DL>") -end -?> <H1>SYSTEM INFO</H1> +<DL> <? local myform = form.status local tags = { "status", "version", } displayinfo(myform,tags,"viewonly") ?> +</DL> <H2>PROGRAM SPECIFIC OPTIONS/INFORMATION</H2> +<DL> <? local tags = { "LBU_MEDIA","ENCRYPTION", } displayinfo(myform,tags,"viewonly") ?> +</DL> <H2>CHANGES SINCE LAST COMMIT</H2> -<dl> +<DL> <dt>Files changed since last commit</dt> <dd><pre><? for i = 1, table.maxn(form.lbustatus) do io.write(form.lbustatus[i]["status"] .. "\t" .. form.lbustatus[i]["name"] .. "\n") end ?><? if (#form.lbustatus == 0) then io.write("None") end ?></pre></DD> -</dl> - - -<? ---[[ 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>") ---]] -?> - -<? -- vim: set filetype=lua : ?> +</DL> |