templates/admin/crud/field/file.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. {# NOTE: the rel="noopener" attr is needed to avoid performance and security issues
  5.   (see https://web.dev/external-anchors-use-rel-noopener/) #}
  6. {% if field.value is not empty %}
  7.     <a target="_blank" rel="noopener"
  8.        href="{{ field.customOptions.get('basePath') }}/{{ field.value }}">{{ field.value }}</a>
  9. {% else %}
  10.     <span class="badge badge-secondary">Aucun fichier</span>
  11. {% endif %}