<commit_before>{% extends '::frontend.html.twig' %}

{% block events 'active' %}

{% block article %}

<div class="title-block">
    {% if app.user %} <a href="{{ path('ColectaEventNew') }}" class="btn btn-small pull-right btn-primary">Crear evento <i class="icon-plus"></i></a> {% endif %}
    <h2>
    {% if ismonth %}
        {% include "::month.html.twig" with {'date': date, 'short':0} %}
    {% else %}
        {{ date | date('j')  }} de {% include "::month.html.twig" with {'date': date, 'short':0} %} 
    {% endif %}
    </h2>
</div>

<div class="bigcalendar">
{% render "ColectaActivityBundle:Event:calendar" with {'date':date | date('Y/n/j')} %}
</div>

{% for item in items %}
      
    {% set path = 'Colecta' ~ item.type ~ ':micro.html.twig' %}
    {% set path = path | replace({'/':'Bundle:'}) %}
    {% include path with { 'item': item } only %}
        
{% else %}
    
    <div class="alert alert-info">
        No hay ningún evento en esta fecha.
    </div>

{% endfor %}

{% endblock %}<commit_msg>Hide passed events on current month by default<commit_after>{% extends '::frontend.html.twig' %}

{% block events 'active' %}

{% block article %}

<div class="title-block">
    {% if app.user %} <a href="{{ path('ColectaEventNew') }}" class="btn btn-small pull-right btn-primary">Crear evento <i class="icon-plus"></i></a> {% endif %}
    <h2>
    {% if ismonth %}
        {% include "::month.html.twig" with {'date': date, 'short':0} %}
    {% else %}
        {{ date | date('j')  }} de {% include "::month.html.twig" with {'date': date, 'short':0} %} 
    {% endif %}
    </h2>
</div>

<div class="bigcalendar">
{% render "ColectaActivityBundle:Event:calendar" with {'date':date | date('Y/n/j')} %}
</div>

{% set hiddenset = 0 %}
{% if date | date('Ym') == 'now' | date('Ym') and items | length > 0 and items[0].happened %}
    {% set hiddenset = 1 %}
    <div id="hiddenset" style="display:none;">
{% endif %}

{% for item in items %}
    
    {% if hiddenset and not item.happened %}
        {% set hiddenset = 0 %}
        </div>
        <p style="margin:10px 0 20px 45px;"><button onClick="$(this).css('display','none'); $('#hiddenset').css('display','block')" type="button" class="btn btn-small"><i class="icon-ellipsis-vertical" style="padding:0 5px"></i> Ver eventos pasados</button></p>
    {% endif %}
    
    {% set path = 'Colecta' ~ item.type ~ ':micro.html.twig' %}
    {% set path = path | replace({'/':'Bundle:'}) %}
    {% include path with { 'item': item } only %}
        
{% else %}
    
    <div class="alert alert-info">
        No hay ningún evento en esta fecha.
    </div>

{% endfor %}

{% endblock %}
{'fraction_non_alphanumeric': 0.2230188679245283, 'fraction_numerical': 0.00830188679245283, 'mean_word_length': 3.1164596273291925, 'pattern_counts': {'":': 4, '<': 35, '<?xml version=': 0, '>': 36, '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': '6345253', 'n_tokens_mistral': 1025, 'n_tokens_neox': 904, 'n_words': 226}