diff --git a/course-v2/layouts/index.coursedata.json b/course-v2/layouts/index.coursedata.json index 247b43c01..ff95be80d 100644 --- a/course-v2/layouts/index.coursedata.json +++ b/course-v2/layouts/index.coursedata.json @@ -13,7 +13,7 @@ "instructors": [ {{- range $index, $instructor := $instructors -}} {{- if $index -}} - , + , {{- end -}} { "first_name": {{- $instructor.first_name | jsonify -}}, @@ -34,6 +34,7 @@ "term": {{- $courseData.term | jsonify -}}, "year": {{- $courseData.year | jsonify -}}, "level": {{- $courseData.level | jsonify -}}, + "hide_download": {{- $courseData.hide_download | jsonify -}}, "image_src": {{- $courseImageUrl | jsonify -}}, "course_image_metadata": {{- $courseImageMetadata.Params | jsonify -}} } diff --git a/test-sites/__fixtures__/courses/ocw-ci-test-course/data.json b/test-sites/__fixtures__/courses/ocw-ci-test-course/data.json index 712bc9e59..20c162358 100644 --- a/test-sites/__fixtures__/courses/ocw-ci-test-course/data.json +++ b/test-sites/__fixtures__/courses/ocw-ci-test-course/data.json @@ -56,6 +56,7 @@ "Graduate", "Undergraduate" ], + "hide_download": false, "image_src": "/courses/ocw-ci-test-course/example_jpg.jpg", "course_image_metadata": { "body": "", @@ -88,4 +89,4 @@ "youtube_id": "" } } -} \ No newline at end of file +} diff --git a/www/assets/js/LearningResources.ts b/www/assets/js/LearningResources.ts index b6786bf9d..f0086159f 100644 --- a/www/assets/js/LearningResources.ts +++ b/www/assets/js/LearningResources.ts @@ -81,6 +81,7 @@ export interface CourseJSON { term: string year: string level: Level[] | null + hide_download: boolean image_src: string course_image_metadata: CourseImageMetadata } diff --git a/www/assets/js/factories/search.ts b/www/assets/js/factories/search.ts index e14d3dbf7..08cfc3d80 100644 --- a/www/assets/js/factories/search.ts +++ b/www/assets/js/factories/search.ts @@ -191,6 +191,7 @@ export const makeCourseJSON = (): CourseJSON => ({ department_numbers: [casual.word, casual.word], learning_resource_types: [casual.word, casual.word], year: String(casual.year), + hide_download: casual.boolean, course_image_metadata: { file: casual.string, image_metadata: {