Render credit pathways in program details sidebar

This commit is contained in:
Cole Rogers
2018-07-31 12:58:28 -04:00
parent e1d27d56f8
commit 40b6faf253
9 changed files with 131 additions and 16 deletions

File diff suppressed because one or more lines are too long

View File

@@ -59,6 +59,7 @@ describe('Program Details Header View', () => {
full_program_price: 300,
card_image_url: 'some image',
faq: [],
pathway_ids: [2],
price_ranges: [
{
max: 378,
@@ -473,6 +474,17 @@ describe('Program Details Header View', () => {
userPreferences: {
'pref-lang': 'en',
},
creditPathways: [
{
org_name: 'Test Org Name',
email: 'test@test.com',
name: 'Name of Test Pathway',
program_uuids: ['0ffff5d6-0177-4690-9a48-aa2fecf94610'],
description: 'Test credit pathway description',
id: 2,
destination_url: 'edx.org',
},
],
};
const data = options.programData;

View File

@@ -17,6 +17,7 @@ class ProgramDetailsSidebarView extends Backbone.View {
this.certificateCollection = options.certificateCollection || [];
this.programCertificate = this.getProgramCertificate();
this.programRecordUrl = options.programRecordUrl;
this.creditPathways = options.creditPathways;
this.render();
}
@@ -25,6 +26,7 @@ class ProgramDetailsSidebarView extends Backbone.View {
programCertificate: this.programCertificate ?
this.programCertificate.toJSON() : {},
programRecordUrl: this.programRecordUrl,
creditPathways: this.creditPathways,
});
HtmlUtils.setHtml(this.$el, this.tpl(data));

View File

@@ -113,6 +113,7 @@ class ProgramDetailsView extends Backbone.View {
courseModel: this.courseData,
certificateCollection: this.certificateCollection,
programRecordUrl: this.options.urls.program_record_url,
creditPathways: this.options.creditPathways,
});
}