Merge branch 'master' of https://github.com/pichalite/NodeBB into pichalite-master

v1.18.x
Julian Lam 10 years ago
commit d10fd6248e

@ -115,17 +115,21 @@
// Groups helpers
helpers.membershipBtn = function(groupObj) {
if (groupObj.isMember) {
return '<button class="btn btn-danger" data-action="leave" data-group="' + groupObj.displayName + '"><i class="fa fa-times"></i> Leave Group</button>';
} else {
if (groupObj.isPending) {
return '<button class="btn btn-warning disabled"><i class="fa fa-clock-o"></i> Invitation Pending</button>';
} else if (groupObj.isInvited) {
return '<button class="btn btn-link" data-action="rejectInvite" data-group="' + groupObj.displayName + '">Reject</button><button class="btn btn-success" data-action="acceptInvite" data-group="' + groupObj.name + '"><i class="fa fa-plus"></i> Accept Invitation</button>';
if (groupObj.name==='administrators') {
return '';
} else {
if (groupObj.isMember) {
return '<button class="btn btn-danger" data-action="leave" data-group="' + groupObj.displayName + '"><i class="fa fa-times"></i> Leave Group</button>';
} else {
return '<button class="btn btn-success" data-action="join" data-group="' + groupObj.displayName + '"><i class="fa fa-plus"></i> Join Group</button>';
if (groupObj.isPending) {
return '<button class="btn btn-warning disabled"><i class="fa fa-clock-o"></i> Invitation Pending</button>';
} else if (groupObj.isInvited) {
return '<button class="btn btn-link" data-action="rejectInvite" data-group="' + groupObj.displayName + '">Reject</button><button class="btn btn-success" data-action="acceptInvite" data-group="' + groupObj.name + '"><i class="fa fa-plus"></i> Accept Invitation</button>';
} else {
return '<button class="btn btn-success" data-action="join" data-group="' + groupObj.displayName + '"><i class="fa fa-plus"></i> Join Group</button>';
}
}
}
}
};
helpers.spawnPrivilegeStates = function(member, privileges) {

Loading…
Cancel
Save