mirror of
https://github.com/nanoy42/coope
synced 2024-11-22 11:23:11 +00:00
Merge branch 'add-features-categories' into 'dev'
Add features categories See merge request coope/coopev3!15
This commit is contained in:
commit
6792c0e099
2 changed files with 6 additions and 2 deletions
|
@ -19,6 +19,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>Nom</th>
|
<th>Nom</th>
|
||||||
<th>Ordre</th>
|
<th>Ordre</th>
|
||||||
|
<th>Nombre de produits (dont actifs)</th>
|
||||||
<th>Administrer</th>
|
<th>Administrer</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -27,6 +28,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{% url 'gestion:categoryProfile' category.pk %}">{{ category }}</a></td>
|
<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>{% 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>
|
<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>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -142,15 +142,17 @@
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for category in categories %}
|
{% for category in categories %}
|
||||||
|
{% if category.active_products.count > 0 %}
|
||||||
<tr style="text-align:center; font-weight:bold;"><td colspan="4">{{category}}</td></tr>
|
<tr style="text-align:center; font-weight:bold;"><td colspan="4">{{category}}</td></tr>
|
||||||
{% for product in category.active_products %}
|
{% for product in category.active_products %}
|
||||||
{% if forloop.counter0|divisibleby:4 %}
|
{% if forloop.counter0|divisibleby:4 %}
|
||||||
<tr style="text-align:center">
|
<tr style="text-align:center">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td><button class="product {% if product.adherentRequired %}special{% endif%}" target="{{product.pk}}">{{product.name}}</button></td>
|
<td><button class="product {% if product.adherentRequired %}special{% endif%}" target="{{product.pk}}">{{product.name}}</button></td>
|
||||||
{% if forloop.counter|divisibleby:4 %}
|
{% if forloop.counter|divisibleby:4 %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if not category.active_products|divisibleby:4 %}
|
{% if not category.active_products|divisibleby:4 %}
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in a new issue