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.

image.html.twig 1.1KB

3 jaren geleden
3 jaren geleden
3 jaren geleden
12345678910111213141516171819202122232425
  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 %}