vendor/easycorp/easyadmin-bundle/src/Resources/views/crud/field/text_editor.html.twig line 1

Open in your IDE?
  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
  3. {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
  4. {% if ea.crud.currentAction == 'detail' %}
  5.     {{ field.formattedValue|nl2br }}
  6. {% else %}
  7.     {% set html_id = 'ea-text-editor-' ~ field.uniqueId %}
  8.     <a href="#" data-bs-toggle="modal" data-bs-target="#{{ html_id }}">
  9.         <i class="far fa-file-alt"></i> {{ 'field.text_editor.view_content'|trans([], domain = 'EasyAdminBundle') }}
  10.     </a>
  11.     <div class="modal fade" id="{{ html_id }}" tabindex="-1" role="dialog" aria-hidden="true">
  12.         <div class="modal-dialog modal-lg" role="document">
  13.             <div class="modal-content">
  14.                 <div class="modal-header">
  15.                     <h5 class="modal-title">{{ field.label|trans }}</h5>
  16.                     <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ 'action.close'|trans([], domain = 'EasyAdminBundle') }}">
  17.                     </button>
  18.                 </div>
  19.                 <div class="modal-body">
  20.                     {{ field.formattedValue|nl2br }}
  21.                 </div>
  22.             </div>
  23.         </div>
  24.     </div>
  25. {% endif %}