evorepo/templates/packages/differences.html
Dan McGee e247e0dd8c Add table sorting to a handful of pages
Anything that it makes sense to add it to gets the treatment here. Anything
with pagination can wait as that will be tougher. We also need to deal with
odd/even formatting.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-27 09:20:14 -05:00

45 lines
1.6 KiB
HTML

{% extends "base.html" %}
{% block title %}Arch Linux - Package Differences by Architecture{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
{% block content %}
{% if differences %}
<div class="box">
<h2>Package Differences by Architecture</h2>
<table class="results">
<thead>
<tr>
<th>Package Name</th>
<th>Repository</th>
<th>{{ arch_a.name }} Version</th>
<th>{{ arch_b.name }} Version</th>
</tr>
</thead>
<tbody>
{% for name, repo, pkg1, pkg2 in differences %}
<tr class="{% cycle 'odd' 'even' %}">
<td>{{ name }}</td>
<td>{{ repo.name }}</td>
{% if pkg1 %}
<td><a href="{{ pkg1.get_absolute_url }}"
title="View package details for {{ pkg1.pkgname }}">{{ pkg1.pkgver }}-{{ pkg1.pkgrel }}</a></td>
{% else %}<td>-</td>{% endif %}
{% if pkg2 %}
<td><a href="{{ pkg2.get_absolute_url }}"
title="View package details for {{ pkg2.pkgname }}">{{ pkg2.pkgver }}-{{ pkg2.pkgrel }}</a></td>
{% else %}<td>-</td>{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results").tablesorter({sortList: [[1,0], [0,0]]});
});
</script>
{% endif %}
{% endblock %}