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