Merge branch 'dev' into 'master'

Dev

See merge request lilcity/backend!34
remotes/origin/hasaccess
cfwme 8 years ago
commit b2d14f727e
  1. 24
      apps/course/templates/course/course.html
  2. 2
      apps/course/templates/course/lesson.html
  3. 5
      apps/course/views.py
  4. 2
      apps/school/templates/school/livelesson_detail.html
  5. 7
      web/src/components/CourseRedactor.vue

@ -176,7 +176,7 @@
{% if course.cover %} {% if course.cover %}
<img class="video__pic" src="{{ course.cover.image.url }}"/> <img class="video__pic" src="{{ course.cover.image.url }}"/>
{% else %} {% else %}
<img class="video__pic" src="{% static 'img/no_cover.png' %}"/>
{% endif %} {% endif %}
{% if course.is_deferred_start %} {% if course.is_deferred_start %}
<div class="video__soon"> <div class="video__soon">
@ -370,17 +370,17 @@
{% endif %} {% endif %}
</div> </div>
{% if course.author != request.user and not paid and course.price %} {% if course.author != request.user and not paid and course.price %}
<a <a
class="go__btn btn{% if pending %} btn_gray{% endif %} btn_md" class="go__btn btn{% if pending %} btn_gray{% endif %} btn_md"
{% if user.is_authenticated %} {% if user.is_authenticated %}
{% if not pending %} {% if not pending %}
data-course-buy data-course-buy
href="{% url 'course-checkout' course.id %}" href="{% url 'course-checkout' course.id %}"
{% endif %} {% endif %}
{% else %} {% else %}
data-popup=".js-popup-auth" data-popup=".js-popup-auth"
{% endif %} {% endif %}
>{% if pending %}ОЖИДАЕТСЯ ПОДТВЕРЖДЕНИЕ ОПЛАТЫ{% else %}КУПИТЬ КУРС{% endif %}</a> >{% if pending %}ОЖИДАЕТСЯ ПОДТВЕРЖДЕНИЕ ОПЛАТЫ{% else %}КУПИТЬ КУРС{% endif %}</a>
{% endif %} {% endif %}
</div> </div>
</div> </div>

@ -32,7 +32,7 @@
{% if lesson.cover %} {% if lesson.cover %}
<img class="video__pic" src="{{ lesson.cover.image.url }}"/> <img class="video__pic" src="{{ lesson.cover.image.url }}"/>
{% else %} {% else %}
<img class="video__pic" src="{% static 'img/no_cover.png' %}"/>
{% endif %} {% endif %}
<svg class="icon icon-play"> <svg class="icon icon-play">
<use xlink:href="{% static 'img/sprite.svg' %}#icon-play"></use> <use xlink:href="{% static 'img/sprite.svg' %}#icon-play"></use>

@ -167,8 +167,9 @@ class CourseEditView(TemplateView):
self.object = Course.objects.create( self.object = Course.objects.create(
author=request.user, author=request.user,
) )
if (request.user != self.object.author and request.user.role < User.AUTHOR_ROLE) or request.user.role != User.ADMIN_ROLE: #TODO
raise Http404 #if (request.user != self.object.author and request.user.role < User.AUTHOR_ROLE) or request.user.role != User.ADMIN_ROLE:
# raise Http404
return super().get(request) return super().get(request)
def get_context_data(self): def get_context_data(self):

@ -19,7 +19,7 @@
{% if livelesson.cover %} {% if livelesson.cover %}
<img class="video__pic" src="{{ livelesson.cover.image.url }}"/> <img class="video__pic" src="{{ livelesson.cover.image.url }}"/>
{% else %} {% else %}
<img class="video__pic" src="{% static 'img/no_cover.png' %}"/>
{% endif %} {% endif %}
{% endif %} {% endif %}
</a> </a>

@ -21,7 +21,7 @@
</div> </div>
</div> </div>
<div class="info__title"> <div class="info__title">
<div class="info__field field field_info" <div class="info__field field field_info field_text"
v-bind:class="{ error: ($v.course.title.$dirty || showErrors) && $v.course.title.$invalid }"> v-bind:class="{ error: ($v.course.title.$dirty || showErrors) && $v.course.title.$invalid }">
<div class="field__label">{{titles.courseTitle}}</div> <div class="field__label">{{titles.courseTitle}}</div>
<div class="field__wrap"> <div class="field__wrap">
@ -1187,5 +1187,10 @@
.course-redactor__preview-button { .course-redactor__preview-button {
transition: backgroundColor 0.5s ease-in-out; transition: backgroundColor 0.5s ease-in-out;
} }
.field_text {
height: 270px;
overflow: scroll;
}
</style> </style>

Loading…
Cancel
Save