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.

86 line
3.6KB

  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {# @var entities \EasyCorp\Bundle\EasyAdminBundle\Collection\EntityDtoCollection #}
  3. {# @var paginator \EasyCorp\Bundle\EasyAdminBundle\Orm\EntityPaginator #}
  4. {% extends ea.templatePath('layout') %}
  5. {% trans_default_domain ea.i18n.translationDomain %}
  6. {% block content_title %}
  7. {{ 'detail'|sov_trans_admin_title(translation_entity_name, {id: ea.getEntity().getInstance().getId()}) }}
  8. {% endblock %}
  9. {% block content_breadcrumb %}
  10. {{ include('@LcSov/adminlte/block/breadcrumb.html.twig') }}
  11. {% endblock content_breadcrumb %}
  12. {% block page_actions %}
  13. {% endblock page_actions %}
  14. {% block main %}
  15. {% block main_prepend %}{% endblock %}
  16. <div class="col-12" id="{% block detail_id %}{% endblock detail_id %}">
  17. {% block card_wrapper %}
  18. <div class="card card-outline card-primary">
  19. {% block card_header_wrapper %}
  20. <div class="card-header">
  21. <div class="btn-list float-sm-right">
  22. </div>
  23. </div>
  24. {% endblock %}
  25. {% block card_body_wrapper %}
  26. <div class="card-body">
  27. {% block detail_fields %}
  28. {% set row_number = 0 %}
  29. {% for field in entity.fields %}
  30. {% set is_decoration_field = 'field-form_panel' in field.cssClass %}
  31. {% if loop.first and not is_decoration_field %}
  32. {% set row_number = 0 %}
  33. {{ _self.open_empty_content_panel(field) }}
  34. {% endif %}
  35. {% if is_decoration_field %}
  36. {% if not loop.first %}
  37. {{ _self.close_content_panel() }}
  38. {% endif %}
  39. {% set row_number = 0 %}
  40. {% if field.label is empty and field.help is empty %}
  41. {{ _self.open_empty_content_panel(field) }}
  42. {% else %}
  43. {{ _self.open_content_panel_with_header(field) }}
  44. {% endif %}
  45. {% endif %}
  46. {% block detail_field %}
  47. {% if not is_decoration_field %}
  48. {{ _self.render_field(entity, field, row_number) }}
  49. {% endif %}
  50. {% endblock %}
  51. {% set row_number = is_decoration_field ? row_number : row_number + 1 %}
  52. {% endfor %}
  53. {{ _self.close_content_panel() }}
  54. {% endblock %}
  55. </div>
  56. {% endblock %}
  57. {% block card_footer_wrapper %}
  58. <div class="card-footer">
  59. <div class="row">
  60. {% block delete_form %}
  61. {{ include('@EasyAdmin/crud/includes/_delete_form.html.twig', { entity_id: entity.primaryKeyValue }, with_context = false) }}
  62. {% endblock delete_form %}
  63. </div>
  64. </div>
  65. {% endblock %}
  66. </div>
  67. {% endblock card_wrapper %}
  68. </div>
  69. {% block main_append %}{% endblock %}
  70. {% endblock main %}