summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-09-28 19:53:13 +0000
committerTed Trask <ttrask01@yahoo.com>2013-09-28 19:53:13 +0000
commit064ab9ab8a9607062a93e7df21dd2ecea7be63de (patch)
treec412f0b5b86228e0834d91193742e4676fbba58d
parent7166ee9f1fa84cebfbbe4d56d97fdc73cb6bb9e4 (diff)
downloadacf-db-064ab9ab8a9607062a93e7df21dd2ecea7be63de.tar.bz2
acf-db-064ab9ab8a9607062a93e7df21dd2ecea7be63de.tar.xz
Add view for listdatabases action
-rw-r--r--db-listdatabases-html.lsp19
1 files changed, 19 insertions, 0 deletions
diff --git a/db-listdatabases-html.lsp b/db-listdatabases-html.lsp
new file mode 100644
index 0000000..4fd9362
--- /dev/null
+++ b/db-listdatabases-html.lsp
@@ -0,0 +1,19 @@
+<% local form, viewlibrary, page_info, session = ... %>
+<% require("htmlviewfunctions") %>
+<% html = require("acf.html") %>
+
+<H1><%= html.html_escape(form.label) %></H1>
+<DL>
+<% if form.errtxt then %><P CLASS='error'><%= string.gsub(html.html_escape(form.errtxt), "\n", "<BR>") %></P><% end %>
+<% for i,database in ipairs(form.value) do %>
+ <li>
+ <% if viewlibrary.check_permission("listtables") then %>
+ <%= html.link{value = "listtables?database=" .. database, label=database} %>
+ <% else %>
+ <%= html.html_escape(database) %>
+ <% end %>
+<% end %>
+<% if #form.value == 0 then %>
+No databases found
+<% end %>
+</DL>