{% extends 'D2AdvertBundle::base.html.twig' %} {% set tag_list = d2_get_all_tag_list(adverts) %} {% if app.request.get('page') %} {% set current_page = 'Page: ' ~ app.request.get('page') %} {% else %} {% set current_page = 'Page: 1' %} {% endif %} {% block title %} {{ d2_sys_config('sys_orginization') }} - {% trans %}Smalls{% endtrans %} {% endblock title %} {% block head_seo %} {% endblock head_seo %} {% block head_script_extra %} {% endblock head_script_extra %} {% block head_style_extra %} {% endblock head_style_extra %} {% block page_header %} {% endblock page_header %} {% block content %}
{% for k, v in app.request.query %} {% if k|lower not in ['search', 'tags'] %} {% endif %} {% endfor %}

{% if adverts|length != 0 %} {% set col_count = 0 %} {% for i in 1..adverts|length %} {% set col_space = (12 - col_count) %} {% set entity = d2_next_advert(adverts, col_space) %} {% if entity.slug|trim != '' %} {% set show_path = path('advert_show_slug', { 'slug': entity.slug}) %} {% else %} {% set show_path = path('advert_show', { 'id': entity.id}) %} {% endif %} {% if loop.first %}
{% endif %} {% if entity.advertType == constant('D2\\AdvertBundle\\Entity\\Advert::TYPE_AT_IMAGE_SMALL') %} {% set col_count = col_count + 3 %} {% if col_count > 12 %} {% set col_count = 0 %}
{% endif %}
{% elseif entity.advertType == constant('D2\\AdvertBundle\\Entity\\Advert::TYPE_AT_IMAGE_LARGE') %} {% set col_count = col_count + 6 %} {% if col_count > 12 %} {% set col_count = 0 %}
{% endif %}
{% elseif entity.advertType == constant('D2\\AdvertBundle\\Entity\\Advert::TYPE_AT_TEXT_BUSINESS') %} {% set col_count = col_count + 3 %} {% if col_count > 12 %} {% set col_count = 0 %}
{% endif %}
{% if entity.text|length > 400 %}

{{ entity.text|filterScript()|raw }}

{% else %}

{{ entity.text }}

{% endif %}
{% elseif entity.advertType == constant('D2\\AdvertBundle\\Entity\\Advert::TYPE_AT_PROPERTY_RENTAL') or entity.advertType == constant('D2\\AdvertBundle\\Entity\\Advert::TYPE_AT_PROPERTY_SALE') %} {% set col_count = col_count + 6 %} {% if col_count > 12 %} {% set col_count = 0 %}
{% endif %}

{{ entity.title }}

{{ entity.subTitle }}

{{ entity.text|filterScript()|raw }}

{% elseif entity.advertType == constant('D2\\AdvertBundle\\Entity\\Advert::TYPE_AT_NON_BUSINESS') %} {% endif %} {% endfor %}
{% endif %}
{% endblock content %}