vendor/sonata-project/admin-bundle/src/Resources/views/CRUD/display_boolean.html.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of the Sonata package.
  3. (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  4. For the full copyright and license information, please view the LICENSE
  5. file that was distributed with this source code.
  6. #}
  7. {%- apply spaceless %}
  8.     {% if value %}
  9.         {% set text = 'label_type_yes'|trans({}, 'SonataAdminBundle') %}
  10.     {% else %}
  11.         {% set text = 'label_type_no'|trans({}, 'SonataAdminBundle') %}
  12.     {% endif %}
  13.     {% if inverse|default(false) ? not value : value %}
  14.         {% set class = 'label-success' %}
  15.     {% else %}
  16.         {% set class = 'label-danger' %}
  17.     {% endif %}
  18.     <span class="label {{ class }}">{{ text }}</span>
  19. {% endapply -%}