diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-10-21 17:23:10 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-10-21 17:23:10 +0000 |
commit | 83f91021bea9203fa8fe0877846a299c296df97d (patch) | |
tree | 725c9e70a7b69da2ea655ebb4df511288286db98 /tinydns-listfiles-html.lsp | |
parent | 5484e1fff4c4a8c9c2ae557a5c322f50299aae60 (diff) | |
download | acf-tinydns-83f91021bea9203fa8fe0877846a299c296df97d.tar.bz2 acf-tinydns-83f91021bea9203fa8fe0877846a299c296df97d.tar.xz |
Modified TinyDNS to include more intelligence. Changed listfiles and newfile to not display / require directory. Made edit function in controller to allow control independent from expert. Modified edit to limit entries to the domain indicated by the file name.
git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@1557 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'tinydns-listfiles-html.lsp')
-rw-r--r-- | tinydns-listfiles-html.lsp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tinydns-listfiles-html.lsp b/tinydns-listfiles-html.lsp index 21bc652..0046d91 100644 --- a/tinydns-listfiles-html.lsp +++ b/tinydns-listfiles-html.lsp @@ -23,14 +23,16 @@ io.write("</span>") <% 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 = "view?filename=" .. file.value.filename.value, label="View " }) %> - <% io.write(html.link{value = "edit?filename=" .. file.value.filename.value, label="Edit " }) %> - <% io.write(html.link{value = "editfile?filename=" .. file.value.filename.value, label="Expert " }) %> + <% + if session.permissions.tinydns.delete then io.write(html.link{value = "delete?filename=" .. file.value.filename.value, label="Delete " }) end + io.write(html.link{value = "view?filename=" .. file.value.filename.value, label="View " }) + if session.permissions.tinydns.edit then io.write(html.link{value = "edit?filename=" .. file.value.filename.value, label="Edit " }) end + if session.permissions.tinydns.editfile then io.write(html.link{value = "editfile?filename=" .. file.value.filename.value, label="Expert " }) end + %> </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> + <TD style="white-space:nowrap;" width="90%"><%= string.gsub(file.value.filename.value, "^.*/", "") %></TD> </TR> <% end %> </TABLE> |