{% set flierURL = getURL(constant('Slivki\\Repository\\SeoRepository::RESOURCE_URL_SALE_CATEGORY'), constant('Slivki\\Entity\\Category::FLIER_SALE_CATEGORY_ID')) %}
<div class="sale-list-box">
<div class="clear"></div>
{% if firstBanner is defined and firstBanner %}
<div class="sale-banner first-banner">
{% if firstBanner.isJavaScript() %}
{{ firstBanner.getCode() }}
{% else %}
{% if '.swf' in firstBanner.getFilePath() %}
{% include 'Slivki/banners/swf_banner.html.twig' with {'banner': firstBanner, 'width': '650', 'height': '90'} %}
{% else %}
<a href="{{ firstBanner.getURL() }}" target="_blank" rel="nofollow">
<img style="border:none;" src="{{ firstBanner.getFilePath() }}" alt="{{ firstBanner.getTitle() }}" title="{{ firstBanner.getTitle() }}"/>
</a>
{% endif %}
{% endif %}
</div>
{% endif %}
<div class="sale-list-box-table">
{% if categoryList is defined %}
{% for category in categoryList %}
{% if category.categoryBox %}
<div class="table-item sales-list category-oid category-id" data-category-oid="{{ category.category.getID() }}" data-id="{{ category.category.getID() }}">
{% if flierURL != app.request.pathInfo and (noCategoryTitle is not defined or not noCategoryTitle) %}
<div class="table-item-title"><a href="{{ getURL("Slivki:Sale:category", category.category.getID()) }}"> {{ category.category.getName() }} <span class="sales-count">({{ category.category.getEntityCount() }})</span></a></div>
{% endif %}
{% if(category.category.getID() == 1978) %}
<div class="info-icon" data-original-title="Новости располагаются по популярности <br> за трое суток в автоматическом режиме" title="" data-placement="bottom" data-toggle="tooltip">
<i class="slivki-icon slivki-icon-info-circled-o"></i>
</div>
{% endif %}
{{ category.categoryBox|raw }}
{% if unfoldedCategory is not defined %}
<a onclick="showMoreSales({{ category.category.getID() }})" class="show-all-sales-in-category" data-category-id="{{ category.category.getID() }}">
Посмотреть весь раздел▼
</a>
<a onclick="hideSales({{ category.category.getID() }})" style="display: none" class="hide-sales-in-category" data-category-id="{{ category.category.getID() }}">
Свернуть ▲
</a>
{% endif %}
</div>
{% endif %}
{% if loop.first and secondBanner is defined and secondBanner %}
<div class="sale-banner">
{% if secondBanner.isJavaScript() %}
{{ secondBanner.getCode() }}
{% else %}
{% if '.swf' in secondBanner.getFilePath() %}
{% include 'Slivki/banners/swf_banner.html.twig' with {'banner': secondBanner, 'width': '650', 'height': '90'} %}
{% else %}
<a href="{{ secondBanner.getURL() }}" target="_blank" rel="nofollow">
<img style="border:none;" src="{{ secondBanner.getFilePath() }}" alt="{{ secondBanner.getTitle() }}" title="{{ secondBanner.getTitle() }}"/>
</a>
{% endif %}
{% endif %}
</div>
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>