{% load i18n apphooks_config_tags %}

<div class="aldryn aldryn-jobs aldryn-jobs-categories">
    {% if plugin_configuration_error %}
        {% if request.user.is_staff or request.user.is_superuser %}
            <p class="alert alert-danger">{{ plugin_configuration_error }}</p>
        {% endif %}
    {% else %}
        <div class="list-group">
            {% for category in instance.categories %}
                <a href="{% namespace_url "category-job-opening-list" category.slug namespace=instance.app_config.namespace %}" class="list-group-item">
                    {{ category.name }}
                    <span class="badge pull-right">{{ category.count }}</span>
                </a>
            {% empty %}
                <div class="list-group-item">{% trans "No items available" %}</div>
            {% endfor %}
        </div>
    {% endif %}
</div>
