vendor/sonata-project/admin-bundle/src/Resources/views/CRUD/list_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. {% extends get_admin_template('base_list_field', admin.code) %}
  8. {% set is_editable = field_description.option('editable', false) and admin.hasAccess('edit', object) %}
  9. {% set x_editable_type = field_description.type|sonata_xeditable_type %}
  10. {% block field_span_attributes %}
  11.     {% if is_editable and x_editable_type %}
  12.         {% apply spaceless %}
  13.             {{ parent() }}
  14.             data-source="[{value: 0, text: '{%- trans from 'SonataAdminBundle' %}label_type_no{% endtrans -%}'},{value: 1, text: '{%- trans from 'SonataAdminBundle' %}label_type_yes{% endtrans -%}'}]"
  15.         {% endapply %}
  16.     {% endif %}
  17. {% endblock %}
  18. {% block field %}
  19.     {%- include '@SonataAdmin/CRUD/display_boolean.html.twig' with {
  20.         value: value,
  21.         inverse: field_description.option('inverse'),
  22.     } only -%}
  23. {% endblock %}