Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

112 lines
3.1KB

  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
  3. {% extends ea.templatePath('layout') %}
  4. {% if ea.crud.currentAction == 'new' %}
  5. {% set form = new_form %}
  6. {% set body_id = 'ea-new-' ~translation_entity_name ~ '-' ~ entity.primaryKeyValue %}
  7. {% set body_class = 'ea-new ea-new-' ~ translation_entity_name %}
  8. {% set content_title = 'new'|sov_trans_admin_title(translation_entity_name) %}
  9. {% elseif ea.crud.currentAction == 'edit' %}
  10. {% set form = edit_form %}
  11. {% set body_id = 'ea-edit-' ~ translation_entity_name ~ '-' ~ entity.primaryKeyValue %}
  12. {% set body_class = 'ea-edit ea-edit-' ~ translation_entity_name %}
  13. {% set content_title = 'edit'|sov_trans_admin_title(translation_entity_name, {id: ea.getEntity().getInstance().getId()}) %}
  14. {% endif %}
  15. {% form_theme form with ea.crud.formThemes only %}
  16. {% trans_default_domain ea.i18n.translationDomain %}
  17. {% block body_id body_id %}
  18. {% block body_class body_class %}
  19. {% block content_title %}
  20. {{ content_title }}
  21. {% endblock %}
  22. {% block configured_head_contents %}
  23. {{ parent() }}
  24. {% for htmlContent in form.vars.ea_crud_form.assets.headContents %}
  25. {{ htmlContent|raw }}
  26. {% endfor %}
  27. {% endblock %}
  28. {% block configured_stylesheets %}
  29. {{ parent() }}
  30. {% for css_asset in form.vars.ea_crud_form.assets.cssAssets %}
  31. <link rel="stylesheet" href="{{ asset(css_asset) }}">
  32. {% endfor %}
  33. {% for webpack_encore_entry in form.vars.ea_crud_form.assets.webpackEncoreAssets %}
  34. {{ ea_call_function_if_exists('encore_entry_link_tags', webpack_encore_entry) }}
  35. {% endfor %}
  36. {% endblock %}
  37. {% block configured_javascripts %}
  38. {{ parent() }}
  39. {% for js_asset in form.vars.ea_crud_form.assets.jsAssets %}
  40. <script src="{{ asset(js_asset) }}"></script>
  41. {% endfor %}
  42. {% for webpack_encore_entry in form.vars.ea_crud_form.assets.webpackEncoreAssets %}
  43. {{ ea_call_function_if_exists('encore_entry_script_tags', webpack_encore_entry) }}
  44. {% endfor %}
  45. {% endblock %}
  46. {% block page_actions_wrapper %}
  47. {% endblock page_actions_wrapper %}
  48. {% block main %}
  49. <div class="row">
  50. <div class="col-8">
  51. {% block form %}
  52. {{ form(form) }}
  53. {% endblock form %}
  54. </div>
  55. <div class="col-4">
  56. {% block aside %}
  57. {% endblock aside %}
  58. </div>
  59. {% block form_footer %}
  60. {% embed '@LcSov/adminlte/embed/form_footer.html.twig' %}
  61. {% block width %}12{% endblock %}
  62. {% block content %}
  63. {% for action in entity.actions %}
  64. {{ include(action.templatePath, { action: action }, with_context = false) }}&nbsp;
  65. {% endfor %}
  66. {% endblock %}
  67. {% endembed %}
  68. {% endblock form_footer %}
  69. {% block delete_form %}
  70. {% if ea.crud.currentAction == 'edit' %}
  71. {{ include('@EasyAdmin/crud/includes/_delete_form.html.twig', { entity_id: entity.primaryKeyValue }, with_context = false) }}
  72. {% endif %}
  73. {% endblock delete_form %}
  74. </div>
  75. {% endblock %}