mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 12:42:57 +08:00
FIX: Bugs on Admin User approval interface
This commit is contained in:
parent
ed60f24502
commit
08723f00c6
|
@ -13,6 +13,10 @@ Discourse.AdminUsersListController = Ember.ArrayController.extend(Discourse.Pres
|
|||
content: null,
|
||||
loading: false,
|
||||
|
||||
queryNew: Em.computed.equal('query', 'new'),
|
||||
queryPending: Em.computed.equal('query', 'pending'),
|
||||
queryHasApproval: Em.computed.or('queryNew', 'queryPending'),
|
||||
|
||||
/**
|
||||
Triggered when the selectAll property is changed
|
||||
|
||||
|
@ -58,10 +62,8 @@ Discourse.AdminUsersListController = Ember.ArrayController.extend(Discourse.Pres
|
|||
@property showApproval
|
||||
**/
|
||||
showApproval: function() {
|
||||
if (!Discourse.SiteSettings.must_approve_users) return false;
|
||||
if (this.get('query') === 'new') return true;
|
||||
if (this.get('query') === 'pending') return true;
|
||||
}.property('query'),
|
||||
return Discourse.SiteSettings.must_approve_users && this.get('queryHasApproval');
|
||||
}.property('queryPending'),
|
||||
|
||||
/**
|
||||
How many users are currently selected
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
{{#each model}}
|
||||
<tr {{bindAttr class="selected"}}>
|
||||
{{#if showApproval}}
|
||||
{{#if controller.showApproval}}
|
||||
<td>
|
||||
{{#if can_approve}}
|
||||
{{view Ember.Checkbox checkedBinding="selected"}}
|
||||
|
|
|
@ -43,7 +43,7 @@ Ember.Handlebars.registerHelper('i18n', function(property, options) {
|
|||
Ember.Handlebars.registerHelper('countI18n', function(key, options) {
|
||||
var view = Discourse.View.extend({
|
||||
tagName: 'span',
|
||||
shouldRerender: Discourse.View.renderIfChanged('countChanged'),
|
||||
shouldRerender: Discourse.View.renderIfChanged('count'),
|
||||
|
||||
render: function(buffer) {
|
||||
buffer.push(I18n.t(key, { count: this.get('count') }));
|
||||
|
|
Loading…
Reference in New Issue
Block a user