upgrade backbone-associations, fix tests
Merge pull request #17559 from edx/ri/EDUCATOR-2231-remove-enrollment-dates-references EDUCATOR-2231 remove course run enrollment dates references from studio add NoTextbooks component make backbone-associations work webpackify context course test fixup
This commit is contained in:
24
cms/static/js/features_jsx/studio/NoTextbooks.jsx
Normal file
24
cms/static/js/features_jsx/studio/NoTextbooks.jsx
Normal file
@@ -0,0 +1,24 @@
|
||||
/* global gettext */
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
|
||||
export class NoTextbooks extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="no-textbook-content">
|
||||
<p>
|
||||
{gettext("You haven't added any textbooks to this course yet.")}
|
||||
<a href="#" className="button new-button">
|
||||
<span className="icon fa fa-plus" aria-hidden="true"></span>
|
||||
{gettext("Add your first textbook")}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
NoTextbooks.propTypes = {
|
||||
|
||||
};
|
||||
6
cms/static/js/pages/course.js
Normal file
6
cms/static/js/pages/course.js
Normal file
@@ -0,0 +1,6 @@
|
||||
define(
|
||||
['js/models/course'],
|
||||
function(ContextCourse) {
|
||||
window.course = new ContextCourse(window.pageFactoryArguments.ContextCourse[0]);
|
||||
}
|
||||
);
|
||||
7
cms/static/js/pages/textbooks.js
Normal file
7
cms/static/js/pages/textbooks.js
Normal file
@@ -0,0 +1,7 @@
|
||||
define(
|
||||
['js/factories/textbooks', 'common/js/utils/page_factory', 'js/pages/course'],
|
||||
function(TextbooksFactory, invokePageFactory) {
|
||||
'use strict';
|
||||
invokePageFactory('TextbooksFactory', TextbooksFactory);
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user