summaryrefslogtreecommitdiffstats
path: root/apk-expert-html.lsp
blob: 6dde79f741ecade81b38e89480021d0a8ad0e9c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<% local form, viewlibrary, page_info, session = ... %>
<% htmlviewfunctions = require("htmlviewfunctions") %>
<% html = require("acf.html") %>

<% htmlviewfunctions.displaycommandresults({"updateall", "upgradeall"}, session) %>

<%
local pattern = string.gsub(page_info.prefix..page_info.controller, "[%(%)%.%%%+%-%*%?%[%]%^%$]", "%%%1")
local func = haserl.loadfile(page_info.viewfile:gsub(pattern..".*$", "/") .. "filedetails-html.lsp")
func(form, viewlibrary, page_info, session)
%>

<% if viewlibrary.check_permission("updateall") or viewlibrary.check_permission("upgradeall") then %>
<h2>Update / Upgrade</h2>
<% if viewlibrary.check_permission("updateall") then %>
	<div class='item'><p class='left'>Update Index</p>
	<div class='right'>
	<form action="updateall" method="POST">
		<input class="hidden" type="hidden" name="redir"  value="<%= html.html_escape(page_info.orig_action) %>" >
		<input class="submit" type="submit" name="submit" value="Update">
	</form>
	</div></div><!-- end .item -->
<% end %>
<% if viewlibrary.check_permission("upgradeall") then %>
	<div class='item'><p class='left'>Upgrade All</p>
	<div class='right'>
	<form action="upgradeall" method="POST">
		<input class="hidden" type="hidden" name="redir"  value="<%= html.html_escape(page_info.orig_action) %>" >
		<input class="submit" type="submit" name="submit" value="Upgrade">
	</form>
	</div></div><!-- end .item -->
<% end %>
<% end %>