{% block extends %}
{{ "{% extends '::base.html.twig' %}" }}
{% endblock extends %}

{% block body %}
{{ "{% block body -%}" }}
    <h1>{{ entity }}</h1>

    <table class="record_properties">
        <tbody>
        {%- for field, metadata in fields %}

            <tr>
                <th>{{ field|capitalize }}</th>

            {%- if metadata.type in ['date', 'datetime'] %}

                <td>{{ '{{ entity.' ~ field|replace({'_': ''}) ~ '|date(\'Y-m-d H:i:s\') }}' }}</td>

            {%- else %}

                <td>{{ '{{ entity.' ~ field|replace({'_': ''}) ~ ' }}' }}</td>

            {%- endif %}

            </tr>

        {%- endfor %}

        </tbody>
    </table>

    {% set hide_edit, hide_delete = false, false %}
    {% include 'crud/views/others/record_actions.html.twig.twig' %}
{{ "{% endblock %}" }}
{% endblock body %}
