From 4fa07d4f009b19123ac4e331d3f90de1e16a9b7d Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 25 Jun 2015 23:45:03 -0400 Subject: Add server-side sorting and filtering for listusers, making use of tablesorter in the HTML view --- vmail-listusers-html.lsp | 107 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 85 insertions(+), 22 deletions(-) (limited to 'vmail-listusers-html.lsp') diff --git a/vmail-listusers-html.lsp b/vmail-listusers-html.lsp index 1972dc5..6e621e0 100644 --- a/vmail-listusers-html.lsp +++ b/vmail-listusers-html.lsp @@ -12,13 +12,77 @@ html = require("acf.html") @@ -28,37 +92,36 @@ html = require("acf.html") <% local header_level2 = htmlviewfunctions.incrementheader(header_level) %> - + -<% local username = cfe({ type="hidden", value="" }) %> -<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> -<% for k,v in ipairs( view.value ) do %> - - - - - - -<% end %>
ActionAction Extension First Name Last Name
- <% username.value = v.username %> - <% if viewlibrary.check_permission("editusersettings") then %> - <% htmlviewfunctions.displayitem(cfe({type="link", value={username=username, redir=redir}, label="", option="Edit", action="editusersettings"}), page_info, -1) %> - <% end %> - <% if viewlibrary.check_permission("deleteuser") then %> - <% htmlviewfunctions.displayitem(cfe({type="form", value={username=username}, label="", option="Delete", action="deleteuser", class="deleteuser" }), page_info, -1) %> - <% end %> - <%= html.html_escape(v.username) %><%= html.html_escape(v.firstname) %><%= html.html_escape(v.lastname) %>
+
+
+ Page: + + + + + + +
+
+ <% if view.errtxt then %>

<%= html.html_escape(view.errtxt) %>

<% end %> -<% if #view.value == 0 then %> +<% if #view.value.result.value == 0 then %>

No users found

<% end %> -- cgit v1.2.3