Skip to content
This repository has been archived by the owner on Aug 21, 2018. It is now read-only.

Commit

Permalink
[#840]:AddCourseCareer completed
Browse files Browse the repository at this point in the history
  • Loading branch information
Pr0chin committed Jun 5, 2017
1 parent aa9400f commit 72f41a5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
8 changes: 0 additions & 8 deletions app/MyApp/app/collections/CourseCareerPath.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ $(function() {

App.Collections.CourseCareerPath = Backbone.Collection.extend({
url: function() {
<<<<<<< HEAD:app/MyApp/app/collections/CourseCareerPath.js
if (this.CoursePathName != "" && this.MemberID != "" && this.CoursePathName!= undefined && this.MemberID!= undefined ) {
=======
if (this.CoursePathName!= undefined && this.MemberID!= undefined ) {
>>>>>>> 472c5738c0d410a390fededc50c57ccb59591d62:app/MyApp/app/collections/CourseCareerPath.js
return App.Server + '/coursecareerpath/_design/bell/_view/GetCourseCareerByLevelNameMemberIds/?key=["' +this.CoursePathName + '","' +this.MemberID+ '"]&include_docs=true'
} else {
return App.Server + '/coursecareerpath/_all_docs?include_docs=true'
Expand All @@ -24,11 +20,7 @@ $(function() {
comparator: function(model) {
var type = model.get('Type')
if (type) return type.toLowerCase()
<<<<<<< HEAD:app/MyApp/app/collections/CourseCareerPath.js
},
=======
}
>>>>>>> 472c5738c0d410a390fededc50c57ccb59591d62:app/MyApp/app/collections/CourseCareerPath.js
})

})
Expand Down
10 changes: 7 additions & 3 deletions app/MyApp/app/views/AddCourseCareer.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,18 @@ $(function() {
courseCareers.fetch({
async:false
});
console.log(courseCareers)
this.vars.careerList = [];
for(var i = 0; i < (courseCareers.length -1 ); i++) {
this.vars.careerList.push(courseCareers.models[i].attributes);
for(var i = 0; i < (courseCareers.length); i++) {
if(courseCareers.models[i].attributes._id !== "_design/bell"){
this.vars.careerList.push(courseCareers.models[i].attributes);
}
}
console.log(this.vars.careerList)
this.vars.Courselist = arrcourses
this.vars.Courseid = arrCourseIds
this.vars.Course_Length = this.collection.models.length-1
$el.html(_.template(this.template,this.vars))
this.$el.html(_.template(this.template,this.vars))
},
})

Expand Down
6 changes: 4 additions & 2 deletions app/MyApp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1484,13 +1484,15 @@ <h4 id="new-quiz"><%= languageDict.attributes.New_Career_Path %></h4>
<div>
<table class="btable btable-striped">
<th style="width: 430px"><%= languageDict.attributes.Course_Career %></th>
<th style="width: 430px"><%= languageDict.attributes.Level_Name %></th>
<th style="width: 430px"><%= languageDict.attributes.Courses_List %></th>
<th><%= languageDict.attributes.Actions %><th>
<% for (var i=0; i < careerList.length; i++){%>
<tr>
<td><%= careerList[i].CoursePathName %></td>Courses
<td><%= careerList[i].CoursePathName %></td> <td><%= careerList[i].Level_Name %></td>
<td><%= careerList[i].Courses %></td>
<td><button class='destroy btn btn-danger'><%=languageDict.attributes.DeleteLabel%></button></td>
<td><button class='course btn btn-success'><%=languageDict.attributes.EditLabel%></button></td>
<td><button class='destroy btn btn-danger' style="margin-right: 420px;"><%=languageDict.attributes.DeleteLabel%></button></td>
</tr>
<% } %>
</table>
Expand Down

0 comments on commit 72f41a5

Please sign in to comment.