{# 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 admin.getTemplate('base_list_field') %} {% 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: '{%- trans from 'SonataAdminBundle' %}label_type_no{% endtrans -%}'},{value: 1, text: '{%- trans from 'SonataAdminBundle' %}label_type_yes{% endtrans -%}'}]" {% endspaceless %} {% endblock %} {% endif %} {% block field %} {% spaceless %} {% if value %} {%- trans from 'SonataAdminBundle' %}label_type_yes{% endtrans -%} {% else %} {%- trans from 'SonataAdminBundle' %}label_type_no{% endtrans -%} {% endif %} {% endspaceless %} {% endblock %}