dashboard.html.twig 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. <div class="row-fluid">
  12. {% set has_center = false %}
  13. {% for block in blocks %}
  14. {% if block.position == 'center' %}
  15. {% set has_center = true %}
  16. {% endif %}
  17. {% endfor %}
  18. <div class="{% if has_center %}span4{% else %}span6{% endif %}">
  19. {% for block in blocks %}
  20. {% if block.position == 'left' %}
  21. {{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }}
  22. {% endif %}
  23. {% endfor %}
  24. </div>
  25. {% if has_center %}
  26. <div class="span4">
  27. {% for block in blocks %}
  28. {% if block.position == 'center' %}
  29. {{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }}
  30. {% endif %}
  31. {% endfor %}
  32. </div>
  33. {% endif %}
  34. <div class="{% if has_center %}span4{% else %}span6{% endif %}">
  35. {% for block in blocks %}
  36. {% if block.position == 'right' %}
  37. {{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }}
  38. {% endif %}
  39. {% endfor %}
  40. </div>
  41. </div>
  42. {% endblock %}