euscanwww: category, categories and package views
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
@ -1,21 +1,34 @@
|
||||
{% extends "euscan/_datatable.html" %}
|
||||
|
||||
{% load sub %}
|
||||
{% load mul %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - categories
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Categories</h2>
|
||||
<table id="table">
|
||||
<table id="table" class="display">
|
||||
<thead>
|
||||
<th>Category</th>
|
||||
<th>Ebuilds</th>
|
||||
<th>Unpackaged</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for category in categories %}
|
||||
<tr>
|
||||
<td>{{ category.category }}</td>
|
||||
{% if category.n_versions == category.n_packaged %}
|
||||
<tr class="gradeA">
|
||||
{% else %}{% if category.n_versions < category.n_packaged|mul:2 %}
|
||||
<tr class="gradeC">
|
||||
{% else %}
|
||||
<tr class="gradeX">
|
||||
{% endif %}{% endif %}
|
||||
<td><a href="{% url euscan.views.category category.category %}">{{ category.category }}</a></td>
|
||||
<td>{{ category.n_packaged }}</td>
|
||||
<td>{{ category.n_versions|sub:category.n_packaged }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user