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

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

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

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

@ -21,7 +21,7 @@
</div>
</div>
<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 }">
<div class="field__label">{{titles.courseTitle}}</div>
<div class="field__wrap">
@ -1187,5 +1187,10 @@
.course-redactor__preview-button {
transition: backgroundColor 0.5s ease-in-out;
}
.field_text {
height: 270px;
overflow: scroll;
}
</style>

Loading…
Cancel
Save