Add prolong button template

remotes/origin/hasaccess
Ivlev Denis 8 years ago
parent 360598a402
commit 8d89b56641
  1. 9
      apps/school/templates/blocks/prolong_btn.html
  2. 21
      apps/school/templates/blocks/schedule_purchased.html

@ -0,0 +1,9 @@
<a
{% if not user.is_authenticated %}
data-popup=".js-popup-auth"
{% else %}
data-popup=".js-popup-buy"
{% endif %}
class="casing__btn btn{% if pink %} btn_pink{% endif %}"
href="#"
>продлить</a>

@ -8,14 +8,12 @@
<div class="casing__msg">Подписка истекает
<span class="bold">{{ subscription_ends }}</span>
</div>
<a {% if not user.is_authenticated %} data-popup=".js-popup-auth" {% else %} data-popup=".js-popup-buy" {% endif %} class="casing__btn btn"
href="#">продлить</a>
{% include './prolong_btn.html' %}
{% else %}
<div class="casing__msg">Подписка
<span class="bold">истекла</span>
</div>
<a {% if not user.is_authenticated %} data-popup=".js-popup-auth" {% else %} data-popup=".js-popup-buy" {% endif %} class="casing__btn btn btn_pink"
href="#">продлить</a>
{% include './prolong_btn.html' with pink=True %}
{% endif %}
</div>
</div>
@ -32,7 +30,8 @@
</div>
<div class="casing__timing timing js-timing">
<div class="timing__week">
{% for school_schedule in school_schedules %} {% with current_live_lesson=school_schedule.current_live_lesson %}
{% for school_schedule in school_schedules %}
{% with current_live_lesson=school_schedule.current_live_lesson %}
<div class="timing__item{% if not current_live_lesson %} timing__item_bg{% endif %} js-timing-item">
<div class="timing__cell">
{% if school_schedule.is_purchased %}
@ -57,8 +56,10 @@
<div class="timing__cell">
<div class="timing__preview">
{% thumbnail current_live_lesson.cover.image "70x70" crop="center" as im %}
<img class="timing__pic" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" /> {% empty %}
<img class="timing__pic" src="{% static 'img/no_cover.png' %}" width="70px" height="70px" /> {% endthumbnail %}
<img class="timing__pic" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />
{% empty %}
<img class="timing__pic" src="{% static 'img/no_cover.png' %}" width="70px" height="70px" />
{% endthumbnail %}
</div>
</div>
<div class="timing__cell">
@ -89,7 +90,8 @@
{% for image in school_schedule.schoolschedule_images.all %}
<a class="timing__work" href="#">
{% thumbnail image.img.image "48x48" crop="center" as im %}
<img class="timing__pic" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" /> {% endthumbnail %}
<img class="timing__pic" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />
{% endthumbnail %}
</a>
{% endfor %}
</div>
@ -104,7 +106,8 @@
</button>
</div>
</div>
{% endwith %} {% endfor %}
{% endwith %}
{% endfor %}
</div>
<div class="timing__foot">
{% include './pay_btn.html' %}

Loading…
Cancel
Save