diff options
author | Dan McGee <dan@archlinux.org> | 2010-08-25 13:45:04 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-08-25 13:45:04 -0500 |
commit | ae5483c230d08c65d91eb7cece106b4f13a56232 (patch) | |
tree | 95fd2c95d29da95a544e1ac110e94e363a91d179 /templates/packages | |
parent | ebfc46026fd726222c32ed1251a4752dee88ca42 (diff) |
Package Differences by Architecture view
Implements FS#20416. Port over the architecture differences view from
archlinux.de and reimplement in Django with our DB schema. Also use a far
simpler SQL query to do the dirty work rather than the triple UNION
operation. This is accomplished by doing a bit more of the fetching work in
code once we know what packages are actually involved.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/packages')
-rw-r--r-- | templates/packages/differences.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/templates/packages/differences.html b/templates/packages/differences.html new file mode 100644 index 00000000..bc749016 --- /dev/null +++ b/templates/packages/differences.html @@ -0,0 +1,37 @@ +{% 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> +{% endif %} +{% endblock %} |