diff options
-rw-r--r-- | media/archweb.js | 7 | ||||
-rw-r--r-- | packages/views.py | 1 | ||||
-rw-r--r-- | templates/packages/signoffs.html | 12 |
3 files changed, 16 insertions, 4 deletions
diff --git a/media/archweb.js b/media/archweb.js index a9f4e0c9..2b8e5d6d 100644 --- a/media/archweb.js +++ b/media/archweb.js @@ -267,22 +267,27 @@ function filter_signoffs() { /* start with all rows, and then remove ones we shouldn't show */ var rows = $('#tbody_signoffs').children(); var all_rows = rows; - $('#signoffs_filter .arch_filter').each(function() { + /* apply arch and repo filters */ + $('#signoffs_filter .arch_filter').add( + '#signoffs_filter .repo_filter').each(function() { if (!$(this).is(':checked')) { rows = rows.not('.' + $(this).val()); } }); + /* and then the slightly more expensive pending check */ if ($('#id_pending').is(':checked')) { rows = rows.has('td.signoff-no'); } /* hide all rows, then show the set we care about */ all_rows.hide(); rows.show(); + $('#filter-count').text(rows.length); /* make sure we update the odd/even styling from sorting */ $('.results').trigger('applyWidgets'); } function filter_signoffs_reset() { $('#signoffs_filter .arch_filter').attr('checked', 'checked'); + $('#signoffs_filter .repo_filter').attr('checked', 'checked'); $('#id_pending').removeAttr('checked'); filter_signoffs(); } diff --git a/packages/views.py b/packages/views.py index aa15d0cf..3c0c2bee 100644 --- a/packages/views.py +++ b/packages/views.py @@ -381,6 +381,7 @@ def signoffs(request): context = { 'signoff_groups': signoff_groups, 'arches': Arch.objects.all(), + 'repo_names': sorted(set(g.target_repo for g in signoff_groups)), } return direct_to_template(request, 'packages/signoffs.html', context) diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html index d517e5e3..f4511f75 100644 --- a/templates/packages/signoffs.html +++ b/templates/packages/signoffs.html @@ -9,7 +9,7 @@ <h2>Package Signoffs</h2> - <p>{{ signoff_groups|length }} signoff group{{ signoff_groups|pluralize }} found. + <p>{{ signoff_groups|length }} total signoff group{{ signoff_groups|pluralize }} found. A "signoff group" consists of packages grouped by pkgbase, architecture, and repository.</p> <div class="box filter-criteria"> @@ -21,9 +21,15 @@ <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 %} + {% for repo_name in repo_names %} + <div><label for="id_repo_{{ repo_name|lower }}" title="Target Repository {{ repo_name }}">[{{ repo_name|lower }}]</label> + <input type="checkbox" name="repo_{{ repo_name|lower }}" id="id_repo_{{ repo_name|lower }}" class="repo_filter" value="{{ repo_name|lower }}" 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> </label><input title="Reset search criteria" type="button" id="criteria_reset" value="Reset"/></div> + <div><label> </label><input title="Reset search criteria" type="button" id="criteria_reset" value="Reset"/></div> + <div class="clear"></div> + <div id="filter-info"><span id="filter-count">{{ signoff_groups|length }}</span> signoff groups displayed.</div> </fieldset> </form> </div> @@ -44,7 +50,7 @@ </thead> <tbody id="tbody_signoffs"> {% for group in signoff_groups %} - <tr class="{% cycle 'odd' 'even' %} {{ group.arch.name }}"> + <tr class="{% cycle 'odd' 'even' %} {{ group.arch.name }} {{ group.target_repo|lower }}"> <td>{% pkg_details_link group.package %} {{ group.version }}</td> <td>{{ group.arch.name }}</td> <td>{{ group.target_repo }}</td> |