<div id="outdated_gems">
	<h3>Outdated Gems</h3>
</div>

<table id="sortable" class="table table-bordered table-condensed">
	<thead>
	<tr>
		<th>Package</th>
		<th>Gentoo Version</th>
		<th>RubyGem Version</th>
	</tr>
	</thead>
	<%Package.order{[category, lower(name), version]}.each do |package|%>
	<%next unless package[:version] == Package.where(name: package[:name]).order(:version).last[:version]%>
	<%unless package[:gem_version] == 'nil'%>
	<%if package[:gem_version] > package[:version]%>
	<tr>
		<td width="52%">
			<%=package[:identifier]%>
		</td>
		<td width="24%" class="success"><%=package[:version]%></td>
		<td width="24%" class="danger"><a href="//rubygems.org/gems/<%=package[:name]%>"><%=package[:gem_version]%></a></td>
	</tr>
	<%end%>
	<%end%>
	<%end%>
</table>

<div id="outdated_gems">
	<h3>Outdated Gems</h3>
</div>

<form class="pull-right">
	<input type="checkbox" onclick="$('td:contains(\'+amd64\')').parent().toggle();" checked> amd64<br>
	<input type="checkbox" onclick="$('td:contains(\'+~amd64\')').parent().toggle();" checked> ~amd64
</form>

<table id="sortable" class="table table-bordered table-condensed">
	<thead>
	<tr>
		<th>Package</th>
		<th>Gentoo Version</th>
		<th>RubyGem Version</th>
	</tr>
	</thead>
	<%Package.order{[category, lower(name), version]}.each do |package|%>
	<%next unless package[:version] == Package.where(name: package[:name]).order(:version).last[:version]%>
	<%unless package[:gem_version] == 'nil'%>
	<%if package[:gem_version] > package[:version]%>
	<tr>
		<td width="52%">
			<%=package[:identifier]%>
		</td>
		<td width="24%" class="success"><%=package[:version]%></td>
		<td width="24%" class="danger"><a href="//rubygems.org/gems/<%=package[:name]%>"><%=package[:gem_version]%></a></td>
		<td style="display:none;">
			+<%=package[:amd64_keyword]%>
		</td>
	</tr>
	<%end%>
	<%end%>
	<%end%>
</table>

Allow sorting of amd64/~amd64 packages on outdated gems page
Allow sorting of amd64/~amd64 packages on outdated gems page
