{# ============================================================
   AdminContent – bulk action result partial
   Variables: action, success (array), errors (array)
   ============================================================ #}

{% if errors is not empty %}
<div class="alert alert-warning alert-dismissible" role="alert">
    <button type="button" class="close" data-dismiss="alert">&times;</button>
    <strong><i class="fa fa-exclamation-triangle"></i> {{ _t('ADMIN_CONTENT_BULK_RESULT_PARTIAL_FAILURE') }}</strong>
    {% if success is not empty %}
     — {{ _t('ADMIN_CONTENT_BULK_RESULT_PARTIAL_UPDATED')|replace({'{success}': success|length, '{errors}': errors|length}) }}
    {% else %}
     — {{ _t('ADMIN_CONTENT_BULK_RESULT_ERRORS')|replace({'{errors}': errors|length}) }}
    {% endif %}
    <ul style="margin-top:6px;margin-bottom:0;padding-left:18px;">
        {% for e in errors %}
        <li>{{ e }}</li>
        {% endfor %}
    </ul>
</div>
{% endif %}

{% if success is not empty %}
<div class="alert alert-success alert-dismissible" role="alert">
    <button type="button" class="close" data-dismiss="alert">&times;</button>
    <i class="fa fa-check-circle"></i>
    {% if action == 'delete' %}
        {{ _t('ADMIN_CONTENT_BULK_RESULT_DELETED')|replace({'{success}': success|length}) }}
    {% elseif action == 'change-acls' %}
        {{ _t('ADMIN_CONTENT_BULK_RESULT_ACLS')|replace({'{success}': success|length}) }}
    {% elseif action == 'change-theme' %}
        {{ _t('ADMIN_CONTENT_BULK_RESULT_THEME')|replace({'{success}': success|length}) }}
    {% else %}
        {{ _t('ADMIN_CONTENT_BULK_RESULT_UPDATED')|replace({'{success}': success|length}) }}
    {% endif %}
</div>
{% endif %}
