Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
c9319823
Commit
c9319823
authored
Dec 05, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass PDF textbooks to template separately
parent
06f40019
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
cms/djangoapps/contentstore/views/course.py
+1
-1
cms/templates/textbooks.html
+1
-1
No files found.
cms/djangoapps/contentstore/views/course.py
View file @
c9319823
...
@@ -674,7 +674,7 @@ def textbooks_list_handler(request, tag=None, course_id=None, branch=None, versi
...
@@ -674,7 +674,7 @@ def textbooks_list_handler(request, tag=None, course_id=None, branch=None, versi
textbook_url
=
locator
.
url_reverse
(
'/textbooks'
)
textbook_url
=
locator
.
url_reverse
(
'/textbooks'
)
return
render_to_response
(
'textbooks.html'
,
{
return
render_to_response
(
'textbooks.html'
,
{
'context_course'
:
course
,
'context_course'
:
course
,
'
course'
:
course
,
'
textbooks'
:
course
.
pdf_textbooks
,
'upload_asset_url'
:
upload_asset_url
,
'upload_asset_url'
:
upload_asset_url
,
'textbook_url'
:
textbook_url
,
'textbook_url'
:
textbook_url
,
})
})
...
...
cms/templates/textbooks.html
View file @
c9319823
...
@@ -23,7 +23,7 @@ CMS.URL.TEXTBOOKS = "${textbook_url}"
...
@@ -23,7 +23,7 @@ CMS.URL.TEXTBOOKS = "${textbook_url}"
CMS
.
URL
.
LMS_BASE
=
"${settings.LMS_BASE}"
CMS
.
URL
.
LMS_BASE
=
"${settings.LMS_BASE}"
require
([
"js/models/section"
,
"js/collections/textbook"
,
"js/views/list_textbooks"
],
require
([
"js/models/section"
,
"js/collections/textbook"
,
"js/views/list_textbooks"
],
function
(
Section
,
TextbookCollection
,
ListTextbooksView
)
{
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
});
var
tbView
=
new
ListTextbooksView
({
collection
:
textbooks
});
$
(
function
()
{
$
(
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment