templates/bundles/EasyAdminBundle/default/edit.html.twig line 1

Open in your IDE?
  1. {% form_theme form with easyadmin_config('design.form_theme') only %}
  2. {% set _entity_config = easyadmin_entity(app.request.query.get('entity')) %}
  3. {% set _entity_id = attribute(entity, _entity_config.primary_key_field_name) %}
  4. {% trans_default_domain _entity_config.translation_domain %}
  5. {% set _trans_parameters = { '%entity_name%': _entity_config.name|trans, '%entity_label%': _entity_config.label|trans, '%entity_id%': _entity_id } %}
  6. {% extends '@!EasyAdmin/default/edit.html.twig' %}
  7. {% block content_breadcrumb_link %}
  8.     {% set _default_title = 'list.page_title'|trans(_trans_parameters, 'EasyAdminBundle') %}
  9.     <li>
  10.         <a href="#">
  11.             {{ (_entity_config.list.title is defined ? _entity_config.list.title|trans(_trans_parameters) : _default_title)|raw }}
  12.         </a>
  13.     </li>
  14.     <li class="active">{{ "action.edit"|trans }}</li>
  15. {% endblock content_breadcrumb_link %}
  16. {% block content_header_title %}
  17.     <i class="fa fa-{{ _entity_config.icon is defined ? _entity_config.icon : "cog" }}"></i>
  18.     {% apply spaceless %}
  19.     {% set _default_title = 'list.page_title'|trans(_trans_parameters, 'EasyAdminBundle') %}
  20.     {{ _entity_config.list.title is defined ? _entity_config.list.title|trans(_trans_parameters) : _default_title }}
  21.     {% endapply %}
  22. {% endblock %}
  23. {% block main %}
  24.     <div class="panel">
  25.         {% block entity_form %}
  26.             <div class="panel-heading">
  27.                 <div class="panel-control">
  28.                     {{- block('global_actions') -}}
  29.                 </div>
  30.                 <h3 class="panel-title">{{- block('content_title') -}}</h3>
  31.             </div>
  32.             {{ form(form) }}
  33.         {% endblock entity_form %}
  34.     </div>
  35.     {% block delete_form %}
  36.         {{ include('@EasyAdmin/default/includes/_delete_form.html.twig', {
  37.             view: 'edit',
  38.             referer: app.request.query.get('referer', ''),
  39.             delete_form: delete_form,
  40.             _translation_domain: _entity_config.translation_domain,
  41.             _trans_parameters: _trans_parameters,
  42.             _entity_config: _entity_config,
  43.         }, with_context = false) }}
  44.     {% endblock delete_form %}
  45. {% endblock %}