v1.18.x
Julian Lam 11 years ago
parent 37bd88d1b2
commit fdd2dc322b

@ -10,12 +10,12 @@
<div class="col-lg-8">
<h2>{groups.name}</h2>
<p>{groups.description}</p>
<!-- IF groups.deletable -->
<div class="btn-group">
<button class="btn btn-default" data-action="members">Members</button>
<!-- IF groups.deletable -->
<button class="btn btn-danger" data-action="delete">Delete Group</button>
<!-- ENDIF groups.deletable -->
</div>
<!-- ENDIF groups.deletable -->
</div>
<div class="col-lg-4">
<ul class="pull-right members">

@ -70,7 +70,7 @@
results.base.count = results.users.length;
results.base.members = results.users;
results.base.deletable = parseInt(results.base.gid, 10) !== 1;
results.base.deletable = results.base.hidden !== '1';
callback(err, results.base);
});

@ -2,6 +2,7 @@ var nconf = require('nconf'),
fs = require('fs'),
path = require('path'),
winston = require('winston'),
async = require('async'),
db = require('./../database'),
user = require('./../user'),
@ -421,9 +422,20 @@ var nconf = require('nconf'),
});
app.get('/groups', function (req, res) {
async.parallel([
function(next) {
groups.list({
expand: true
}, function (err, groups) {
}, next);
},
function(next) {
groups.listSystemGroups({
expand: true
}, next);
}
], function(err, data) {
var groups = data[0].concat(data[1]);
res.json(200, {
groups: groups,
yourid: req.user.uid

Loading…
Cancel
Save