{%- for field, metadata in fields %}
{%- if loop.first and ('show' in actions) %}
{{ '{{ entity.'~ field|replace({'_': ''}) ~' }}' }} |
{%- elseif metadata.type in ['date', 'datetime'] %}
{{ '{% if entity.'~ field|replace({'_': ''}) ~' %}{{ entity.'~ field|replace({'_': ''}) ~'|date(\'Y-m-d H:i:s\') }}{% endif %}' }} |
{%- else %}
{{ '{{ entity.'~ field|replace({'_': ''}) ~' }}' }} |
{%- endif %}
{%- if loop.last %}
{%- include "views/others/actions.html.twig" %}
|
{%- endif %}
{%- endfor %}
{{ '{% endfor %}' }}