<% local data, viewlibrary, page_info, session = ... 
htmlviewfunctions = require("htmlviewfunctions")
%>

<% htmlviewfunctions.displaycommandresults({"install", "upgrade"}, session) %>

<H1><%= data.label %></H1>
<DL>
<%
htmlviewfunctions.displayitem(data.value.package)
htmlviewfunctions.displayitem(data.value.installed)
htmlviewfunctions.displayitem(data.value.version)
htmlviewfunctions.displayitem(data.value.comment)
htmlviewfunctions.displayitem(data.value.webpage)
htmlviewfunctions.displayitem(data.value.size)
htmlviewfunctions.displayitem(data.value.upgrade)
%>

<% if viewlibrary.check_permission("install") and data.value.installed.value == "" then %>
<DT>Install</DT>
<DD><form action="install" method="POST">
<input class="hidden" type="hidden" name="package" value=<%= data.value.package.value %>>
<input class="submit" type="submit" name="submit" value="Install"></form></DD>
<% elseif viewlibrary.check_permission("upgrade") and data.value.upgrade.value ~= "" then %>
<DT>Upgrade</DT>
<DD><form action="upgrade" method="POST">
<input class="hidden" type="hidden" name="package" value=<%= data.value.package.value %>>
<input class="submit" type="submit" name="submit" value="Upgrade"></form></DD>
<% end %></DL>
