From cc4e64a2a0e0280a7be904d5f41b9c5bf825bdb6 Mon Sep 17 00:00:00 2001 From: nikita Date: Fri, 25 May 2018 20:56:05 +0300 Subject: [PATCH 1/3] wrong perms fix --- apps/course/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/course/views.py b/apps/course/views.py index d55097f7..90957d68 100644 --- a/apps/course/views.py +++ b/apps/course/views.py @@ -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): From de8f6c9838e84e6e92ec6fd2ad64219368a74c1c Mon Sep 17 00:00:00 2001 From: nikita Date: Fri, 25 May 2018 21:00:46 +0300 Subject: [PATCH 2/3] No cover removed --- apps/course/templates/course/course.html | 24 +++++++++---------- apps/course/templates/course/lesson.html | 2 +- .../templates/school/livelesson_detail.html | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/course/templates/course/course.html b/apps/course/templates/course/course.html index 5df264bb..42d6198c 100644 --- a/apps/course/templates/course/course.html +++ b/apps/course/templates/course/course.html @@ -176,7 +176,7 @@ {% if course.cover %} {% else %} - + {% endif %} {% if course.is_deferred_start %}
@@ -370,17 +370,17 @@ {% endif %}
{% if course.author != request.user and not paid and course.price %} - {% if pending %}ОЖИДАЕТСЯ ПОДТВЕРЖДЕНИЕ ОПЛАТЫ{% else %}КУПИТЬ КУРС{% endif %} + {% if pending %}ОЖИДАЕТСЯ ПОДТВЕРЖДЕНИЕ ОПЛАТЫ{% else %}КУПИТЬ КУРС{% endif %} {% endif %} diff --git a/apps/course/templates/course/lesson.html b/apps/course/templates/course/lesson.html index 27afd008..6c9511ae 100644 --- a/apps/course/templates/course/lesson.html +++ b/apps/course/templates/course/lesson.html @@ -32,7 +32,7 @@ {% if lesson.cover %} {% else %} - + {% endif %} diff --git a/apps/school/templates/school/livelesson_detail.html b/apps/school/templates/school/livelesson_detail.html index b886dc4f..435651c8 100644 --- a/apps/school/templates/school/livelesson_detail.html +++ b/apps/school/templates/school/livelesson_detail.html @@ -19,7 +19,7 @@ {% if livelesson.cover %} {% else %} - + {% endif %} {% endif %} From 64cd4fa448738cca4a2d96df35984b8c08bd8a4c Mon Sep 17 00:00:00 2001 From: nikita Date: Fri, 25 May 2018 21:10:18 +0300 Subject: [PATCH 3/3] long text overflow fix --- web/src/components/CourseRedactor.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/components/CourseRedactor.vue b/web/src/components/CourseRedactor.vue index abf84283..15501dad 100644 --- a/web/src/components/CourseRedactor.vue +++ b/web/src/components/CourseRedactor.vue @@ -21,7 +21,7 @@
-
{{titles.courseTitle}}
@@ -1187,5 +1187,10 @@ .course-redactor__preview-button { transition: backgroundColor 0.5s ease-in-out; } + + .field_text { + height: 270px; + overflow: scroll; + }