{% if yearFrom or yearTo or ageFrom or ageTo or dateFrom or dateTo %}
{% if dateFrom %}
{% set date = dateFrom|explodedDate %}
{{ date['d'] }} {{ date['month'] }} <a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?year={{ date['y'] }}">{{ date['y'] }}</a> r.{{ (not dateTo and not yearTo) and (ageFrom or ageTo) ? ', ' }}
{% set showMinus = true %}
{% elseif yearFrom %}
{% set showMinus = true %}
<a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?year={{ yearFrom }}">{{ yearFrom }}</a> r.{{ (not dateTo and not yearTo) and (ageFrom or ageTo) ? ', ' }}
{% endif %}
{% if dateTo %}
{% if showMinus is defined %}- {% endif %}
{% set dateTo = dateTo|explodedDate %}
{{ dateTo['d'] }} {{ dateTo['month'] }} <a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?year={{ dateTo['y'] }}">{{ dateTo['y'] }}</a> r.{{ ageFrom or ageTo ? ', ' }}
{% elseif yearTo %}
{% if showMinus is defined %}- {% endif %}
<a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?year={{ yearTo }}">{{ yearTo }}</a> r.{{ ageFrom or ageTo ? ', ' }}
{% endif %}
{% if ageFrom or ageTo %}
{% if ageFrom %}
<a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?age={{ ageFrom }}">{{ageFrom}}</a> {% if not ageTo %}w.{% endif %}
{% endif %}
{% if ageFrom and ageTo %} - {% endif %}
{% if ageTo %}
<a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?age={{ ageTo }}">{{ageTo}}</a> w.
{% endif %}
{% endif %}
{% endif %}