mirror of
https://github.com/discourse/discourse.git
synced 2025-09-08 12:06:51 +08:00
Revert "Revert "REFACTOR: support booting discourse with DISCOURSE_NO_CONSTANTS""
This reverts commit c21457d6a7
.
This commit is contained in:
parent
d8734fc542
commit
5c899c765b
99 changed files with 394 additions and 384 deletions
|
@ -1,5 +1,6 @@
|
|||
import debounce from 'discourse/lib/debounce';
|
||||
import { i18n } from 'discourse/lib/computed';
|
||||
import AdminUser from 'admin/models/admin-user';
|
||||
|
||||
export default Ember.ArrayController.extend({
|
||||
query: null,
|
||||
|
@ -42,7 +43,7 @@ export default Ember.ArrayController.extend({
|
|||
var self = this;
|
||||
this.set('refreshing', true);
|
||||
|
||||
Discourse.AdminUser.findAll(this.get('query'), { filter: this.get('listFilter'), show_emails: this.get('showEmails') }).then(function (result) {
|
||||
AdminUser.findAll(this.get('query'), { filter: this.get('listFilter'), show_emails: this.get('showEmails') }).then(function (result) {
|
||||
self.set('model', result);
|
||||
}).finally(function() {
|
||||
self.set('refreshing', false);
|
||||
|
@ -51,14 +52,14 @@ export default Ember.ArrayController.extend({
|
|||
|
||||
actions: {
|
||||
approveUsers: function() {
|
||||
Discourse.AdminUser.bulkApprove(this.get('model').filterProperty('selected'));
|
||||
AdminUser.bulkApprove(this.get('model').filterProperty('selected'));
|
||||
this._refreshUsers();
|
||||
},
|
||||
|
||||
rejectUsers: function() {
|
||||
var maxPostAge = this.siteSettings.delete_user_max_post_age;
|
||||
var controller = this;
|
||||
Discourse.AdminUser.bulkReject(this.get('model').filterProperty('selected')).then(function(result){
|
||||
AdminUser.bulkReject(this.get('model').filterProperty('selected')).then(function(result){
|
||||
var message = I18n.t("admin.users.reject_successful", {count: result.success});
|
||||
if (result.failed > 0) {
|
||||
message += ' ' + I18n.t("admin.users.reject_failures", {count: result.failed});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue