base_edit.html.twig 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. <li>{% include 'SonataAdminBundle:Button:show_button.html.twig' %}</li>
  20. <li>{% include 'SonataAdminBundle:Button:history_button.html.twig' %}</li>
  21. <li>{% include 'SonataAdminBundle:Button:acl_button.html.twig' %}</li>
  22. <li>{% include 'SonataAdminBundle:Button:list_button.html.twig' %}</li>
  23. <li>{% include 'SonataAdminBundle:Button:create_button.html.twig' %}</li>
  24. {% endblock %}
  25. {% block tab_menu %}{{ knp_menu_render(admin.sidemenu(action), {'currentClass' : 'active', 'template': 'SonataAdminBundle:Core:tab_menu_template.html.twig'}, 'twig') }}{% endblock %}
  26. {% use 'SonataAdminBundle:CRUD:base_edit_form.html.twig' with form as parentForm %}
  27. {% block form %}
  28. {{ block('parentForm') }}
  29. {% endblock %}