summaryrefslogtreecommitdiffstats
path: root/templates/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-11-03 20:59:00 +0100
committerDan McGee <dan@archlinux.org>2011-11-03 23:19:26 +0100
commitac2278423a3d449fdfe8c813f1f2d391ef9aff08 (patch)
tree80fd046042592ae2a8771c4d7183d31613d0d315 /templates/packages
parentd8e34919811728149a12e30d438318a3c1036a83 (diff)
downloadarchweb-ac2278423a3d449fdfe8c813f1f2d391ef9aff08.tar.gz
archweb-ac2278423a3d449fdfe8c813f1f2d391ef9aff08.tar.xz
Many signoff page improvements
Add a new 'SignoffSpecification' model which will capture metadata regarding a specific package if it differs from the norm- e.g. more or less than 2 required signoffs, is known to be bad, a comment from the maintainer, etc. The groundwork is laid here; much of this will still need to be wired up in the future. Enhance the view with a lot more JS prettiness and add revoking of signoffs. The signoff page can be filtered and the links and all the fun stuff are totally dynamic now. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/packages')
-rw-r--r--templates/packages/differences.html2
-rw-r--r--templates/packages/signoff_cell.html12
-rw-r--r--templates/packages/signoffs.html50
3 files changed, 42 insertions, 22 deletions
diff --git a/templates/packages/differences.html b/templates/packages/differences.html
index dd1046b..0400ea3 100644
--- a/templates/packages/differences.html
+++ b/templates/packages/differences.html
@@ -65,7 +65,7 @@ $(document).ready(function() {
$('.results').tablesorter({widgets: ['zebra'], sortList: [[1,0], [0,0]]});
$('#diff_filter select').change(filter_packages);
$('#diff_filter input').change(filter_packages);
- $('#criteria_reset').click(filter_reset);
+ $('#criteria_reset').click(filter_differences_reset);
// fire function on page load to ensure the current form selections take effect
filter_packages();
});
diff --git a/templates/packages/signoff_cell.html b/templates/packages/signoff_cell.html
new file mode 100644
index 0000000..fce5d55
--- /dev/null
+++ b/templates/packages/signoff_cell.html
@@ -0,0 +1,12 @@
+<ul>
+ {% for signoff in group.signoffs %}
+ <li class="signed-username" title="Signed off by {{ signoff.user }}">{{ signoff.user }}{% if signoff.revoked %} (revoked){% endif %}</li>
+ {% endfor %}
+</ul>
+{% if group.user_signed_off %}
+<div><a class="signoff-link" href="{{ group.package.get_absolute_url }}signoff/revoke/"
+ title="Revoke signoff {{ group.package.pkgname }} for {{ group.package.arch }}">Revoke Signoff</a></div>
+{% else %}
+<div><a class="signoff-link" href="{{ group.package.get_absolute_url }}signoff/"
+ title="Signoff {{ group.package.pkgname }} for {{ group.package.arch }}">Signoff</a></div>
+{% endif %}
diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html
index a8aa4de..4a2f6c9 100644
--- a/templates/packages/signoffs.html
+++ b/templates/packages/signoffs.html
@@ -12,42 +12,46 @@
<p>{{ signoff_groups|length }} signoff group{{ signoff_groups|pluralize }} found.
A "signoff group" consists of packages grouped by pkgbase, architecture, and repository.</p>
+ <div class="box filter-criteria">
+ <h3>Filter Displayed Signoffs</h3>
+ <form id="signoffs_filter" method="post" action=".">
+ <fieldset>
+ <legend>Select filter criteria</legend>
+ {% for arch in arches %}
+ <div><label for="id_arch_{{ arch.name }}" title="Architecture {{ arch.name }}">Arch {{ arch.name }}</label>
+ <input type="checkbox" name="arch_{{ arch.name }}" id="id_arch_{{ arch.name }}" class="arch_filter" value="{{ arch.name }}" checked="checked"/></div>
+ {% endfor %}
+ <div><label for="id_pending" title="Packages with not enough signoffs">Only Pending Approval</label>
+ <input type="checkbox" name="pending" id="id_pending" value="pending"/></div>
+ <div ><label>&nbsp;</label><input title="Reset search criteria" type="button" id="criteria_reset" value="Reset"/></div>
+ </fieldset>
+ </form>
+ </div>
+
<table id="signoffs" class="results">
<thead>
<tr>
+ <th>Package Base/Version</th>
<th>Arch</th>
- <th>Package Base</th>
+ <th>Target Repo</th>
<th># of Packages</th>
- <th>Version</th>
<th>Last Updated</th>
- <th>Target Repo</th>
<th>Approved</th>
- <th>Signoff</th>
+ <th>Signoffs</th>
</tr>
</thead>
- <tbody>
+ <tbody id="tbody_signoffs">
{% for group in signoff_groups %}
{% with group.package as pkg %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'odd' 'even' %} {{ pkg.arch.name }}">
+ <td>{% pkg_details_link pkg %} {{ pkg.full_version }}</td>
<td>{{ pkg.arch.name }}</td>
- <td>{% pkg_details_link pkg %}</td>
+ <td>{{ group.target_repo }}</td>
<td>{{ group.packages|length }}</td>
- <td>{{ pkg.full_version }}</td>
<td>{{ pkg.last_update|date }}</td>
- <td>{{ group.target_repo }}</td>
<td class="signoff-{{ group.approved|yesno }}">
{{ group.approved|yesno|capfirst }}</td>
- <td>
- <ul>
- <li><a class="signoff-link" href="{{ pkg.get_absolute_url }}signoff/"
- title="Signoff {{ pkg.pkgname }} for {{ pkg.arch }}">Signoff</a>
- </li>
- {% for signoff in group.signoffs %}
- <li class="signed-username" title="Signed off by {{ signoff.user }}">
- {{ signoff.user }}{% if signoff.revoked %} (revoked){% endif %}</li>
- {% endfor %}
- </ul>
- </td>
+ <td>{% include "packages/signoff_cell.html" %}</td>
</tr>
{% endwith %}
{% endfor %}
@@ -60,8 +64,12 @@
<script type="text/javascript">
$(document).ready(function() {
$('a.signoff-link').click(signoff_package);
- $(".results").tablesorter({widgets: ['zebra'], sortList: [[1,0]],
+ $(".results").tablesorter({widgets: ['zebra'], sortList: [[0,0]],
headers: { 6: { sorter: false } } });
+ $('#signoffs_filter input').change(filter_signoffs);
+ $('#criteria_reset').click(filter_signoffs_reset);
+ // fire function on page load to ensure the current form selections take effect
+ filter_signoffs();
});
</script>
{% endblock %}