Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

form.html.twig 3.4KB

před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
před 3 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. {% if attribute(ea.getEntity().getInstance(), 'getTitle') is defined %}
  14. {% set content_title = 'editWithTitle'|sov_trans_admin_title(translation_entity_name, {id: ea.getEntity().getInstance().getId(), title: ea.getEntity().getInstance().getTitle()}) %}
  15. {% else %}
  16. {% set content_title = 'edit'|sov_trans_admin_title(translation_entity_name, {id: ea.getEntity().getInstance().getId()}) %}
  17. {% endif %}
  18. {% endif %}
  19. {% form_theme form with ea.crud.formThemes only %}
  20. {% trans_default_domain ea.i18n.translationDomain %}
  21. {% block body_id body_id %}
  22. {% block body_class body_class %}
  23. {% block content_title %}
  24. {{ content_title }}
  25. {% endblock %}
  26. {% block configured_head_contents %}
  27. {{ parent() }}
  28. {% for htmlContent in form.vars.ea_crud_form.assets.headContents %}
  29. {{ htmlContent|raw }}
  30. {% endfor %}
  31. {% endblock %}
  32. {% block configured_stylesheets %}
  33. {{ parent() }}
  34. {% for css_asset in form.vars.ea_crud_form.assets.cssAssets %}
  35. <link rel="stylesheet" href="{{ asset(css_asset) }}">
  36. {% endfor %}
  37. {% for webpack_encore_entry in form.vars.ea_crud_form.assets.webpackEncoreAssets %}
  38. {{ ea_call_function_if_exists('encore_entry_link_tags', webpack_encore_entry) }}
  39. {% endfor %}
  40. {% endblock %}
  41. {% block configured_javascripts %}
  42. {{ parent() }}
  43. {% for js_asset in form.vars.ea_crud_form.assets.jsAssets %}
  44. <script src="{{ asset(js_asset) }}"></script>
  45. {% endfor %}
  46. {% for webpack_encore_entry in form.vars.ea_crud_form.assets.webpackEncoreAssets %}
  47. {{ ea_call_function_if_exists('encore_entry_script_tags', webpack_encore_entry) }}
  48. {% endfor %}
  49. {% endblock %}
  50. {% block page_actions_wrapper %}
  51. {% endblock page_actions_wrapper %}
  52. {% block main %}
  53. <div class="row">
  54. <div class="col-8">
  55. {% block form %}
  56. {{ form(form) }}
  57. {% endblock form %}
  58. </div>
  59. <div class="col-4">
  60. {% block aside %}
  61. {% endblock aside %}
  62. </div>
  63. {% block form_footer %}
  64. {% embed '@LcSov/adminlte/embed/form_footer.html.twig' %}
  65. {% block width %}12{% endblock %}
  66. {% block content %}
  67. {% for action in entity.actions %}
  68. {{ include(action.templatePath, { action: action }, with_context = false) }}&nbsp;
  69. {% endfor %}
  70. {% endblock %}
  71. {% endembed %}
  72. {% endblock form_footer %}
  73. {% block delete_form %}
  74. {% if ea.crud.currentAction == 'edit' %}
  75. {{ include('@EasyAdmin/crud/includes/_delete_form.html.twig', { entity_id: entity.primaryKeyValue }, with_context = false) }}
  76. {% endif %}
  77. {% endblock delete_form %}
  78. </div>
  79. {% endblock %}