dashboard.html.twig 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. {% extends base_template %}
  8. {% block title %}{{ 'title_dashboard'|trans({}, 'SonataAdminBundle') }}{% endblock%}
  9. {% block breadcrumb %}{% endblock %}
  10. {% block content %}
  11. {{ sonata_block_render_event('sonata.admin.dashboard.top', { 'admin_pool': admin_pool }) }}
  12. <div class="row-fluid">
  13. {% set has_center = false %}
  14. {% for block in blocks %}
  15. {% if block.position == 'center' %}
  16. {% set has_center = true %}
  17. {% endif %}
  18. {% endfor %}
  19. <div class="{% if has_center %}span3{% else %}span6{% endif %}">
  20. {% for block in blocks %}
  21. {% if block.position == 'left' %}
  22. {{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }}
  23. {% endif %}
  24. {% endfor %}
  25. </div>
  26. {% if has_center %}
  27. <div class="span4">
  28. {% for block in blocks %}
  29. {% if block.position == 'center' %}
  30. {{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }}
  31. {% endif %}
  32. {% endfor %}
  33. </div>
  34. {% endif %}
  35. <div class="{% if has_center %}span4{% else %}span6{% endif %}">
  36. {% for block in blocks %}
  37. {% if block.position == 'right' %}
  38. {{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }}
  39. {% endif %}
  40. {% endfor %}
  41. </div>
  42. </div>
  43. {{ sonata_block_render_event('sonata.admin.dashboard.bottom', { 'admin_pool': admin_pool }) }}
  44. {% endblock %}