{# 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 base_template %} {% block title %}{{ 'title_search_results'|trans({'%query%': query}, 'SonataAdminBundle') }}{% endblock %} {% block breadcrumb %}{% endblock %} {% block content %} {% if query is defined and query is not same as(false) %} {% set count = 0 %}
{% for group in groups %} {% set display = group.roles is empty or is_granted(sonata_config.getOption('role_super_admin')) or group.roles|filter(role => is_granted(role))|length > 0 %} {% if display %} {% for admin in group.items %} {% set count = count + 1 %} {% if admin.hasRoute('create') and admin.hasAccess('create') or admin.hasRoute('list') and admin.hasAccess('list') %} {{ sonata_block_render({ 'type': 'sonata.admin.block.search_result' }, { 'query': query, 'admin_code': admin.code, 'page': 0, 'per_page': 10, 'icon': group.icon }) }} {% endif %} {% endfor %} {% endif %} {% endfor %}
{% endif %} {% endblock %}