<% local view, viewlibrary, page_info, session = ... 
htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>

<% htmlviewfunctions.displaycommandresults({"commit"}, session, true) %>

<%
	viewlibrary.dispatch_component("status")
	if viewlibrary.check_permission("commit") then
		viewlibrary.dispatch_component("commit")
	end
%>

<% if viewlibrary.check_permission("getpackage") then %>
<H1>Download Overlay</H1>
<DL>
	<DT>Generate and download overlay</DT>
	<DD><form action="<%= html.html_escape(page_info.script .. page_info.prefix) %>lbu/getpackage" method="POST">
	<input type="hidden" name="viewtype" value="stream">
	<input class="submit" type="submit" name="submit" value="Download"></form></DD>
</DL>
<% end %>

<H1>Changes Since Last Commit</H1>
<DL>
	<dt>Files changed since last commit</dt>
	<dd><pre><% 
		if (#view.value == 0) then
			io.write("None")
		else
			for i,file in pairs(view.value) do
				io.write((html.html_escape(file.status .. "\t" .. file.name .. "\n")))
			end
		end
	%></pre></DD>
</DL>
