templates/public/product/list_product_box.html.twig line 1

Open in your IDE?
  1. {% set productURL = path('app.legacy.auction.object', {'produrlname': productList.urlname}) %}
  2. {# Company slider card vars start #}
  3. {% set favoriteMarkings = -1 %}
  4. {# Use -1 for falsey #}
  5. {# Temporary for future work #}
  6. {% set reservePrice = -1 %}
  7. {# Use -1 for falsey #}
  8. {# Temporary for future work #}
  9. {% set isVendor = userType == 'seller' %}
  10. {# Company slider card vars end #}
  11. <article id="product_card--{{productList.id}}" class="product_card {{ productList.classList|join(' ') }}{% if isVendor %} product_card--is-vendor{% endif %}">
  12. <div id="object_li_{{productList.id}} " class="isListing {{productList.ended or showClosed ? 'object-closed' : ''}} ">
  13.     <a href="{{ productURL }}" title="{{productList.name}}">
  14.         <div class="product_card__listing_img">
  15.             <img data-src="{{productList.productImageURL}}" class="lazy" height="213" width="285" alt="{{productList.name}}">
  16.             {% if not productList.ended and showFavorite and not isVendor %}
  17.                 <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 "}}>
  18.                     <span></span>
  19.                 </span>
  20.             {% endif %}
  21.             {% if isVendor and favoriteMarkings >= 0 %}
  22.                 <span class="product_card__mark-fav">
  23.                     <span></span>
  24.                     {{ favoriteMarkings }}
  25.                 </span>
  26.             {% endif %}
  27.             <noscript><img src="{{productList.productImageURL}}" alt="{{productList.name}}"></noscript>
  28.             {% if productList.categoryId is same as restCategoryId and not productList.ended and not showVendorSoldTag %}
  29.                 <div class="product_card__tag product_card__tag--success-dark product_card__tag--top-left">
  30.                     {{ 'text_label_tag-inventory'|trans }}
  31.                 </div>
  32.             {% endif %}
  33.             {% if showVendorSoldTag %}
  34.                 <div class="product_card__tag product_card__tag--danger product_card__tag--top-right">
  35.                     {{ 'text_label_tag-sold'|trans }}
  36.                 </div>
  37.             {% endif %}
  38.             <div class="product_card__ended-tag product_card__tag product_card__tag--info product_card__tag--top-right">
  39.                 {{ 'text_label_tag-ended'|trans }}
  40.             </div>
  41.             <div class="product_card__no-reserve-tag product_card__tag product_card__tag--success product_card__tag--top-left">
  42.                 {{ 'text_label_page-list-partials_no_reserve'|trans }}
  43.             </div>
  44.             <div class="product_card__reserve-reached-tag product_card__tag product_card__tag--success product_card__tag--top-left">
  45.                 {{ 'text_label_page-list-partials_reserve_reached'|trans }}
  46.             </div>
  47.             {% if productList.isBankruptcy %}
  48.                 <div class="product_card__tag product_card__tag--warning product_card__tag--top-left">
  49.                     {{ 'text_label_tag-bankruptcy'|trans }}
  50.                 </div>
  51.             {% endif %}
  52.             <div id="timeleft_{{productList.id}}" class="product_card__tag product_card__tag--bottom-left">
  53.                 {{productList.auctionend|timeLeft|raw}}
  54.             </div>
  55.         </div>
  56.         <div class="product_card__info">
  57.             <div class="product_card__info-box">
  58.                 <p class="product_card__title">
  59.                     {{productList.name}}
  60.                 </p>
  61.             </div>
  62.             {% if reservePrice >= 0 %}
  63.                 <div class="product_card__reserve-price">
  64.                     {{ 'text_res-price_vendor-slider-item'|trans({'state' : 'currency', 'res_price' : reservePrice })|raw }}
  65.                 </div>
  66.             {% endif %}
  67.             <div class="product_card__info-box">
  68.                 <img class="reserve-price__custom-icon" src="/images/icon-map-pin-small-xdark-green.svg" alt="{{ 'text_label_icon-location'|trans }}">
  69.                 <p class="product_card__info-text">{{productList.municipalityName|default('&nbsp;')|raw}}</p>
  70.             </div>
  71.             <div class="product_card__divider"></div>
  72.             <div class="product_card__info-box product_card__info-box--apart">
  73.                 <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>
  74.                 <div class="product_card__no-of-bids">
  75.                     <img class="reserve-price__custom-icon" src="/images/icons/icn-bid.svg" alt="{{ 'text_label_icon-bids'|trans }}">
  76.                     <p id="antbids_{{productList.id}}">{{productList.numBids}}</p>
  77.                 </div>
  78.             </div>
  79.         </div>
  80.     </a>
  81. </div>
  82. </article>