vendor/sonata-project/admin-bundle/src/Resources/views/CRUD/base_edit.html.twig line 1

Open in your IDE?
  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')|truncate(15) }}
  14.     {% endif %}
  15. {% endblock %}
  16. {% block navbar_title %}
  17.     {# NEXT_MAJOR: remove default filter #}
  18.     {% if objectId|default(admin.id(object)) is not null %}
  19.         {{ 'title_edit'|trans({'%name%': admin.toString(object)|truncate(100) }, 'SonataAdminBundle') }}
  20.     {% else %}
  21.         {{ 'title_create'|trans({}, 'SonataAdminBundle')|truncate(100) }}
  22.     {% endif %}
  23. {% endblock %}
  24. {%- block actions -%}
  25.     {% include '@SonataAdmin/CRUD/action_buttons.html.twig' %}
  26. {%- endblock -%}
  27. {%- block tab_menu -%}
  28.     {{ knp_menu_render(admin.sidemenu(action), {
  29.         'currentClass': 'active',
  30.         'template': get_global_template('tab_menu_template')
  31.     }, 'twig') }}
  32. {%- endblock -%}
  33. {% use '@SonataAdmin/CRUD/base_edit_form.html.twig' with form as parentForm %}
  34. {% block form %}
  35.     {{ block('parentForm') }}
  36. {% endblock %}