templates/Slivki/sale/sale_list_box.html.twig line 1

Open in your IDE?
  1. {% set flierURL = getURL(constant('Slivki\\Repository\\SeoRepository::RESOURCE_URL_SALE_CATEGORY'), constant('Slivki\\Entity\\Category::FLIER_SALE_CATEGORY_ID')) %}
  2. <div class="sale-list-box">
  3.     <div class="clear"></div>
  4.     {% if firstBanner is defined and firstBanner %}
  5.         <div class="sale-banner first-banner">
  6.             {% if firstBanner.isJavaScript() %}
  7.                 {{ firstBanner.getCode() }}
  8.             {% else %}
  9.                 {% if '.swf' in firstBanner.getFilePath() %}
  10.                     {% include 'Slivki/banners/swf_banner.html.twig' with {'banner': firstBanner, 'width': '650', 'height': '90'} %}
  11.                 {% else %}
  12.                     <a href="{{ firstBanner.getURL() }}" target="_blank" rel="nofollow">
  13.                         <img style="border:none;" src="{{ firstBanner.getFilePath() }}" alt="{{ firstBanner.getTitle() }}" title="{{ firstBanner.getTitle() }}"/>
  14.                     </a>
  15.                 {% endif %}
  16.             {% endif %}
  17.         </div>
  18.     {% endif %}
  19.     <div class="sale-list-box-table">
  20.         {% if categoryList is defined %}
  21.             {% for category in categoryList %}
  22.                 {% if category.categoryBox %}
  23.                     <div class="table-item sales-list category-oid category-id" data-category-oid="{{ category.category.getID() }}" data-id="{{ category.category.getID() }}">
  24.                         {% if flierURL != app.request.pathInfo and (noCategoryTitle is not defined or not noCategoryTitle) %}
  25.                             <div class="table-item-title"><a href="{{ getURL("Slivki:Sale:category", category.category.getID()) }}">  {{ category.category.getName() }} &nbsp;<span class="sales-count">({{ category.category.getEntityCount() }})</span></a></div>
  26.                         {% endif %}
  27.                         {% if(category.category.getID() == 1978) %}
  28.                             <div class="info-icon" data-original-title="Новости располагаются по популярности <br> за трое суток в автоматическом режиме" title="" data-placement="bottom" data-toggle="tooltip">
  29.                                 <i class="slivki-icon slivki-icon-info-circled-o"></i>
  30.                             </div>
  31.                         {% endif %}
  32.                         {{ category.categoryBox|raw }}
  33.                         {% if unfoldedCategory is not defined %}
  34.                             <a onclick="showMoreSales({{ category.category.getID() }})" class="show-all-sales-in-category" data-category-id="{{ category.category.getID() }}">
  35.                                 Посмотреть весь раздел▼
  36.                             </a>
  37.                             <a onclick="hideSales({{ category.category.getID() }})" style="display: none" class="hide-sales-in-category" data-category-id="{{ category.category.getID() }}">
  38.                                 Свернуть ▲
  39.                             </a>
  40.                         {% endif %}
  41.                     </div>
  42.                 {% endif %}
  43.                 {% if loop.first and secondBanner is defined and secondBanner %}
  44.                     <div class="sale-banner">
  45.                         {% if secondBanner.isJavaScript() %}
  46.                             {{ secondBanner.getCode() }}
  47.                         {% else %}
  48.                             {% if '.swf' in secondBanner.getFilePath() %}
  49.                                 {% include 'Slivki/banners/swf_banner.html.twig' with {'banner': secondBanner, 'width': '650', 'height': '90'} %}
  50.                             {% else %}
  51.                                 <a href="{{ secondBanner.getURL() }}" target="_blank" rel="nofollow">
  52.                                     <img style="border:none;" src="{{ secondBanner.getFilePath() }}" alt="{{ secondBanner.getTitle() }}" title="{{ secondBanner.getTitle() }}"/>
  53.                                 </a>
  54.                             {% endif %}
  55.                         {% endif %}
  56.                     </div>
  57.                 {% endif %}
  58.             {% endfor %}
  59.         {% endif %}
  60.     </div>
  61. </div>