<commit_before>{# empty Twig template #}

{% block icon_cell -%}
    <td class="cell-icon">
        {#{% if data.attributes.class is defined %}
            {% set iconclass = (attribute(data.attributes.class, data.value) is defined) ? attribute(data.attributes.class, data.value) : 'default' %}
            <i class="{{ iconclass }}"></i>
        {% else %}
            <i class="{{ data.value }}"></i>
        {% endif %}#}
        <i class="{{ data.value }}"></i>
    </td>
{% endblock icon_cell %}

{% block checkbox_cell -%}
    <td>
        <input type="checkbox" />
    </td>
{% endblock checkbox_cell %}

{% block datetime_cell -%}
    {{- block('simple_cell') -}}
{% endblock datetime_cell %}

{% block text_cell -%}
    {{- block('simple_cell') -}}
{% endblock text_cell %}

{% block textarea_cell -%}
    <td>
        {{ data.value[:20] }}
    </td>
{% endblock textarea_cell %}

{% block integer_cell -%}
    {{- block('simple_cell') -}}
{% endblock integer_cell %}

{% block count_cell -%}
    {{- block('simple_cell') -}}
{% endblock count_cell %}

{% block bootstrap_collection_cell -%}
    <td>
        {% if data.value|length < 1 %}
            {% for value in data.value %}
                {{ value }}{% if loop.last == false %},{% endif %}
            {% endfor %}
        {% else %}
            -
        {% endif %}
    </td>
{% endblock bootstrap_collection_cell %}

{% block label_cell -%}
    <td>
        {% if data.attributes.class is defined %}
            {% set class = (attribute(data.attributes.class, data.value) is defined) ? attribute(data.attributes.class, data.value) : 'default' %}
            <span class="label label-{{ class }}">{{ data.value|trans }}</span>
        {% else %}
            <span class="label label-default">{{ data.value|trans }}</span>
        {% endif %}
    </td>
{% endblock label_cell %}

{% block simple_cell -%}
    {% if data.value != null %}
        {% if data.value is iterable %}
            <td>
                {% for value in data.value %}
                    {% if value is not iterable %}
                        {{ value }}
                    {% endif %}
                {% endfor %}
            </td>
        {% else %}
            {% if data.property in ['title', 'name', 'username'] %}
                {{- block('link_cell') -}}
            {% elseif data.property in ['email'] %}
                <td>
                    <a href="mailto:{{ data.value }}">{{ data.value }}</a>
                </td>
            {% else %}
                <td>
                    {{ data.value }}
                </td>
            {% endif %}
        {% endif %}
    {% else %}
        {{ block('empty_cell') }}
    {% endif %}
{% endblock simple_cell %}

{% block empty_cell -%}
    <td>-</td>
{% endblock %}

{#
    Link cell take an array with [0] = value, [1] = route to link to, [2] params for the route
#}
{% block link_cell -%}
    <td>
        {% if data.value is iterable %}
            <a href="{{ path(data.value[1], data.value[2]) }}">
                {{ data.value[0] }}
            </a>
        {% else %}
            <a href="{{ path('opifer.crud.edit', {'slug': slug, 'id': row.id}) }}">
                {{ data.value }}
            </a>
        {% endif %}
    </td>
{% endblock link_cell %}<commit_msg>check if data.value is nog empty<commit_after>{# empty Twig template #}

{% block icon_cell -%}
    <td class="cell-icon">
        {#{% if data.attributes.class is defined %}
            {% set iconclass = (attribute(data.attributes.class, data.value) is defined) ? attribute(data.attributes.class, data.value) : 'default' %}
            <i class="{{ iconclass }}"></i>
        {% else %}
            <i class="{{ data.value }}"></i>
        {% endif %}#}
        {% if data.value|length %}
            <i class="{{ data.value }}"></i>
        {% else %}
            -
        {% endif %}
    </td>
{% endblock icon_cell %}

{% block checkbox_cell -%}
    <td>
        <input type="checkbox" />
    </td>
{% endblock checkbox_cell %}

{% block datetime_cell -%}
    {{- block('simple_cell') -}}
{% endblock datetime_cell %}

{% block text_cell -%}
    {{- block('simple_cell') -}}
{% endblock text_cell %}

{% block textarea_cell -%}
    <td>
        {{ data.value[:20] }}
    </td>
{% endblock textarea_cell %}

{% block integer_cell -%}
    {{- block('simple_cell') -}}
{% endblock integer_cell %}

{% block count_cell -%}
    {{- block('simple_cell') -}}
{% endblock count_cell %}

{% block bootstrap_collection_cell -%}
    <td>
        {% if data.value|length < 1 %}
            {% for value in data.value %}
                {{ value }}{% if loop.last == false %},{% endif %}
            {% endfor %}
        {% else %}
            -
        {% endif %}
    </td>
{% endblock bootstrap_collection_cell %}

{% block label_cell -%}
    <td>
        {% if data.attributes.class is defined %}
            {% set class = (attribute(data.attributes.class, data.value) is defined) ? attribute(data.attributes.class, data.value) : 'default' %}
            <span class="label label-{{ class }}">{{ data.value|trans }}</span>
        {% else %}
            <span class="label label-default">{{ data.value|trans }}</span>
        {% endif %}
    </td>
{% endblock label_cell %}

{% block simple_cell -%}
    {% if data.value != null %}
        {% if data.value is iterable %}
            <td>
                {% for value in data.value %}
                    {% if value is not iterable %}
                        {{ value }}
                    {% endif %}
                {% endfor %}
            </td>
        {% else %}
            {% if data.property in ['title', 'name', 'username'] %}
                {{- block('link_cell') -}}
            {% elseif data.property in ['email'] %}
                <td>
                    <a href="mailto:{{ data.value }}">{{ data.value }}</a>
                </td>
            {% else %}
                <td>
                    {{ data.value }}
                </td>
            {% endif %}
        {% endif %}
    {% else %}
        {{ block('empty_cell') }}
    {% endif %}
{% endblock simple_cell %}

{% block empty_cell -%}
    <td>-</td>
{% endblock %}

{#
    Link cell take an array with [0] = value, [1] = route to link to, [2] params for the route
#}
{% block link_cell -%}
    <td>
        {% if data.value|length %}
            {% if data.value is iterable %}
                <a href="{{ path(data.value[1], data.value[2]) }}">
                    {{ data.value[0] }}
                </a>
            {% else %}
                <a href="{{ path('opifer.crud.edit', {'slug': slug, 'id': row.id}) }}">
                    {{ data.value }}
                </a>
            {% endif %}
        {% else %}
            -
        {% endif %}
    </td>
{% endblock link_cell %}
{'fraction_non_alphanumeric': 0.18910963944076528, 'fraction_numerical': 0.0026490066225165563, 'mean_word_length': 1.655724892536147, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2352488', 'n_tokens_mistral': 2286, 'n_tokens_neox': 2015, 'n_words': 469}