2013-04-17 15:08:21 +08:00
|
|
|
Discourse.AdminGroupsController = Ember.ArrayController.extend({
|
|
|
|
itemController: 'adminGroup',
|
2013-05-08 13:20:38 +08:00
|
|
|
|
|
|
|
edit: function(group){
|
|
|
|
this.get('model').select(group);
|
|
|
|
group.loadUsers();
|
|
|
|
},
|
|
|
|
|
|
|
|
refreshAutoGroups: function(){
|
|
|
|
var controller = this;
|
|
|
|
|
|
|
|
this.set('refreshingAutoGroups', true);
|
|
|
|
Discourse.ajax('/admin/groups/refresh_automatic_groups', {type: 'POST'}).then(function(){
|
|
|
|
controller.set('model', Discourse.Group.findAll());
|
|
|
|
controller.set('refreshingAutoGroups',false);
|
|
|
|
});
|
2013-04-17 15:08:21 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2013-05-08 13:20:38 +08:00
|
|
|
Discourse.AdminGroupController = Ember.Controller.extend({
|
2013-04-17 15:08:21 +08:00
|
|
|
|
|
|
|
});
|