Skip to content

Commit 71bb1af

Browse files
committed
Revert "Display Pivotal Education related courseware"
This reverts commit bf15ee8. Closes spring-projectsgh-3524
1 parent a1ff73b commit 71bb1af

File tree

2 files changed

+0
-66
lines changed

2 files changed

+0
-66
lines changed

_includes/widget_templates.html

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,6 @@
2929
</div>
3030
</script>
3131

32-
<script type="text/html" id="project-courses-widget-template">
33-
<h2>Related Courseware</h2>
34-
{@ if(hasCourses) { @}
35-
<h3 id="education">Pivotal Education</h3>
36-
<ul>
37-
{@ _.each(courses, function(course) { @}
38-
<li><a href="{@= course.url @}">{@= course.name @}</a></li>
39-
{@ }); @}
40-
</ul>
41-
{@ } @}
42-
{@ if(hasTalks) { @}
43-
<h3 id="talks">Engineering Talks</h3>
44-
<ul>
45-
{@ _.each(talks, function(talk) { @}
46-
<li><a href="{@= talk.url @}">{@= talk.name @}</a></li>
47-
{@ }); @}
48-
</ul>
49-
{@ } @}
50-
</script>
51-
5232
<script type="text/html" id="project-download-widget-controls-template">
5333
<div class="js-download-widget-selector">
5434
<select class='selector selectpicker'>

js/projectDocumentationWidget.js

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,14 @@ Spring.ProjectDocumentationWidget = function () {
1111
var quickStartEl = $('[data-download-widget-controls]');
1212
var mavenWidgetEl = $('.js-download-maven-widget');
1313
var documentationEl = $('.js-documentation-widget');
14-
var resourcesEl = $('.project-sidebar-resource--wrapper');
1514

1615
var projectUrl = apiBaseUrl + "/project_metadata/" + projectId;
1716
var promise = Spring.loadProject(projectUrl);
18-
var coursesPromise = Spring.loadCourses("https://pivotallms.biglms.com/api/courses");
1917

2018
promise.then(function (project) {
2119
Spring.buildDocumentationWidget(documentationEl, project);
2220
Spring.buildQuickStartWidget(quickStartEl, mavenWidgetEl, project);
2321
});
24-
coursesPromise.then(function(courseware) {
25-
Spring.buildCoursesWidget(resourcesEl, courseware);
26-
});
2722
};
2823

2924
Spring.buildDocumentationWidget = function (documentationEl, project) {
@@ -34,17 +29,6 @@ Spring.buildDocumentationWidget = function (documentationEl, project) {
3429
}).render();
3530

3631
}
37-
Spring.buildCoursesWidget = function (resourcesEl, courseware) {
38-
if(courseware.hasContent) {
39-
var tpl = $("#project-courses-widget-template").text();
40-
var view = new Spring.CoursesWidgetView({
41-
el: resourcesEl,
42-
model: courseware,
43-
template: $("#project-courses-widget-template").text()
44-
});
45-
view.render();
46-
}
47-
}
4832
Spring.buildQuickStartWidget = function (quickStartEl, mavenWidgetEl, project) {
4933
new Spring.QuickStartSelectorView({
5034
el: quickStartEl,
@@ -63,13 +47,6 @@ Spring.loadProject = function (url) {
6347
});
6448
}
6549

66-
Spring.loadCourses = function (url) {
67-
return $.getJSON(url)
68-
.then(function(data) {
69-
return new Spring.Courseware(data);
70-
});
71-
}
72-
7350
Spring.Release = function (data) {
7451
_.extend(this, data);
7552
}
@@ -86,15 +63,6 @@ Spring.Release.prototype = {
8663
}
8764
}
8865

89-
Spring.Courseware = function (data) {
90-
this.courses = data["edu1"];
91-
this.talks = data["eng1"];
92-
this.hasCourses = this.courses != null;
93-
this.hasTalks = this.talks != null;
94-
this.hasContent = this.hasTalks || this.hasCourses;
95-
return this;
96-
};
97-
9866
Spring.Project = function (data) {
9967
_.extend(this, data);
10068
var self = this;
@@ -119,20 +87,6 @@ Spring.DocumentationWidgetView = Backbone.View.extend({
11987
}
12088
});
12189

122-
Spring.CoursesWidgetView = Backbone.View.extend({
123-
initialize: function () {
124-
this.template = _.template(this.options.template);
125-
_.bindAll(this, "render");
126-
},
127-
128-
render: function () {
129-
this.$el.append(
130-
this.template(this.model)
131-
);
132-
return this;
133-
}
134-
});
135-
13690
Spring.SnippetView = Backbone.View.extend({
13791
initialize: function () {
13892
var snippetType = this.options.snippetType;

0 commit comments

Comments
 (0)