3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-07-15 01:34:04 +00:00

Add number of products on product's list

This commit is contained in:
Yoann Pétri 2019-05-06 08:39:31 +02:00
parent 524f3dcc06
commit acf770a4ef

View file

@ -19,6 +19,7 @@
<tr>
<th>Nom</th>
<th>Ordre</th>
<th>Nombre de produits (dont actifs)</th>
<th>Administrer</th>
</tr>
</thead>
@ -27,6 +28,7 @@
<tr>
<td><a href="{% url 'gestion:categoryProfile' category.pk %}">{{ category }}</a></td>
<td>{% if category.order == 0 %}0 (non affichéé){% else %}{{category.order}}{% endif %}</td>
<td>{{category.product_set.count}} ({{category.active_products.count}})</td>
<td><a href="{% url 'gestion:categoryProfile' category.pk %}" class="button small"><i class="fa fa-eye"></i> Profil</a> {% if perms.gestion.change_category %}<a href="{% url 'gestion:editCategory' category.pk %}" class="button small"><i class="fa fa-pencil-alt"></i> Modifier</a>{% endif %}</td>
</tr>
{% endfor %}