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

Commit

Permalink
Update ConfigurationsDoc-Community.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
Rupesh87 committed Oct 27, 2017
1 parent 95d5181 commit 4fea9a1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/MyApp/app/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -3062,15 +3062,15 @@ $(function() {
var CoursecommunityList = "";
if(App.configuration.get('type') == 'nation'){
$.ajax({
url: '/community/_design/bell/_view/getCommunityByCode',
url: '/members/_design/bell/_view/MembersBySelectedCommunity?group=true',
type: 'GET',
dataType: "jsonp",
async: false,
success: function(json){
CoursecommunityList = '<option value="">'+App.languageDict.attributes.All+'</option>';
CoursecommunityList += '<option value="'+App.configuration.get('code')+'">'+App.configuration.get('name')+'</option>';
$.each(json.rows, function(rec, index) {
CoursecommunityList += '<option value="'+this.value.Code+'">'+this.value.Name+'</option>';
CoursecommunityList += '<option value="'+this.key+'">'+this.key+'</option>';
})
CoursecommunityList = '<select id="CommunitySelect">'+CoursecommunityList+'</select>';
$('.DropDownOptn').append(CoursecommunityList);
Expand Down
4 changes: 2 additions & 2 deletions app/MyApp/app/views/CourseMembers.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ $(function () {
var na = currentConfig.rows[0].doc.nationName.substring(3,5);
$('.courseEditStep').empty();
$('.courseEditStep').append('<h3>'+App.languageDict.attributes.Course_Members+ ' | ' + courseModel.get('name') + '</h3>')
var viewtext = '<table id = "Table1" class="btable btable-striped"><th>'+App.languageDict.attributes.Photo+'</th><th>'+App.languageDict.attributes.Name+'</th><th>'+App.languageDict.attributes.Roles+'</th><th colspan=2>'+App.languageDict.attributes.Actions+'</th>'
var viewtext = '<table id = "Table1" class="btable btable-striped"><th>'+App.languageDict.attributes.Photo+'</th><th>'+App.languageDict.attributes.Name+'</th><th>'+App.languageDict.attributes.Roles+'</th><th>'+App.languageDict.attributes.Community+'</th><th colspan="2">'+App.languageDict.attributes.Actions+'</th>'
for (var i = 0; i < member_list.length; i++) {
var mems = new App.Models.Member({
_id: member_list[i]
Expand Down Expand Up @@ -107,7 +107,7 @@ $(function () {
'onclick=showComposePopupMultiple("' + mail + '") id="sendMailButton">'
+App.languageDict.attributes.Send_Email+'</button>' +
'<button class="btn" id="retrunBack" onclick=retrunBack()>'
+App.languageDict.attributes.Back+'</button></td><td></td><td></td></tr>';
+App.languageDict.attributes.Back+'</button></td><td></td><td></td><td></td></tr>';
viewtext += '</table>';
$('.courseEditStep').append(viewtext)
}
Expand Down
10 changes: 10 additions & 0 deletions databases/members.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ ddoc.views = {
}
}
},
MembersBySelectedCommunity: {
map: function(doc) {
if (doc && doc.community) {
emit(doc.community, doc)
}
},
reduce: function(keys, values, rereduce) {
return values[0].community;
}
},
managerMembers: {
map: function (doc) {
if (doc && doc.kind == 'Member' && doc.roles.indexOf('Manager') > -1) {
Expand Down

0 comments on commit 4fea9a1

Please sign in to comment.