{% extends "templates/lilcity/index.html" %} {% load static %} {% load data_liked from data_liked %} {% load rupluralize from plural %} {% block title %}{{ course.title }} - {{ block.super }}{% endblock title %} {% comment %} seo tags {% endcomment %} {% block description %}{{ course.short_description | striptags }}{% endblock description%} {% block twurl %}{{ request.build_absolute_uri }}{% endblock twurl %} {% block ogtitle %}{{ course.title }} - {{ block.super }}{% endblock ogtitle %} {% block ogurl %}{{ request.build_absolute_uri }}{% endblock ogurl %} {% block ogimage %} http://{{request.META.HTTP_HOST}}{% if course.cover and course.cover.image %}{{ course.cover.image.url }}{% else %}{% static 'img/og_courses.jpg' %}{% endif %} {% endblock ogimage %} {% block ogimage-width %} {% if course.cover and course.cover.image %}{{ course.cover.image.width }}{% else %}1024{% endif %} {% endblock ogimage-width %} {% block ogimage-height %} {% if course.cover and course.cover.image %}{{ course.cover.image.height }}{% else %}512{% endif %} {% endblock ogimage-height %} {% block ogdescription %}{{ course.short_description | striptags }}{% endblock ogdescription %} {% block content %}
{{ course.category.title | upper }}
{% data_liked user course as liked %}
{{ course.title }}
{{ course.short_description | safe | linebreaks }}
{% if course.author.photo %}
{% else %}
{% endif %}
{{ course.author.get_full_name }}
{% if course.price %} {% if paid %}
{{ access_duration | rupluralize:"день,дня,дней" }}
{% else %}
{{ course.access_duration | rupluralize:"день,дня,дней" }}
{% endif %}
{% if can_buy_again %} {{ course.price|floatformat:"-2" }}₽ {% else %} {% if course.old_price %}{{ course.old_price|floatformat:"-2" }}₽{% endif %} {% endif %} {{ course_price|floatformat:"-2" }}₽
{% endif %}
{{ course.lessons.count | rupluralize:"урок,урока,уроков" }}
{% if not request.user_agent.is_mobile %}
{{ course.count_videos_in_lessons }} видео
{% endif %}
Описание курса {% if request.user.is_authenticated %} {% if course.author == request.user and request.user.role >= request.user.AUTHOR_ROLE %} УРОКИ {% elif request.user.role == request.user.ADMIN_ROLE %} УРОКИ {% else %} УРОКИ {% if not paid and course.price %} {% endif %} {% endif %} {% else %} УРОКИ {% endif %}
{% if course.cover %} {% else %} {% endif %} {% if course.is_deferred_start %}
Курс начнется:
{{ course.deferred_start_at_humanize }}
{% else %} {% comment %} {% endcomment %} {% endif %}
{% include 'templates/blocks/share.html' %}
{% if course.from_author %}
От автора
{% if course.author.photo %}
{% else %}
{% endif %}
Привет всем!
{{ course.from_author }}
{{ course.author.get_full_name }}
{% endif %}
{% for content in course.content.all %} {% with template="content/blocks/"|add:content.ctype|add:".html" %} {% include template %} {% endwith %} {% endfor %} {% if False %}
{% include "course/content/gallery.html" with results=True %}
{% endif %}
ПЕРСОНАЖИ
{{ course.title }}
{{ course.short_description | safe | linebreaks }}
{% if course.author.photo %}
{% else %}
{% endif %}
{{ course.author.get_full_name }}
{% if course.price %} {% if paid %}
{{ access_duration | rupluralize:"день,дня,дней" }}
{% else %}
{{ course.access_duration | rupluralize:"день,дня,дней" }}
{% endif %}
{% if can_buy_again %} {{ course.price|floatformat:"-2" }}₽ {% else %} {% if course.old_price %}{{ course.old_price|floatformat:"-2" }}₽{% endif %} {% endif %} {{ course_price|floatformat:"-2" }}₽
{% endif %}
{% if not is_owner and course.price %} {% if not paid or can_buy_again %}
{% if pending %}ОЖИДАЕТСЯ ПОДТВЕРЖДЕНИЕ ОПЛАТЫ{% else %} {% if paid and can_buy_again %}ПРОДЛИТЬ ДОСТУП{% else %}КУПИТЬ КУРС{% endif %} {% endif %} {% if not paid %} Подарить другу {% endif %}
{% endif %} {% endif %}
{% if request.user.is_authenticated %}Задавайте вопросы:{% else %}Комментарии:{% endif %}
{% include 'templates/blocks/share.html' %}
{% endblock content %} {% block foot %} {% include "templates/blocks/popup_course_buy.html" %} {% endblock foot %}