0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/app/routes/team/index.js

44 lines
1.1 KiB
JavaScript
Raw Normal View History

import AuthenticatedRoute from 'ghost/routes/authenticated';
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
import PaginationRouteMixin from 'ghost/mixins/pagination-route';
import styleBody from 'ghost/mixins/style-body';
var paginationSettings;
paginationSettings = {
page: 1,
limit: 20,
status: 'active'
};
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, PaginationRouteMixin, {
titleToken: 'Team',
classNames: ['view-team'],
setupController: function (controller, model) {
this._super(controller, model);
this.setupPagination(paginationSettings);
},
beforeModel: function (transition) {
this._super(transition);
},
model: function () {
var self = this;
return self.store.find('user', {limit: 'all', status: 'invited'}).then(function () {
return self.store.filter('user', paginationSettings, function () {
return true;
});
});
},
actions: {
reload: function () {
this.refresh();
}
}
});