diff options
author | Alexander Poslavsky <alexander.poslavsky@gmail.com> | 2007-11-02 13:08:51 +0000 |
---|---|---|
committer | Alexander Poslavsky <alexander.poslavsky@gmail.com> | 2007-11-02 13:08:51 +0000 |
commit | 1448b0049d94eb830c2e6ac17a6f1038f76de076 (patch) | |
tree | acc7f5090239bd28da98f0bb8fae2c4d48862365 /lbu-commit-html.lsp | |
download | acf-alpine-conf-1448b0049d94eb830c2e6ac17a6f1038f76de076.tar.bz2 acf-alpine-conf-1448b0049d94eb830c2e6ac17a6f1038f76de076.tar.xz |
lbu acf module work-in-progress
git-svn-id: svn://svn.alpinelinux.org/acf/lbu/trunk@259 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lbu-commit-html.lsp')
-rw-r--r-- | lbu-commit-html.lsp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/lbu-commit-html.lsp b/lbu-commit-html.lsp new file mode 100644 index 0000000..c5e1ff2 --- /dev/null +++ b/lbu-commit-html.lsp @@ -0,0 +1,52 @@ +<? +local view = ... + +local function packURL(script, prefix, controller, action, extra) + ret = script .. "/" .. prefix .. controller .. "/" .. action + sep = '?' + for k,v in pairs(extra) do + ret = ret .. sep .. k .. '=' .. v + sep = '&' + end + return ret +end + +--[[ +view + script, prefix, controller, action + data[] + name, + status + title + text[] + label + content +--]] +?><h1><?= view.title +?></h1><? + +--Status Block + for i,item in ipairs(view.note or {}) do + ?><p class='error'><?= item.content ?></p><? + end + +?><table><? +for i,item in ipairs(view.data) do + ?><tr><td><?= item.status ?><td><?= item.name ?><? +end +?></table><? +?><?= html.form.start { + method="POST", + action = packURL(view.script, view.prefix, + view.controller, view.action, {}) + } +?><?= html.form.submit { name = view.action, value = view.action } +?><?= html.form.stop() ?><? +for i,item in ipairs(view.text) do + if item.label then + ?><h2><?= item.label ?></h2><? + end + ?><pre><?= item.content ?></pre><? +end +-- vim: set filetype=lua : +?> |