Actualización

This commit is contained in:
Xes
2025-04-10 12:24:57 +02:00
parent 8969cc929d
commit 45420b6f0d
39760 changed files with 4303286 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
{#
This file is part of the Sonata package.
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'SonataAdminBundle:CRUD:base_show_field.html.twig' %}
{% block field%}
{% spaceless %}
{% if field_description.options.choices is defined %}
{% if field_description.options.multiple is defined and field_description.options.multiple==true and value is iterable %}
{% set result = '' %}
{% set delimiter = field_description.options.delimiter|default(', ') %}
{% for val in value %}
{% if result is not empty %}
{% set result = result ~ delimiter %}
{% endif %}
{% if field_description.options.choices[val] is defined %}
{% if field_description.options.catalogue is not defined %}
{% set result = result ~ field_description.options.choices[val] %}
{% else %}
{% set result = result ~ field_description.options.choices[val]|trans({}, field_description.options.catalogue) %}
{% endif %}
{% else %}
{% set result = result ~ val %}
{% endif %}
{% endfor %}
{% set value = result %}
{% elseif value in field_description.options.choices|keys %}
{% if field_description.options.catalogue is not defined %}
{% set value = field_description.options.choices[value] %}
{% else %}
{% set value = field_description.options.choices[value]|trans({}, field_description.options.catalogue) %}
{% endif %}
{% endif %}
{% endif %}
{% if field_description.options.safe %}
{{ value|raw }}
{% else %}
{{ value }}
{% endif %}
{% endspaceless %}
{% endblock %}