evorepo/templates/packages/differences.html
Dan McGee 7873cb9a05 Unbreak the package differences page
We had a weird conditional around everything on the page that doesn't
really need to be there. Remove it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-20 13:31:43 -05:00

114 lines
4.9 KiB
HTML

{% extends "base.html" %}
{% load static from staticfiles %}
{% block title %}Arch Linux - Package Differences Reports{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
{% block content %}
<div class="box">
<h2>Package Differences by Architecture</h2>
<div class="filter-criteria">
<h3>Filter Differences View</h3>
<form id="diff_filter" method="post" action=".">
<fieldset>
<legend>Select filter criteria</legend>
<div><label for="id_archonly" title="Limit packages to selected architecture">Architecture Limitation</label>
<select name="archonly" id="id_archonly">
<option value="all">Show All</option>
<option value="both" selected="selected">Only In Both</option>
<option value="{{ arch_a.name }}">In {{ arch_a.name }} Only</option>
<option value="{{ arch_b.name }}">In {{ arch_b.name }} Only</option>
</select>
</div>
<div><label for="id_multilib" title="Show multilib packages"><tt>[multilib]</tt> Visible</label>
<input type="checkbox" name="multilib" id="id_multilib" value="multilib"/></div>
<div><label for="id_minor" title="Show minor version mismatches">Minor Version Mismatches</label>
<input type="checkbox" name="minor" id="id_minor" value="minor"/></div>
<div ><label>&nbsp;</label><input title="Reset search criteria" type="button" id="criteria_reset" value="Reset"/></div>
</fieldset>
</form>
</div>
<table id="table_differences" 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 id="tbody_differences">
{% for diff in differences %}
<tr class="{% cycle 'odd' 'even' %} {{ diff.classes }}">
<td>{{ diff.pkgname }}</td>
<td>{{ diff.repo.name }}</td>
{% if diff.pkg_a %}
<td><a href="{{ diff.pkg_a.get_absolute_url }}"
title="View package details for {{ diff.pkg_a.pkgname }}">
<span{% if diff.pkg_a.flag_date %} class="flagged"{% endif %}>{{ diff.pkg_a.full_version }}</span></a></td>
{% else %}<td>-</td>{% endif %}
{% if diff.pkg_b %}
<td><a href="{{ diff.pkg_b.get_absolute_url }}"
title="View package details for {{ diff.pkg_b.pkgname }}">
<span{% if diff.pkg_b.flag_date %} class="flagged"{% endif %}>{{ diff.pkg_b.full_version }}</span></a></td>
{% else %}<td>-</td>{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="box">
<h2>Multilib Differences to Main Packages</h2>
<table id="table_multilib_differences" class="results">
<thead>
<tr>
<th>Multilib Name</th>
<th>Multilib Version</th>
<th>i686 Version</th>
<th>i686 Name</th>
<th>i686 Repo</th>
<th>Multilib Last Updated</th>
<th>i686 Last Updated</th>
</tr>
</thead>
<tbody>
{% for pkg1, pkg2 in multilib_differences %}
<tr class="{% cycle 'odd' 'even' %}">
<td><a href="{{ pkg1.get_absolute_url }}"
title="View package details for {{ pkg1.pkgname }}">{{ pkg1.pkgname }}</a></td>
<td><span{% if pkg1.flag_date %} class="flagged"{% endif %}>{{ pkg1.full_version }}</span></td>
<td><span{% if pkg2.flag_date %} class="flagged"{% endif %}>{{ pkg2.full_version }}</span></td>
<td><a href="{{ pkg2.get_absolute_url }}"
title="View package details for {{ pkg2.pkgname }}">{{ pkg2.pkgname }}</a></td>
<td>{{ pkg2.repo }}</td>
<td>{{ pkg1.last_update|date }}</td>
<td>{{ pkg2.last_update|date }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
{% block script_block %}
{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#table_differences').tablesorter({widgets: ['zebra'], sortList: [[1,0], [0,0]]});
$('#table_multilib_differences').tablesorter({widgets: ['zebra'], sortList: [[5, 0]]});
});
$(document).ready(function() {
$('#diff_filter select').change(filter_packages);
$('#diff_filter input').change(filter_packages);
$('#criteria_reset').click(filter_packages_reset);
// fire function on page load to ensure the current form selections take effect
filter_packages();
});
</script>
{% endblock %}