- {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
- {# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
- {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
- {% set html_id = 'ea-lightbox-' ~ field.uniqueId %}
- {% if field.value is not null and field.value.path is not null %}
- <a href="#" class="ea-lightbox-thumbnail" title="{{ field.value.legend }}" data-featherlight="#{{ html_id }}" data-featherlight-close-on-click="anywhere">
- <img src="{{ asset(field.value.path) }}" class="img-fluid">
- </a>
-
- <div id="{{ html_id }}" class="ea-lightbox">
- <img src="{{ asset(field.value.path) }}">
- </div>
- {% endif %}
|