您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

25 行
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, 'thumbnail') }}" 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 %}