mitodl / ocw-hugo-themes

A Hugo theme for building OCW websites
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

Allow hiding course download button #1194

Closed pt2302 closed 1 year ago

pt2302 commented 1 year ago

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/1751.

Description (What does it do?)

If the Hide Course Download setting is set to true in the course metadata, this hides the link to the download page and the button to actually download the course.

How can this be tested?

Run yarn start course <course-id> for any course. Navigate to the course's local markdown, and modify the data/course.json file to have a field with the value "hide_download": true. Verify that there is no course download button at localhost:3000/download and that the link to the download page does not appear. Change "hide_download": false, and verify that the course download button appears. Now, delete the field entirely, and verify that the button appears and that everything else works as expected.

github-actions[bot] commented 1 year ago

Netlify Deployments:
www: https://ocw-hugo-themes-www-pr-1194--ocw-next.netlify.app/
Course v2: https://ocw-hugo-themes-course-v2-pr-1194--ocw-next.netlify.app/