diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-09-29 14:58:27 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-09-29 15:03:56 +0000 |
commit | 2841904bc27745da9d4755bbbe30902a0a0d9a38 (patch) | |
tree | bc4623878ce601c6840f540c6159f05332fb29aa | |
parent | 5b9b0aab9782c6119f1523584c718ce490f59c53 (diff) | |
download | acf-freeradius3-2841904bc27745da9d4755bbbe30902a0a0d9a38.tar.bz2 acf-freeradius3-2841904bc27745da9d4755bbbe30902a0a0d9a38.tar.xz |
Display message in HTML views if no files found
(cherry picked from commit 2b91ec333e5d2f421e6d9a372c3bb18c7fee658b)
Conflicts:
freeradius3-listfiles-html.lsp
freeradius3-listmacauthfiles-html.lsp
freeradius3-listpasswdfiles-html.lsp
-rw-r--r-- | freeradius3-listfiles-html.lsp | 10 | ||||
-rw-r--r-- | freeradius3-listmacauthfiles-html.lsp | 10 | ||||
-rw-r--r-- | freeradius3-listpasswdfiles-html.lsp | 10 |
3 files changed, 24 insertions, 6 deletions
diff --git a/freeradius3-listfiles-html.lsp b/freeradius3-listfiles-html.lsp index add365d..d85ead9 100644 --- a/freeradius3-listfiles-html.lsp +++ b/freeradius3-listfiles-html.lsp @@ -29,7 +29,9 @@ html = require("acf.html") end %> <h1>Configuration</h1> -<dl><table id="list" class="tablesorter"><thead> +<dl> +<% if #view.value>0 then %> +<table id="list" class="tablesorter"><thead> <tr> <th>Action</th> <th>File</th> @@ -52,7 +54,11 @@ end %> <td><%= html.html_escape(v.mtime) %></td> </tr> <% end %> -</tbody></table></dl> +</tbody></table> +<% else %> +<p>No files found</p> +<% end %> +</dl> <% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createfile") then local createform = viewlibrary.dispatch_component("createfile", nil, true) %> diff --git a/freeradius3-listmacauthfiles-html.lsp b/freeradius3-listmacauthfiles-html.lsp index 1ebac97..2293b8a 100644 --- a/freeradius3-listmacauthfiles-html.lsp +++ b/freeradius3-listmacauthfiles-html.lsp @@ -24,7 +24,9 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"editmacauthfile"}, session) %> <h1>MAC Authentication Configuration</h1> -<dl><table id="list" class="tablesorter"><thead> +<dl> +<% if #view.value>0 then %> +<table id="list" class="tablesorter"><thead> <tr> <th>Action</th> <th>File</th> @@ -44,4 +46,8 @@ html = require("acf.html") <td><%= html.html_escape(v.mtime) %></td> </tr> <% end %> -</tbody></table></dl> +</tbody></table> +<% else %> +<p>No files found</p> +<% end %> +</dl> diff --git a/freeradius3-listpasswdfiles-html.lsp b/freeradius3-listpasswdfiles-html.lsp index 303a481..4633375 100644 --- a/freeradius3-listpasswdfiles-html.lsp +++ b/freeradius3-listpasswdfiles-html.lsp @@ -22,7 +22,9 @@ html = require("acf.html") </script> <h1>Passwd Configuration</h1> -<dl><table id="list" class="tablesorter"><thead> +<dl> +<% if #view.value>0 then %> +<table id="list" class="tablesorter"><thead> <tr> <th>Action</th> <th>File</th> @@ -42,4 +44,8 @@ html = require("acf.html") <td><%= html.html_escape(v.mtime) %></td> </tr> <% end %> -</tbody></table></dl> +</tbody></table> +<% else %> +<p>No files found</p> +<% end %> +</dl> |