|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
course__actions{% extends "templates/lilcity/index.html" %} |
|
|
|
|
{% extends "templates/lilcity/index.html" %} |
|
|
|
|
{% load static %} |
|
|
|
|
{% load data_liked from data_liked %} |
|
|
|
|
{% load rupluralize from plural %} |
|
|
|
|
@ -141,35 +141,43 @@ course__actions{% extends "templates/lilcity/index.html" %} |
|
|
|
|
<div class="course__actions"> |
|
|
|
|
<a href="{% url 'course' course.id %}" class="course__action btn btn_lg{% if not only_lessons %} btn_stroke{% else %} btn_gray{% endif %}">Описание курса</a> |
|
|
|
|
{% if request.user.is_authenticated %} |
|
|
|
|
{% if course.author == request.user and request.user.role >= request.user.AUTHOR_ROLE %} |
|
|
|
|
<a |
|
|
|
|
href="{% url 'course-only-lessons' course.id %}" |
|
|
|
|
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}" |
|
|
|
|
{% if not user.is_authenticated %}data-popup=".js-popup-auth"{% endif %} |
|
|
|
|
>УРОКИ |
|
|
|
|
</a> |
|
|
|
|
{% elif request.user.role == request.user.ADMIN_ROLE %} |
|
|
|
|
<a |
|
|
|
|
href="{% url 'course-only-lessons' course.id %}" |
|
|
|
|
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}" |
|
|
|
|
{% if not user.is_authenticated %}data-popup=".js-popup-auth"{% endif %} |
|
|
|
|
>УРОКИ |
|
|
|
|
</a> |
|
|
|
|
{% endif %} |
|
|
|
|
{% if course.author == request.user and request.user.role >= request.user.AUTHOR_ROLE %} |
|
|
|
|
<a |
|
|
|
|
href="{% url 'course-only-lessons' course.id %}" |
|
|
|
|
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}" |
|
|
|
|
{% if not user.is_authenticated %}data-popup=".js-popup-auth"{% endif %} |
|
|
|
|
>УРОКИ |
|
|
|
|
</a> |
|
|
|
|
{% elif request.user.role == request.user.ADMIN_ROLE %} |
|
|
|
|
<a |
|
|
|
|
href="{% url 'course-only-lessons' course.id %}" |
|
|
|
|
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}" |
|
|
|
|
{% if not user.is_authenticated %}data-popup=".js-popup-auth"{% endif %} |
|
|
|
|
>УРОКИ |
|
|
|
|
</a> |
|
|
|
|
{% else %} |
|
|
|
|
<a |
|
|
|
|
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}" |
|
|
|
|
{% if paid %} |
|
|
|
|
href="{% url 'course-only-lessons' course.id %}" |
|
|
|
|
{% else %} |
|
|
|
|
data-popup=".js-popup-course-lock" |
|
|
|
|
{% endif %} |
|
|
|
|
>УРОКИ |
|
|
|
|
{% if not paid %} |
|
|
|
|
<svg class="icon icon-lock"> |
|
|
|
|
<use xlink:href="{% static 'img/sprite.svg' %}#icon-lock"></use> |
|
|
|
|
</svg> |
|
|
|
|
{% endif %} |
|
|
|
|
</a> |
|
|
|
|
{% endif %} |
|
|
|
|
{% else %} |
|
|
|
|
<a |
|
|
|
|
class="course__action btn btn_lg{% if only_lessons %} btn_stroke{% else %} btn_gray{% endif %}" |
|
|
|
|
{% if paid %} |
|
|
|
|
href="{% url 'course-only-lessons' course.id %}" |
|
|
|
|
{% else %} |
|
|
|
|
data-popup="{% if not user.is_authenticated %}.js-popup-auth{% else %}.js-popup-course-lock{% endif %}" |
|
|
|
|
{% endif %} |
|
|
|
|
>УРОКИ |
|
|
|
|
{% if not paid %} |
|
|
|
|
data-popup=".js-popup-auth">УРОКИ |
|
|
|
|
<svg class="icon icon-lock"> |
|
|
|
|
<use xlink:href="{% static 'img/sprite.svg' %}#icon-lock"></use> |
|
|
|
|
</svg> |
|
|
|
|
{% endif %} |
|
|
|
|
</a> |
|
|
|
|
{% endif %} |
|
|
|
|
</div> |
|
|
|
|
|