{% load i18n apphooks_config_tags %}

{% if plugin_configuration_error %}
    {% if request.user.is_staff or request.user.is_superuser %}
        <p>{{ plugin_configuration_error }}</p>
    {% endif %}
{% else %}
    <ul>
        {% for category in instance.categories %}
            <li>
                <a href="{% namespace_url "category-job-opening-list" category.slug namespace=instance.app_config.namespace %}">
                    {{ category.name }}
                    <span>{{ category.count }}</span>
                </a>
            </li>
        {% empty %}
            <li>{% trans "No items available" %}</li>
        {% endfor %}
    </ul>
{% endif %}
