#!/mod/bin/jimsh

source /mod/webif/lib/setup

jqplugin enadis iajax qtip2 tablesorter2
jscss script.js style.css
header

if {[[settings] pkgdev]} { set filter 0 } else { set filter 1 }

puts "
<script type=text/javascript>
var pkgfilter = $filter;
</script>
"

puts {

<div class=va style="padding: 0 0 1em 0">
	<h1 style="display: inline" class=va>
		Package Management
	</h1>

	<button class="hidden va" id=opkgupdate>
		Check for updates
	</button>

	<button class="hidden va" id=opkgupgradeall>
		Upgrade all packages
	</button>
</div>

<div id=refreshing class="hidden shadowbox" style="margin: 1 0 1em 0">
	<div>
		<img border=0 src=/img/spin.gif>
		Refreshing...
	</div>
</div>

<div id=dialogue class=hidden style="align: center">
	<div id=dresults></div>
	<div id=dspinner>
		<img border=0 src=/img/spin.gif>
		Processing request...
	</div>
	<div class=hidden id=complete>
		<img border=0 src=/images/167_2_00_Check_W2_SUB.png>
		Operation complete.
	</div>
</div>

<div id=pkgtabs>
<ul>
	<li>
		<a class=tablink href="pkg.jim?type=inst">
		<span>Installed</span>
		</a>
	</li><li>
		<a class=tablink href="pkg.jim?type=avail">
		<span>Available</span>
		</a>
	</li><li>
		<a class=tablink href="pkg.jim?type=upgr">
		<span>Upgrades</span>
		</a>
	</li>
	<span class="tabright hidden">
		<span class=footnote id=filtertext></span>
		<small>
		<button id=b_filter>Filter</button>
		</small>
	</span>
</ul>
</div>
}

footer

