12345678910111213141516171819202122232425262728293031323334353637383940 |
- {#
- 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.
- #}
- <th{% if(is_diff|default(false)) %} class="diff"{% endif %}>{% block name %}{{ field_description.label|trans({}, field_description.translationDomain ?: admin.translationDomain) }}{% endblock %}</th>
- <td>
- {%- block field -%}
- {% spaceless %}
- {% set collapse = field_description.options.collapse|default(false) %}
- {% if collapse %}
- <div class="sonata-readmore"
- data-readmore-height="{{ collapse.height|default(40) }}"
- data-readmore-more="{{ collapse.more|default('read_more')|trans({}, 'SonataAdminBundle') }}"
- data-readmore-less="{{ collapse.less|default('read_less')|trans({}, 'SonataAdminBundle') }}">
- {% block field_value %}
- {% if field_description.options.safe %}{{ value|raw }}{% else %}{{ value|nl2br }}{% endif %}
- {% endblock %}
- </div>
- {% else %}
- {{ block('field_value') }}
- {% endif %}
- {% endspaceless %}
- {%- endblock -%}
- </td>
- {% block field_compare %}
- {% if(value_compare is defined) %}
- <td>
- {% set value = value_compare %}
- {{ block('field') }}
- </td>
- {% endif %}
- {% endblock %}
|