diff options
author | Mika Havela <mika.havela@gmail.com> | 2007-12-28 08:46:45 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2007-12-28 08:46:45 +0000 |
commit | d2fb2718fb093cfcd05e10853db0830801c5f0c3 (patch) | |
tree | 9660d56043fc4e30cf07bada611a1a968f358eff | |
parent | c3d0e6e3b27c7998e07bb4d2f8d853d34b90ab28 (diff) | |
download | acf-alpine-conf-d2fb2718fb093cfcd05e10853db0830801c5f0c3.tar.bz2 acf-alpine-conf-d2fb2718fb093cfcd05e10853db0830801c5f0c3.tar.xz |
Small modifications on the view-files
git-svn-id: svn://svn.alpinelinux.org/acf/lbu/trunk@459 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | lbu-commit-html.lsp | 58 | ||||
-rw-r--r-- | lbu-read-html.lsp | 46 | ||||
-rw-r--r-- | lbu.menu | 2 |
3 files changed, 47 insertions, 59 deletions
diff --git a/lbu-commit-html.lsp b/lbu-commit-html.lsp index c5e1ff2..3ea0815 100644 --- a/lbu-commit-html.lsp +++ b/lbu-commit-html.lsp @@ -10,43 +10,31 @@ local function packURL(script, prefix, controller, action, extra) 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 +<h1><?= view.title?></h1> -?><table><? -for i,item in ipairs(view.data) do - ?><tr><td><?= item.status ?><td><?= item.name ?><? -end -?></table><? -?><?= html.form.start { +<? for i,item in ipairs(view.note or {}) do ?> + <p class='error'><?= item.content ?></p> +<? end ?> +<? for i,item in ipairs(view.data) do ?> + <dt><?= item.name ?></dt><dd><?= item.status ?></dd> +<? end ?> +<dt>Save these changes</dt> +<dd><?= 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 : -?> + }?> +<?= html.form.submit { name = view.action, value = view.action }?> +<?= html.form.stop() ?> +</dd> + +<? 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 : ?> + diff --git a/lbu-read-html.lsp b/lbu-read-html.lsp index 0ea1ec8..e44d97a 100644 --- a/lbu-read-html.lsp +++ b/lbu-read-html.lsp @@ -1,27 +1,27 @@ <? local view = ... ?> -<h1>Edit</h1> +<h1>LBU</h1> -<? --Status Block - for i,item in ipairs(view.note or {}) do - ?><p class='error'><?= item.content ?></p><? - end -?> +<h2>Settings</h2> +<? for i,item in ipairs(view.note or {}) do ?> + <p class='error'><?= item.content ?></p> +<? end ?> -<table border=0> -<? local sct="" -for i,item in ipairs(view.list) do - if item.section ~= sct then - ?><tr><td colspan='3'><h2><?= item.section ?></td></tr><? - sct = item.section - end - ?><tr><td><?= item.status or '' ?><? - ?><td><?= html.link{ - value = view.script .. view.prefix .. view.controller .. "/" - .. view.action .. "?id=" .. tostring(item.id), - label=item.name - } - ?></td><td><?= item.descr - ?></td></tr><? -end -- vim: set filetype=lua : ?> -</table> +<? for i,item in ipairs(view.list) do ?> + <DT><?= item.descr or '' ?></DT> + <DD><?= html.link{ + value = view.script .. view.prefix .. view.controller .. "/" + .. view.action .. "?id=" .. tostring(item.id), + label=item.name + } ?> + </DD> +<? end ?> + +<h2>Functions</h2> + <DT>Commit changes</DT> + <DD><?= html.link{ + value = view.script .. view.prefix .. view.controller .. "/commit", + label="commit" } ?> + </DD> + +<? -- vim: set filetype=lua : ?> @@ -1,2 +1,2 @@ -System LBU Define read +Backup/Packages LBU Define read |