base_results.html.twig 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. {#
  2. This file is part of the Sonata package.
  3. (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  4. For the full copyright and license information, please view the LICENSE
  5. file that was distributed with this source code.
  6. #}
  7. {% block num_pages %}
  8. {{ admin.datagrid.pager.page }} / {{ admin.datagrid.pager.lastpage }}
  9. &nbsp;-&nbsp;
  10. {% endblock %}
  11. {% block num_results %}
  12. {% transchoice admin.datagrid.pager.nbresults with {'%count%': admin.datagrid.pager.nbresults} from 'SonataAdminBundle' %}list_results_count{% endtranschoice %}
  13. &nbsp;-&nbsp;
  14. {% endblock %}
  15. {% block max_per_page %}
  16. <label class="control-label" for="{{ admin.uniqid }}_per_page">{% trans from 'SonataAdminBundle' %}label_per_page{% endtrans %}</label>
  17. <select class="per-page small form-control" id="{{ admin.uniqid }}_per_page" style="width: auto">
  18. {% for per_page in admin.getperpageoptions %}
  19. <option {% if per_page == admin.datagrid.pager.maxperpage %}selected="selected"{% endif %} value="{{ admin.generateUrl('list', {'filter': admin.datagrid.values|merge({'_page': 1, '_per_page': per_page})}) }}">
  20. {{- per_page -}}
  21. </option>
  22. {% endfor %}
  23. </select>
  24. {% endblock %}