list_choice.html.twig 741 B

1234567891011121314151617181920212223
  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 admin.getTemplate('base_list_field') %}
  8. {% block field %}
  9. {% if field_description.options.choices and value in field_description.options.choices|keys %}
  10. {% if field_description.options.catalogue is not defined %}
  11. {% set value = field_description.options.choices[value] %}
  12. {% else %}
  13. {% set value = field_description.options.choices[value]|trans({}, field_description.options.catalogue) %}
  14. {% endif %}
  15. {% endif %}
  16. {{ parent() }}
  17. {% endblock %}