2014-07-20 12:42:03 -04:00
|
|
|
import PaginationRouteMixin from 'ghost/mixins/pagination-route';
|
|
|
|
|
2014-07-23 06:13:20 +00:00
|
|
|
var paginationSettings = {
|
2014-07-20 12:42:03 -04:00
|
|
|
page: 1,
|
2014-07-23 06:13:20 +00:00
|
|
|
limit: 20,
|
|
|
|
status: 'all'
|
2014-07-20 12:42:03 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
var UsersIndexRoute = Ember.Route.extend(Ember.SimpleAuth.AuthenticatedRouteMixin, PaginationRouteMixin, {
|
|
|
|
setupController: function (controller, model) {
|
2014-07-23 06:13:20 +00:00
|
|
|
this._super(controller, model);
|
|
|
|
this.setupPagination(paginationSettings);
|
2014-07-20 12:42:03 -04:00
|
|
|
},
|
2014-07-01 23:44:39 -04:00
|
|
|
|
|
|
|
model: function () {
|
2014-07-23 06:13:20 +00:00
|
|
|
return this.store.filter('user', paginationSettings, function () {
|
|
|
|
return true;
|
2014-07-20 12:42:03 -04:00
|
|
|
});
|
2014-07-01 23:44:39 -04:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export default UsersIndexRoute;
|