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:
Rabia Iftikhar
2018-03-05 17:20:44 +05:00
committed by Ari Rizzitano
10 changed files with 176 additions and 78 deletions

View 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 = {
};

View File

@@ -0,0 +1,6 @@
define(
['js/models/course'],
function(ContextCourse) {
window.course = new ContextCourse(window.pageFactoryArguments.ContextCourse[0]);
}
);

View 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);
}
);