2014-07-20 20:42:03 +04:00
|
|
|
import PaginationControllerMixin from 'ghost/mixins/pagination-controller';
|
|
|
|
|
|
|
|
var UsersIndexController = Ember.ArrayController.extend(PaginationControllerMixin, {
|
|
|
|
init: function () {
|
|
|
|
//let the PaginationControllerMixin know what type of model we will be paginating
|
|
|
|
//this is necesariy because we do not have access to the model inside the Controller::init method
|
|
|
|
this._super({'modelType': 'user'});
|
|
|
|
},
|
|
|
|
|
2014-07-05 12:06:10 +04:00
|
|
|
users: Ember.computed.alias('model'),
|
2014-07-02 07:44:39 +04:00
|
|
|
|
2014-07-19 04:58:27 +04:00
|
|
|
activeUsers: Ember.computed.filterBy('users', 'active', true).property('users'),
|
2014-07-02 07:44:39 +04:00
|
|
|
|
2014-07-19 04:58:27 +04:00
|
|
|
invitedUsers: Ember.computed.filterBy('users', 'invited', true).property('users')
|
2014-07-02 07:44:39 +04:00
|
|
|
});
|
|
|
|
|
|
|
|
export default UsersIndexController;
|