2014-10-28 17:29:42 +03:00
|
|
|
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
2015-04-14 18:04:16 +03:00
|
|
|
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
2014-07-20 20:42:03 +04:00
|
|
|
import PaginationRouteMixin from 'ghost/mixins/pagination-route';
|
2014-09-23 17:04:49 +04:00
|
|
|
import styleBody from 'ghost/mixins/style-body';
|
2014-07-20 20:42:03 +04:00
|
|
|
|
2015-06-30 16:21:03 +03:00
|
|
|
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, PaginationRouteMixin, {
|
2015-05-25 21:17:10 +03:00
|
|
|
titleToken: 'Team',
|
2014-11-25 23:56:08 +03:00
|
|
|
|
2015-06-30 16:21:03 +03:00
|
|
|
classNames: ['view-team'],
|
2014-09-23 17:04:49 +04:00
|
|
|
|
2015-09-03 14:06:50 +03:00
|
|
|
paginationModel: 'user',
|
|
|
|
paginationSettings: {
|
|
|
|
status: 'active',
|
|
|
|
limit: 20
|
2015-04-14 18:04:16 +03:00
|
|
|
},
|
|
|
|
|
2014-07-02 07:44:39 +04:00
|
|
|
model: function () {
|
2014-07-31 12:29:05 +04:00
|
|
|
var self = this;
|
2014-10-16 19:28:51 +04:00
|
|
|
|
2015-09-03 14:06:50 +03:00
|
|
|
this.loadFirstPage();
|
|
|
|
|
|
|
|
return self.store.query('user', {limit: 'all', status: 'invited'}).then(function () {
|
|
|
|
return self.store.filter('user', function () {
|
2015-06-30 16:21:03 +03:00
|
|
|
return true;
|
2014-07-31 12:29:05 +04:00
|
|
|
});
|
2014-07-20 20:42:03 +04:00
|
|
|
});
|
2014-08-03 04:49:56 +04:00
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
reload: function () {
|
|
|
|
this.refresh();
|
|
|
|
}
|
2014-07-02 07:44:39 +04:00
|
|
|
}
|
|
|
|
});
|