summaryrefslogtreecommitdiffstats
path: root/provisioning-listtemplates-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'provisioning-listtemplates-html.lsp')
-rw-r--r--provisioning-listtemplates-html.lsp20
1 files changed, 10 insertions, 10 deletions
diff --git a/provisioning-listtemplates-html.lsp b/provisioning-listtemplates-html.lsp
index 579119d..47226d7 100644
--- a/provisioning-listtemplates-html.lsp
+++ b/provisioning-listtemplates-html.lsp
@@ -38,25 +38,25 @@ html = require("acf.html")
</thead><tbody>
<% local filename = cfe({ type="hidden", value="" }) %>
<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %>
-<% for k,v in ipairs( view.value ) do %>
+<% for i,file in ipairs( view.value ) do %>
<tr>
<td>
- <% filename.value = v.filename %>
- <% if viewlibrary.check_permission("edittemplate") and v.label then %>
+ <% filename.value = file.filename %>
+ <% if viewlibrary.check_permission("edittemplate") and file.label then %>
<% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Edit", action="edittemplate"}), page_info, -1) %>
<% end %>
- <% if viewlibrary.check_permission("deletetemplate") and v.label then %>
+ <% if viewlibrary.check_permission("deletetemplate") and file.label then %>
<% htmlviewfunctions.displayitem(cfe({type="form", value={filename=filename}, label="", option="Delete", action="deletetemplate", class="deletetemplate"}), page_info, -1) %>
<% end %>
- <% if viewlibrary.check_permission("createtemplate") and not v.label then %>
+ <% if viewlibrary.check_permission("createtemplate") and not file.label then %>
<% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Create", action="createtemplate"}), page_info, -1) %>
<% end %>
</td>
- <td><%= html.html_escape(v.filename) %></td>
- <td><%= html.html_escape(v.label) %></td>
- <td><%= html.html_escape(v.seq) %></td>
- <td><span class="hide"><%= html.html_escape(v.orig_size) %>b</span><%= html.html_escape(v.size) %></td>
- <td><%= html.html_escape(v.mtime) %></td>
+ <td><%= html.html_escape(file.filename) %></td>
+ <td><%= html.html_escape(file.label) %></td>
+ <td><%= html.html_escape(file.seq) %></td>
+ <td><span class="hide"><%= html.html_escape(file.size or 0) %>b</span><%= format.formatfilesize(file.size) %></td>
+ <td><%= format.formattime(file.mtime) %></td>
</tr>
<% end %>
</tbody>