templates/public/product/product_card-default.html.twig line 1

Open in your IDE?
  1. {% if productList.platform == 'FINLAND' %}
  2.     {% set productURL = productList.url|with_utm(
  3.         {
  4.             'utm_source': 'kvk-se',
  5.             'utm_medium': 'cross-publishing',
  6.             'utm_campaign': utmCategoriesList,
  7.             'utm_content': productList.id
  8.         }
  9.     ) %}
  10. {% else %}
  11.     {% set productURL = path('app.legacy.auction.object', {'produrlname': productList.urlname}) %}
  12. {% endif %}
  13. {# Company slider card vars start #}
  14. {% set favoriteMarkings = -1 %}
  15. {# Use -1 for falsey #}
  16. {# Temporary for future work #}
  17. {% set reservePrice = -1 %}
  18. {# Use -1 for falsey #}
  19. {# Temporary for future work #}
  20. {% set isVendor = userType == 'seller' %}
  21. {# Company slider card vars end #}
  22. <article
  23.     id="product_card--{{productList.id}}"
  24.     class="product_card {{ productList.classList|join(' ') }} {% if isVendor %} product_card--is-vendor{% endif %} {{ classes }}"
  25.     {% for key, value in attributes %}
  26.     {{ key }}="{{ value }}"
  27.     {% endfor %}
  28. >
  29.     <div id="object_li_{{productList.id}}" class="isListing {{productList.ended or showClosed ? 'object-closed' : ''}} ">
  30.         <a href="{{ productURL }}" title="{{productList.name|escape('html')}}">
  31.             <div class="product_card__listing_img">
  32.                 <img data-src="{{productList.productImageURL}}" class="lazy" height="213" width="285" alt="{{productList.name|escape('html')}}">
  33.                 <noscript><img src="{{productList.productImageURL}}" alt="{{productList.name|escape('html')}}"></noscript>
  34.                 {% block imageOverlay %}
  35.                     {% if not productList.ended and showFavorite and not isVendor %}
  36.                         <span class="product_card__mark-fav addFav_{{ productList.id }} {{productList.isFavorite ? 'active' : ''}}" data-name="{{ productList.name|escape('html') }}" data-prod-id="{{ productList.id|escape('html') }}" {{buyerLoggedIn ? "" : " data-no-session "}}>
  37.                             <span></span>
  38.                         </span>
  39.                     {% endif %}
  40.                     {% if isVendor and favoriteMarkings >= 0 %}
  41.                         <span class="product_card__mark-fav">
  42.                             <span></span>
  43.                             {{ favoriteMarkings }}
  44.                         </span>
  45.                     {% endif %}
  46.                     {% if productList.categoryId is same as restCategoryId and not productList.ended and not showVendorSoldTag %}
  47.                         <div class="product_card__tag product_card__tag--success-dark product_card__tag--top-left">
  48.                             {{ 'text_label_tag-inventory'|trans }}
  49.                         </div>
  50.                     {% endif %}
  51.                     {% if showVendorSoldTag %}
  52.                         <div class="product_card__tag product_card__tag--danger product_card__tag--top-right">
  53.                             {{ 'text_label_tag-sold'|trans }}
  54.                         </div>
  55.                     {% endif %}
  56.                     <div class="product_card__ended-tag product_card__tag product_card__tag--info product_card__tag--top-right">
  57.                         {{ 'text_label_tag-ended'|trans }}
  58.                     </div>
  59.                     <div class="product_card__no-reserve-tag product_card__tag product_card__tag--success product_card__tag--top-left">
  60.                         {{ 'text_label_page-list-partials_no_reserve'|trans }}
  61.                     </div>
  62.                     <div class="product_card__reserve-reached-tag product_card__tag product_card__tag--success product_card__tag--top-left">
  63.                         {{ 'text_label_page-list-partials_reserve_reached'|trans }}
  64.                     </div>
  65.                     {% if productList.isBankruptcy %}
  66.                         <div class="product_card__tag product_card__tag--warning product_card__tag--top-left">
  67.                             {{ 'text_label_tag-bankruptcy'|trans }}
  68.                         </div>
  69.                     {% endif %}
  70.                     <div id="timeleft_{{productList.id}}" class="product_card__tag product_card__tag--bottom-left">
  71.                         {{productList.auctionend|timeLeft|raw}}
  72.                     </div>
  73.                 {% endblock %}
  74.             </div>
  75.             <div class="product_card__info">
  76.                 {% block body %}
  77.                     <div class="product_card__info-box">
  78.                         <p class="product_card__title">
  79.                             {{productList.name}}
  80.                         </p>
  81.                     </div>
  82.                     {% if reservePrice >= 0 %}
  83.                         <div class="product_card__reserve-price">
  84.                             {{ 'text_res-price_vendor-slider-item'|trans({'state' : 'currency', 'res_price' : reservePrice })|raw }}
  85.                         </div>
  86.                     {% endif %}
  87.                     <div class="product_card__info-box">
  88.                         <img class="reserve-price__custom-icon" src="/images/icon-map-pin-small-xdark-green.svg" alt="{{ 'text_label_icon-location'|trans }}">
  89.                         <p class="product_card__info-text">{{productList.municipalityName|default('&nbsp;')|raw}}</p>
  90.                     </div>
  91.                 {% endblock %}
  92.                 <div class="product_card__divider"></div>
  93.                 <div class="product_card__info-box product_card__info-box--apart">
  94.                     {% block currentBid %}
  95.                         <p class="product_card__current-bid notranslate" id="bid_{{ productList.id }}">{{ 'text_label_page-list_bid_no-bid-or-formatted'|trans({'%bid%': productList.maxBid}) }}</p>
  96.                     {% endblock %}
  97.                     {% block currentNbrBids %}
  98.                     <div class="product_card__no-of-bids">
  99.                         <img class="reserve-price__custom-icon" src="/images/icons/icn-bid.svg" alt="{{ 'text_label_icon-bids'|trans }}">
  100.                         <p id="antbids_{{ productList.id }}">{{productList.numBids}}</p>
  101.                     </div>
  102.                     {% endblock %}
  103.                 </div>
  104.             </div>
  105.         </a>
  106.     </div>
  107. </article>