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.
34 lines
1.4 KiB
34 lines
1.4 KiB
{% load thumbnail %}
|
|
{% load static %}
|
|
{% load data_liked from data_liked %}
|
|
|
|
<div class="gift-certificates__item">
|
|
<div class="gift-certificates__preview {{ theme_color }}"></div>
|
|
<div class="gift-certificates__details">
|
|
<span class="gift-certificates__title theme {{ theme_color }}">
|
|
{% if user_gift_certificate and not user_gift_certificate.bonuses_sent %}
|
|
<a href="{% url 'gift-certificate-get' user_gift_certificate.code %}">подарочный сертификат</a>
|
|
{% else %}подарочный сертификат{% endif %}</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' %}" />
|
|
Ожидает получения
|
|
</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>
|
|
|