{# This file is part of the Sonata package. (c) Thomas Rabaix For the full copyright and license information, please view the LICENSE file that was distributed with this source code. #} {% extends get_admin_template('base_list_field', admin.code) %} {% set isEditable = field_description.options.editable is defined and field_description.options.editable and admin.hasAccess('edit', object) %} {% set xEditableType = field_description.type|sonata_xeditable_type %} {% if isEditable and xEditableType %} {% block field_span_attributes %} {% spaceless %} {{ parent() }} data-source = "[{value: 0, text: '{{ field_description.options.attr.boolean_values[0]|striptags }}'}, {value: 1, text: '{{ field_description.options.attr.boolean_values[1]|striptags }}'}]" {% endspaceless %} {% endblock %} {% endif %} {% block field %} {{ field_description.options.attr.boolean_values[object.readed]|raw }} {% endblock %}