{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #} {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #} {% extends ea.templatePath('layout') %} {% if ea.crud.currentAction == 'new' %} {% set form = new_form %} {% set body_id = 'ea-new-' ~translation_entity_name ~ '-' ~ entity.primaryKeyValue %} {% set body_class = 'ea-new ea-new-' ~ translation_entity_name %} {% set content_title = 'new'|sov_trans_admin_title(translation_entity_name) %} {% elseif ea.crud.currentAction == 'edit' %} {% set form = edit_form %} {% set body_id = 'ea-edit-' ~ translation_entity_name ~ '-' ~ entity.primaryKeyValue %} {% set body_class = 'ea-edit ea-edit-' ~ translation_entity_name %} {% if attribute(ea.getEntity().getInstance(), 'getTitle') is defined %} {% set content_title = 'editWithTitle'|sov_trans_admin_title(translation_entity_name, {id: ea.getEntity().getInstance().getId(), title: ea.getEntity().getInstance().getTitle()}) %} {% else %} {% set content_title = 'edit'|sov_trans_admin_title(translation_entity_name, {id: ea.getEntity().getInstance().getId()}) %} {% endif %} {% endif %} {% form_theme form with ea.crud.formThemes only %} {% trans_default_domain ea.i18n.translationDomain %} {% block body_id body_id %} {% block body_class body_class %} {% block content_title %} {{ content_title }} {% endblock %} {% block configured_head_contents %} {{ parent() }} {% for htmlContent in form.vars.ea_crud_form.assets.headContents %} {{ htmlContent|raw }} {% endfor %} {% endblock %} {% block configured_stylesheets %} {{ parent() }} {% for css_asset in form.vars.ea_crud_form.assets.cssAssets %} {% endfor %} {% for webpack_encore_entry in form.vars.ea_crud_form.assets.webpackEncoreAssets %} {{ ea_call_function_if_exists('encore_entry_link_tags', webpack_encore_entry) }} {% endfor %} {% endblock %} {% block configured_javascripts %} {{ parent() }} {% for js_asset in form.vars.ea_crud_form.assets.jsAssets %} {% endfor %} {% for webpack_encore_entry in form.vars.ea_crud_form.assets.webpackEncoreAssets %} {{ ea_call_function_if_exists('encore_entry_script_tags', webpack_encore_entry) }} {% endfor %} {% endblock %} {% block page_actions_wrapper %} {% endblock page_actions_wrapper %} {% block main %}