diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-22 00:36:57 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-22 00:36:57 -0400 |
commit | df7a6aa620af6a165bdacd755757f8cb1179331c (patch) | |
tree | 384b4c62d1f50d8effb733d81d2a810666807624 /templates/devel/packages.html | |
parent | 94f972bb892dbf9a86f089f1872ae6d849c0cd0e (diff) | |
parent | a22557811a24b68ef85d4271787c48d8d1e4fc99 (diff) |
Merge branch 'archweb-generic2'
Conflicts:
README.BRANDING
local_settings.py.example
packages/templatetags/package_extras.py
public/views.py
releng/views.py
settings.py
sitestatic/archnavbar/archnavbar.css
sitestatic/silhouette.png
templates/base.html
templates/packages/differences.html
templates/packages/opensearch.xml
templates/packages/search.html
templates/public/donate.html
templates/public/download.html
templates/public/feeds.html
templates/public/index.html
urls.py
Diffstat (limited to 'templates/devel/packages.html')
-rw-r--r-- | templates/devel/packages.html | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/templates/devel/packages.html b/templates/devel/packages.html index 77146891..ed96ad5a 100644 --- a/templates/devel/packages.html +++ b/templates/devel/packages.html @@ -13,7 +13,28 @@ {% if maintainer %}This report only includes packages maintained by {{ maintainer.get_full_name }} ({{ maintainer.username }}).{% endif %} </p> - <table class="results"> + + <div class="box filter-criteria"> + <h3>Filter Packages</h3> + <form id="report_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 %} + {% for repo in repos %} + <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> </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">{{ packages|length }}</span> packages displayed.</div> + </fieldset> + </form> + </div> + + <table id="dev-report-results" class="results"> <thead> <tr> <th>Arch</th> @@ -31,7 +52,7 @@ </thead> <tbody> {% for pkg in packages %} - <tr class="{% cycle pkgr2,pkgr1 %}"> + <tr class="{% cycle pkgr2,pkgr1 %} {{ pkg.arch.name }} {{ pkg.repo.name|lower }}"> <td>{{ pkg.arch.name }}</td> <td>{{ pkg.repo.name|capfirst }}</td> <td>{% pkg_details_link pkg %}</td> @@ -52,12 +73,21 @@ </tbody> </table> </div> -{% load cdn %}{% jquery %} -<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script> +{% 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() { $(".results").tablesorter({widgets: ['zebra']}); }); +$(document).ready(function() { + var filter_func = function() { filter_pkgs_list('#report_filter', '#dev-report-results tbody'); }; + $('#report_filter input').change(filter_func); + $('#criteria_reset').click(function() { filter_pkgs_reset(filter_func); }); + // fire function on page load to ensure the current form selections take effect + filter_func(); +}); </script> {% endblock %} |