Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

25 lines
1.1KB

  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 field.value is not null and field.value.path is not null %}
  5. {% set id_modal = 'modal-'~field.value.id %}
  6. <a href="{{ sov_liip(field.value.path, 'big') }}" data-toggle="modal" data-target="#{{ id_modal }}" title="{{ field.value.legend }}">
  7. <img src="{{ sov_liip(field.value.path, 'index') }}" alt="{{ field.value.legend }}">
  8. </a>
  9. {% embed "@LcSov/adminlte/embed/modal.twig" %}
  10. {% block id %}{{ id_modal }}{% endblock %}
  11. {% block size %}modal-xl{% endblock %}
  12. {% block title %}{{ field.value.legend ? field.value.legend : 'Image' }}{% endblock %}
  13. {% block body %}
  14. <img src="{{ sov_liip(field.value.path, 'big') }}" alt="{{ field.value.legend }}" />
  15. {% endblock %}
  16. {% block footer_wrapper %}{% endblock %}
  17. {% endembed %}
  18. {% else %}
  19. <div class="badge badge-secondary">Aucun(e)</div>
  20. {% endif %}