You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.3 KiB
35 lines
1.3 KiB
{% load thumbnail %}
|
|
{% load static %}
|
|
{% load data_liked from data_liked %}
|
|
|
|
<div class="gift-certificates__item">
|
|
<div class="gift-certificates__preview {{ theme_color }}">
|
|
<img class="gift-certificates__cover" src="{{ gift_certificate.cover }}" />
|
|
</div>
|
|
<div class="gift-certificates__details">
|
|
<span class="gift-certificates__title theme {{ theme_color }}">
|
|
Подарочный сертификат
|
|
</span>
|
|
<div class="gift-certificates__price">{{ gift_certificate.price|floatformat:"-2" }}₽</div>
|
|
</div>
|
|
{% if user_gift_certificate %}
|
|
{% if user_gift_certificate.bonuses_sent %}
|
|
<div class="gift-certificates__status">
|
|
<img class="icon" src="{% static 'img/done.png' %}" />
|
|
Получено
|
|
</div>
|
|
{% else %}
|
|
<div class="gift-certificates__status">
|
|
<img class="icon" style="margin-top: -1px; height: auto;" src="{% static 'img/clock.png' %}" />
|
|
Ожидает получения | Код <span style="text-transform: none">{{ user_gift_certificate.code }}</span>
|
|
</div>
|
|
{% endif %}
|
|
{% else %}
|
|
<a class="gift-certificates__buy-btn btn"
|
|
{% if request.user.is_authenticated %}
|
|
href="{% url 'gift-certificate-checkout' gift_certificate.id %}"
|
|
{% else %}
|
|
href="#" data-popup=".js-popup-auth"
|
|
{% endif %}>Купить сертификат</a>
|
|
{% endif %}
|
|
</div>
|
|
|