{#

This file is part of the Sonata package.

(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.

#}

{% extends sonata_block.templates.block_base %}

{% set translation_domain = settings.translation_domain ?? admin.translationDomain %}

{% block block %}
    <!-- small box -->
    <div class="small-box {{ settings.color }}">
        <div class="inner">
            <h3>{{ pager.count() }}</h3>
            <p>
                {% if translation_domain %}
                    {{ settings.text|transchoice(pager.count(), {}, translation_domain) }}
                    {# NEXT_MAJOR: bump "symfony/translation" to ^4.2 and replace the previous line with the following #}
                    {# {{ settings.text|trans({'%count%': pager.count()}, translation_domain) }} #}
                {% else %}
                    {{ settings.text }}
                {% endif %}
            </p>
        </div>
        <div class="icon">
            <i class="fa {{ settings.icon }}"></i>
        </div>
        <a href="{{ admin.generateUrl('list', {filter: settings.filters}) }}" class="small-box-footer">
            {{ 'stats_view_more'|trans({}, 'SonataAdminBundle') }} <i class="fa fa-arrow-circle-right" aria-hidden="true"></i>
        </a>
    </div>
{% endblock %}
