Commit c9319823 by David Baumgold

Pass PDF textbooks to template separately

parent 06f40019
......@@ -674,7 +674,7 @@ def textbooks_list_handler(request, tag=None, course_id=None, branch=None, versi
textbook_url = locator.url_reverse('/textbooks')
return render_to_response('textbooks.html', {
'context_course': course,
'course': course,
'textbooks': course.pdf_textbooks,
'upload_asset_url': upload_asset_url,
'textbook_url': textbook_url,
})
......
......@@ -23,7 +23,7 @@ CMS.URL.TEXTBOOKS = "${textbook_url}"
CMS.URL.LMS_BASE = "${settings.LMS_BASE}"
require(["js/models/section", "js/collections/textbook", "js/views/list_textbooks"],
function(Section, TextbookCollection, ListTextbooksView) {
var textbooks = new TextbookCollection(${json.dumps(course.pdf_textbooks)}, {parse: true});
var textbooks = new TextbookCollection(${json.dumps(textbooks)}, {parse: true});
var tbView = new ListTextbooksView({collection: textbooks});
$(function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment