{# This file is part of the Sonata package. (c) Thomas Rabaix 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 %} {% block block %} {% set results_count = pager ? pager.countResults() : 0 %} {% set has_results = results_count > 0 %} {% set current_page_results = has_results ? pager.currentPageResults : [] %} {% set visibility_class = 'sonata-search-result-' ~ (has_results ? 'show' : show_empty_boxes) %}
{{ settings.icon|default('')|parse_icon }}

{% if admin.label is not empty %} {{ admin.label|trans({}, admin.translationdomain) }} {% endif %}

{% if has_results %} {{ results_count }} {% elseif admin.hasRoute('create') and admin.hasAccess('create') %} {% endif %} {% if admin.hasRoute('list') and admin.hasAccess('list') %} {% endif %}
{% if has_results %}
{% else %}

{{ 'no_results_found'|trans({}, 'SonataAdminBundle') }}

{% endif %}
{% endblock %}