{% extends "collapse.html" %}
{% load i18n %}

{% block collapse_title %}
{{ children | length }} {% trans 'Child Categories' %}
{% endblock %}

{% block collapse_content %}
<ul class="list-group">
{% for child in children %}
<li class="list-group-item">
    <strong><a href="{% url 'category-detail' child.id %}">{{ child.name }}</a></strong>
    {% if child.description %}
    <em> - {{ child.description }}</em>
    {% endif %}
    {% if child.partcount > 0 %}
    <span class='badge'>{{ child.partcount }} {% trans 'Part' %}{% if child.partcount > 1 %}s{% endif %}</span>
    {% endif %}
</li>
{% endfor %}
</ul>
{% endblock %}