collection.html.twig 482B

1234567891011
  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. {# this is a bit ugly, but Twig doesn't have a 'is numeric' test #}
  5. {% if field.formattedValue is iterable %}
  6. {% for item in field.formattedValue %}
  7. <span class="badge badge-secondary">{{ item }}</span>
  8. {% endfor %}
  9. {% else %}
  10. {{ field.formattedValue }}
  11. {% endif %}