base_edit.html.twig 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 %}
  9. {# NEXT_MAJOR: remove default filter #}
  10. {% if objectId|default(admin.id(object)) is not null %}
  11. {{ "title_edit"|trans({'%name%': admin.toString(object)|truncate(15) }, 'SonataAdminBundle') }}
  12. {% else %}
  13. {{ "title_create"|trans({}, 'SonataAdminBundle') }}
  14. {% endif %}
  15. {% endblock %}
  16. {% block navbar_title %}
  17. {{ block('title') }}
  18. {% endblock %}
  19. {%- block actions -%}
  20. {% include 'SonataAdminBundle:CRUD:action_buttons.html.twig' %}
  21. {%- endblock -%}
  22. {% block tab_menu %}{{ knp_menu_render(admin.sidemenu(action), {'currentClass' : 'active', 'template': sonata_admin.adminPool.getTemplate('tab_menu_template')}, 'twig') }}{% endblock %}
  23. {% use 'SonataAdminBundle:CRUD:base_edit_form.html.twig' with form as parentForm %}
  24. {% block form %}
  25. {{ block('parentForm') }}
  26. {% endblock %}