<commit_before>{% extends 'ColectaItemBundle:Default:itemMicro.html.twig' %}

{% set files = item.isolateLast %}

{% if files | length == 0 %}
    {% set files = item.files %}
{% endif %}
        
{% block thumbnail %}
    {% if item.files | length > 0 %}
        
        {% set preview = files[0] %}
        
        {% if preview.filetype in ['jpeg','gif','png'] %}
            <a href="{{ path('ColectaFileView', { 'slug': preview.slug }) }}"><img class="img-responsive" src="{{ path('ColectaFileThumbnail', {'slug':preview.slug, 'width':'200', 'height':'200'}) }}"></a>
        {% else %}
            <a href="{{ path('ColectaFileDownload',{ 'slug': preview.slug, 'type': preview.filetype }) }}" class="btn btn-success">{{ preview.name }} <i class="fa fa-arrow-down fa-fw"></i></a>
        {% endif %}
        
    {% endif %}
{% endblock %}

{% block summary %}
    <p>{{ item.summary }}{% if item.text | length > item.summary | length %} (...){% endif %}</p>
    
    {% if files | length > 1 %}
        <div>
            {% for file in files|slice(1, 5) %}
                {% if file.filetype in ['jpeg','gif','png'] %}
                    <a href="{{ path('ColectaFileView', { 'slug': file.slug }) }}"><img src="{{ path('ColectaFileThumbnail', {'slug':file.slug, 'width':'60', 'height':'60'}) }}"></a>
                {% else %}
                    <a href="{{ path('ColectaFileDownload',{ 'slug': file.slug, 'type': file.filetype }) }}" class="btn btn-success">{{ file.name }} <i class="fa fa-arrow-down fa-fw"></i></a>
                {% endif %}
            {% endfor %}
        </div>
    {% endif %}
{% endblock %}<commit_msg>Bug fix<commit_after>{% extends 'ColectaItemBundle:Default:itemMicro.html.twig' %}

{% set files = item.isolateLast %}

{% if files | length == 0 %}
    {% set files = item.files %}
{% endif %}
        
{% block thumbnail %}
    {% if item.files | length > 0 %}
        
        {% set preview = files[0] %}
        
        {% if preview.filetype in ['jpeg','gif','png'] %}
            <a href="{{ path('ColectaFileView', { 'slug': preview.slug }) }}"><img class="img-responsive" src="{{ path('ColectaFileThumbnail', {'slug':preview.slug, 'width':'200', 'height':'200'}) }}"></a>
        {% else %}
            <a href="{{ path('ColectaFileDownload',{ 'slug': preview.slug, 'type': preview.filetype }) }}" class="btn btn-success">{{ preview.name }} <i class="fa fa-arrow-down fa-fw"></i></a>
        {% endif %}
        
    {% endif %}
{% endblock %}

{% block summary %}
    {% if item.summary %}<p>{{ item.summary }}{% if item.text | length > item.summary | length %} (...){% endif %}</p>{% endif %}
    
    {% if files | length > 1 %}
        <div>
            {% for file in files|slice(1, 5) %}
                {% if file.filetype in ['jpeg','gif','png'] %}
                    <a href="{{ path('ColectaFileView', { 'slug': file.slug }) }}"><img src="{{ path('ColectaFileThumbnail', {'slug':file.slug, 'width':'60', 'height':'60'}) }}"></a>
                {% else %}
                    <a href="{{ path('ColectaFileDownload',{ 'slug': file.slug, 'type': file.filetype }) }}" class="btn btn-success">{{ file.name }} <i class="fa fa-arrow-down fa-fw"></i></a>
                {% endif %}
            {% endfor %}
        </div>
    {% endif %}
{% endblock %}
{'fraction_non_alphanumeric': 0.23321234119782214, 'fraction_numerical': 0.009679370840895343, 'mean_word_length': 2.459205020920502, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6078322', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1044, 'n_words': 234}