diff --git a/apps/course/templates/course/course_edit.html b/apps/course/templates/course/course_edit.html
index d1b36e89..8b4bbebf 100644
--- a/apps/course/templates/course/course_edit.html
+++ b/apps/course/templates/course/course_edit.html
@@ -1,24 +1,12 @@
{% extends "templates/lilcity/index.html" %}
{% load static %}
{% block content %}
-
-
-
- {{course}}
- {{course.id}}
-
-
-{% endblock content %}
\ No newline at end of file
+
+{% endblock content %}
+{% block foot %}
+
+
+{% endblock foot %}
\ No newline at end of file
diff --git a/web/src/components/CourseRedactor.vue b/web/src/components/CourseRedactor.vue
index bca9eac5..119c35f5 100644
--- a/web/src/components/CourseRedactor.vue
+++ b/web/src/components/CourseRedactor.vue
@@ -217,7 +217,11 @@
@@ -242,20 +246,20 @@
return {
viewSection: 'course',
course: {
- title: 'Как просто научиться рисовать простых персонажей.',
- category: 9,
+ title: '',
+ category: null,
categorySelect: null,
duration: 1,
- price: 1000,
+ price: 0,
url: '',
coverImage: '',
coverImageId: null,
- is_paid: true,
+ is_paid: false,
is_featured: true,
is_deferred: false,
- date: '2018-03-08',
+ date: '',
time: null,
- short_description: 'Этот курс поможет детям освоить базовые навыки рисования простых персонажей',
+ short_description: '',
content: [],
gallery: {
images: [],
@@ -427,6 +431,17 @@
this.courseLoading = false;
console.log('error course loading', err);
});
+ },
+ loadLessons(courseId) {
+ api.getCourseLessons(courseId, this.accessToken)
+ .then((response) => {
+ this.lessons = response.data.results.map((lessonJson) => {
+ return api.convertLessonJson(lessonJson);
+ });
+ })
+ .catch((err) => {
+ console.log('error course loading', err);
+ });
}
},
mounted() {
@@ -445,6 +460,7 @@
if (this.courseId) {
this.loadCourse(this.courseId);
+ this.loadLessons(this.courseId);
}
},
computed: {
diff --git a/web/src/components/blocks/BlockAdd.vue b/web/src/components/blocks/BlockAdd.vue
index 14febfd1..7c06a641 100644
--- a/web/src/components/blocks/BlockAdd.vue
+++ b/web/src/components/blocks/BlockAdd.vue
@@ -67,8 +67,8 @@
this.add({
type: 'text',
data: {
- title: 'тест заголовок',
- text: 'текст',
+ title: '',
+ text: '',
}
})
},
@@ -76,7 +76,7 @@
this.add({
type: 'image',
data: {
- title: 'тест картинка',
+ title: '',
image_id: null,
image_url: null,
}
@@ -86,8 +86,8 @@
this.add({
type: 'image-text',
data: {
- title: 'тест картинка-текст',
- text: 'текст какой-то',
+ title: '',
+ text: '',
image_id: null,
image_url: null,
}
@@ -97,8 +97,8 @@
this.add({
type: 'images',
data: {
- title: 'тест заголовок картинок',
- text: 'описание блока галереи',
+ title: '',
+ text: '',
images: [],
}
})
@@ -107,8 +107,8 @@
this.add({
type: 'video',
data: {
- title: 'тест видео',
- video_url: 'http://vimeo.com/safmklsamfk',
+ title: '',
+ video_url: '',
}
})
},
diff --git a/web/src/js/modules/api.js b/web/src/js/modules/api.js
index 392bcd1c..2a2c256a 100644
--- a/web/src/js/modules/api.js
+++ b/web/src/js/modules/api.js
@@ -216,7 +216,7 @@ export const api = {
short_description: courseJSON.short_description,
category: courseJSON.category.id ? courseJSON.category.id : courseJSON.category,
price: parseFloat(courseJSON.price),
- is_paid: parseFloat(courseJSON.price) === 0,
+ is_paid: parseFloat(courseJSON.price) > 0,
is_deferred: isDeferred,
date: deferredDate,
time: deferredTime ? {title: deferredTime, value: deferredTime} : null,