packages.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {% extends "base.html" %}
  2. {% load cycle from future %}
  3. {% load static from staticfiles %}
  4. {% load attributes %}
  5. {% load package_extras %}
  6. {% block title %}{{ BRANDING_DISTRONAME }} - {{ title }}{% endblock %}
  7. {% block content %}
  8. <div class="box">
  9. <h2>{{ title }}{% if maintainer %},
  10. maintained by {{ maintainer.get_full_name }}{% endif%}</h2>
  11. <p>{{ packages|length }} package{{ packages|pluralize }} found.
  12. {% if maintainer %}This report only includes packages maintained by
  13. {{ maintainer.get_full_name }} ({{ maintainer.username }}).{% endif %}
  14. </p>
  15. <div class="box filter-criteria">
  16. <h3>Filter Packages</h3>
  17. <form id="report_filter" method="post" action=".">
  18. <fieldset>
  19. <legend>Select filter criteria</legend>
  20. {% for arch in arches %}
  21. <div><label for="id_arch_{{ arch.name }}" title="Architecture {{ arch.name }}">Arch {{ arch.name }}</label>
  22. <input type="checkbox" name="arch_{{ arch.name }}" id="id_arch_{{ arch.name }}" class="arch_filter" value="{{ arch.name }}" checked="checked"/></div>
  23. {% endfor %}
  24. {% for repo in repos %}
  25. <div><label for="id_repo_{{ repo.name|lower }}" title="Target Repository {{ repo.name }}">[{{ repo.name|lower }}]</label>
  26. <input type="checkbox" name="repo_{{ repo.name|lower }}" id="id_repo_{{ repo.name|lower }}" class="repo_filter" value="{{ repo.name|lower }}" checked="checked"/></div>
  27. {% endfor %}
  28. <div ><label>&nbsp;</label><input title="Reset search criteria" type="button" id="criteria_reset" value="Reset"/></div>
  29. <div class="clear"></div>
  30. <div id="filter-info"><span id="filter-count">{{ packages|length }}</span> packages displayed.</div>
  31. </fieldset>
  32. </form>
  33. </div>
  34. <table id="dev-report-results" class="results">
  35. <thead>
  36. <tr>
  37. <th>Arch</th>
  38. <th>Repo</th>
  39. <th>Name</th>
  40. <th>Version</th>
  41. <th>Description</th>
  42. <th>Last Updated</th>
  43. <th>Build Date</th>
  44. <th>Flag Date</th>
  45. {% for name in column_names %}
  46. <th>{{ name }}</th>
  47. {% endfor %}
  48. </tr>
  49. </thead>
  50. <tbody>
  51. {% for pkg in packages %}
  52. <tr class="{% cycle pkgr2,pkgr1 %} {{ pkg.arch.name }} {{ pkg.repo.name|lower }}">
  53. <td>{{ pkg.arch.name }}</td>
  54. <td>{{ pkg.repo.name|capfirst }}</td>
  55. <td>{% pkg_details_link pkg %}</td>
  56. {% if pkg.flag_date %}
  57. <td><span class="flagged">{{ pkg.full_version }}</span></td>
  58. {% else %}
  59. <td>{{ pkg.full_version }}</td>
  60. {% endif %}
  61. <td class="wrap">{{ pkg.pkgdesc }}</td>
  62. <td>{{ pkg.last_update|date }}</td>
  63. <td>{{ pkg.build_date|date }}</td>
  64. <td>{{ pkg.flag_date|date }}</td>
  65. {% for attr in column_attrs %}
  66. <td>{{ pkg|attribute:attr }}</td>
  67. {% endfor %}
  68. </tr>
  69. {% endfor %}
  70. </tbody>
  71. </table>
  72. </div>
  73. {% endblock %}
  74. {% block script_block %}
  75. {% load cdn %}{% jquery %}{% jquery_tablesorter %}
  76. <script type="text/javascript" src="{% static "archweb.js" %}"></script>
  77. <script type="text/javascript">
  78. $(document).ready(function() {
  79. $(".results").tablesorter({widgets: ['zebra']});
  80. });
  81. $(document).ready(function() {
  82. var filter_func = function() {
  83. filter_pkgs_list('#report_filter', '#dev-report-results tbody');
  84. filter_report_save('{{ report.slug }}');
  85. };
  86. $('#report_filter input').change(filter_func);
  87. $('#criteria_reset').click(function() { filter_pkgs_reset(filter_func); });
  88. // run on page load to ensure current form selections take effect
  89. filter_report_load('{{ report.slug }}');
  90. filter_func();
  91. });
  92. </script>
  93. {% endblock %}