FIX: selectively disappear invite search box
This commit is contained in:
parent
04e5c59598
commit
eea3884e14
|
@ -12,6 +12,7 @@ export default Ember.ObjectController.extend({
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super();
|
this._super();
|
||||||
this.set('searchTerm', '');
|
this.set('searchTerm', '');
|
||||||
|
this.set('totalInvites', '');
|
||||||
},
|
},
|
||||||
|
|
||||||
uploadText: function() { return I18n.t("user.invited.bulk_invite.text"); }.property(),
|
uploadText: function() { return I18n.t("user.invited.bulk_invite.text"); }.property(),
|
||||||
|
@ -59,8 +60,8 @@ export default Ember.ObjectController.extend({
|
||||||
@property showSearch
|
@property showSearch
|
||||||
**/
|
**/
|
||||||
showSearch: function() {
|
showSearch: function() {
|
||||||
return this.get('invites.length') > 9;
|
return this.get('totalInvites') > 9;
|
||||||
}.property(),
|
}.property('totalInvites'),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Were the results limited by our `maxInvites`
|
Were the results limited by our `maxInvites`
|
||||||
|
|
|
@ -19,7 +19,8 @@ Discourse.UserInvitedRoute = Discourse.Route.extend({
|
||||||
controller.setProperties({
|
controller.setProperties({
|
||||||
model: model,
|
model: model,
|
||||||
user: this.controllerFor('user').get('model'),
|
user: this.controllerFor('user').get('model'),
|
||||||
searchTerm: ''
|
searchTerm: '',
|
||||||
|
totalInvites: model.invites.length
|
||||||
});
|
});
|
||||||
this.controllerFor('user').set('indexStream', false);
|
this.controllerFor('user').set('indexStream', false);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue