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.
 
 
 
 
 
 

145 lines
6.5 KiB

{% extends "templates/lilcity/index.html" %} {% load static %} {% load thumbnail %} {% block content %}
<div class="section">
<div class="section__center center">
<div class="profile">
<div class="profile__btns">
<a class="profile__btn profile__btn_edit btn" href="{% url 'user-edit-profile' %}">Редактировать</a>
<a data-popup=".js-popup-enter-gift-code" href="#" class="profile__btn btn btn_stroke-black">Ввести код</a>
</div>
<div class="profile__ava ava">
{% thumbnail user.photo "120x120" crop="center" as im %}
<img class="ava__pic" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />
{% empty %}
<img class="ava__pic" src="{% static 'img/user_default.jpg' %}" width="120px" height="120px" />
{% endthumbnail %}
</div>
<div class="profile__wrap">
<div class="profile__name">{{ user.get_full_name }}</div>
<div class="profile__share share share_sm">
<div class="share__list">
{% if user.facebook %}
<a class="share__item" href="{{ user.facebook }}">
<svg class="icon icon-share-facebook">
<use xlink:href="{% static 'img/sprite.svg' %}#icon-share-facebook"></use>
</svg>
</a>
{% endif %} {% if user.instagram %}
<a class="share__item" href="{{ user.instagram }}">
<svg class="icon icon-share-instagram">
<use xlink:href="{% static 'img/sprite.svg' %}#icon-share-instagram"></use>
</svg>
</a>
{% endif %} {% if user.twitter %}
<a class="share__item" href="{{ user.twitter }}">
<svg class="icon icon-share-twitter">
<use xlink:href="{% static 'img/sprite.svg' %}#icon-share-twitter"></use>
</svg>
</a>
{% endif %} {% if user.google %}
<a class="share__item" href="{{ user.google }}">
<svg class="icon icon-share-google">
<use xlink:href="{% static 'img/sprite.svg' %}#icon-share-google"></use>
</svg>
</a>
{% endif %} {% if user.pinterest %}
<a class="share__item" href="{{ user.pinterest }}">
<svg class="icon icon-share-pinterest">
<use xlink:href="{% static 'img/sprite.svg' %}#icon-share-pinterest"></use>
</svg>
</a>
{% endif %}
</div>
</div>
</div>
<div class="profile__content">
{% if user.about %}
{{ user.about }}
{% endif %}
</div>
<div class="profile__foot">
<a class="profile__btn btn" href="{% url 'user-edit-profile' %}">Изменить</a>
</div>
</div>
</div>
</div>
<div class="section section_pink-light section_tabs">
<div class="section__center center">
<div class="tabs js-tabs">
<div class="tabs__nav">
<button class="tabs__btn js-tabs-btn active">МОИ ПОКУПКИ</button>
{% if is_author %}
<button class="tabs__btn js-tabs-btn">ОПУБЛИКОВАННЫЕ
<span class="mobile-hide">КУРСЫ</span>
</button>
{% endif %}
</div>
<div class="tabs__container">
<div class="tabs__item js-tabs-item" style="display: block;">
<div class="courses">
<div class="courses__list">
{% if is_school_purchased %}
<div class="courses__item">
<a class="courses__preview" href="{% url 'school:school' %}">
<img class="courses__pic" src="{% static 'img/og_main.jpg' %}"
style="height: 200px; object-fit: cover;" />
<div class="courses__view">Подробнее</div>
</a>
<div class="courses__details">
<a class="courses__theme theme">{{ school_purchased_weekdays }}</a>
<div class="courses__price">{{ school_purchased_price|floatformat:"-2" }}₽</div>
</div>
<a class="courses__title">Онлайн-школа&nbsp;{{ school_purchased_dates.0|date:"j b" }}&nbsp;-&nbsp;{{ school_purchased_dates.1|date:"j b" }}</a>
<a class="btn" href="{% url 'school:school' %}">Перейти в онлайн-школу</a>
</div>
{% endif %}
{% if user_gift_certificates.exists %}
{% for ugs in user_gift_certificates %}
{% cycle 'theme_pink2' 'theme_cyan' 'theme_violet2' as theme_color silent %}
{% include "payment/gift_certificate_item.html" with gift_certificate=ugs.gift_certificate user_gift_certificate=ugs %}
{% endfor %}
{% endif %}
{% if paid.exists %}
{% include "course/course_items.html" with course_items=paid %}
{% endif %}
{% if not is_school_purchased and not paid.exists and not user_gift_certificates.exists %}
<div class="center center_xs">
<div class="done">
<div class="done__title">Вы пока ничего не приобрели...</div>
<div class="done__foot">
<a class="done__btn btn btn_md btn_stroke" href="{% url 'school:school' %}"
style="margin-bottom: 20px;">Записаться в школу</a>
<a class="done__btn btn btn_md btn_stroke" href="{% url 'courses' %}">Купить курсы</a>
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
{% if is_author %}
<div class="tabs__item js-tabs-item">
<div class="courses">
<div class="courses__list">
{% if published.exists %}
{% include "course/course_items.html" with course_items=published %}
{% else %}
<div class="center center_xs">
<div class="done">
<div class="done__title title">Нет опубликованных курсов!</div>
<div class="done__foot">
<a class="done__btn btn btn_md btn_stroke" href="{% url 'course_create' %}">Добавить курс</a>
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock content %}