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.

13 line
648B

  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. {% set html_id = 'ea-lightbox-' ~ field.uniqueId %}
  5. {% if field.value is not null and field.value.path is not null %}
  6. <a href="#" class="ea-lightbox-thumbnail" title="{{ field.value.legend }}" data-featherlight="#{{ html_id }}" data-featherlight-close-on-click="anywhere">
  7. <img src="{{ asset(field.value.path) }}" class="img-fluid">
  8. </a>
  9. <div id="{{ html_id }}" class="ea-lightbox">
  10. <img src="{{ asset(field.value.path) }}">
  11. </div>
  12. {% endif %}