You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

edit.html.twig 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 _entity_config.templates.layout %}
  7. {% block body_id 'easyadmin-edit-' ~ _entity_config.name ~ '-' ~ _entity_id %}
  8. {% block content_title %}
  9. {% apply spaceless %}
  10. {% if entity.title is defined %}
  11. {{ 'edit.title'|trans({"%title%" : entity.title, "%id%" : entity.id}, 'lcshop') }}
  12. {% else %}
  13. {% set _default_title = 'edit.page_title'|trans(_trans_parameters, 'EasyAdminBundle') %}
  14. {{ _entity_config.edit.title is defined ? _entity_config.edit.title|trans(_trans_parameters) : _default_title }}
  15. {% endif %}
  16. {% endapply %}
  17. {% endblock %}
  18. {% block content_footer_wrapper '' %}
  19. {% block main %}
  20. {% block entity_form %}
  21. {{ form(form) }}
  22. {% endblock entity_form %}
  23. {% block delete_form %}
  24. {{ include('@EasyAdmin/default/includes/_delete_form.html.twig', {
  25. view: 'edit',
  26. referer: app.request.query.get('referer', ''),
  27. delete_form: delete_form,
  28. _translation_domain: _entity_config.translation_domain,
  29. _trans_parameters: _trans_parameters,
  30. _entity_config: _entity_config,
  31. }, with_context = false) }}
  32. {% endblock delete_form %}
  33. {% endblock %}
  34. {% block head_stylesheets %}
  35. {{ parent() }}
  36. <link rel="stylesheet"
  37. href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/jquery-ui/jquery-ui.min.css') }}">
  38. {% endblock %}
  39. {% block plugin_javascript %}
  40. {{ parent() }}
  41. <script src="{{ asset('bundles/lcshop/js/backend/plugin/jquery-ui/jquery-ui.min.js') }}"></script>
  42. {% endblock %}
  43. {% block script_javascript %}
  44. {{ parent() }}
  45. <script src="{{ asset('bundles/lcshop/js/backend/script/default/init-edit.js') }}"></script>
  46. {% endblock %}