ajax_layout.html.twig 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 content %}
  8. {% set _list_table = block('list_table')|trim %}
  9. {% set _list_filters = block('list_filters')|trim %}
  10. {% set _list_filters_actions = block('list_filters_actions') %}
  11. {% block preview %}{% endblock %}
  12. {% block form %}{% endblock %}
  13. {% block list %}{% endblock %}
  14. {% block show %}{% endblock %}
  15. {% if _list_table is not empty or _list_filters is not empty %}
  16. <div class="container-fluid">
  17. <div class="row">
  18. <div class="navbar navbar-default sonata-list-table">
  19. <div class="container-fluid">
  20. {% if admin is defined and action is defined and action == 'list' and admin.listModes|length > 1 %}
  21. <div class="nav navbar-right btn-group">
  22. {% for mode, settings in admin.listModes %}
  23. <a href="{{ admin.generateUrl('list', app.request.query.all|merge({_list_mode: mode})) }}" class="btn btn-default navbar-btn btn-sm{% if admin.getListMode() == mode %} active{% endif %}"><i class="{{ settings.class }}"></i></a>
  24. {% endfor %}
  25. </div>
  26. {% endif %}
  27. {% if _list_filters_actions is not empty %}
  28. {{ _list_filters_actions|raw }}
  29. {% endif %}
  30. </div>
  31. </div>
  32. </div>
  33. {% if _list_filters|trim %}
  34. <div class="row">
  35. {{ _list_filters|raw }}
  36. </div>
  37. {% endif %}
  38. <div class="row">
  39. {{ _list_table|raw }}
  40. </div>
  41. </div>
  42. {% endif %}
  43. {% endblock %}