From 52a1b220703f6d1aafe8d3ec767f6046b2a4e989 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Thu, 16 Oct 2014 15:28:51 +0000 Subject: [PATCH] Show all invited users and infinite scroll active Closes #4239 --- core/client/assets/sass/layouts/users.scss | 9 ++++++++ core/client/routes/settings/users/index.js | 22 +++++++++++-------- .../client/templates/settings/users/index.hbs | 16 +++++++------- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/core/client/assets/sass/layouts/users.scss b/core/client/assets/sass/layouts/users.scss index cc62df7e46..fde69e99de 100644 --- a/core/client/assets/sass/layouts/users.scss +++ b/core/client/assets/sass/layouts/users.scss @@ -4,6 +4,15 @@ // Slug: /ghost/settings/users/ // -------------------------------------------------- +.user-list-header { + padding-left: 0; +} + +.content.settings-users { + padding: 0 40px; + overflow: auto; + height: 100%; +} .invited-users { margin-bottom: 34px; diff --git a/core/client/routes/settings/users/index.js b/core/client/routes/settings/users/index.js index 236bd9e1ed..eb9262eeb4 100644 --- a/core/client/routes/settings/users/index.js +++ b/core/client/routes/settings/users/index.js @@ -4,7 +4,7 @@ import styleBody from 'ghost/mixins/style-body'; var paginationSettings = { page: 1, limit: 20, - status: 'all' + status: 'active' }; var UsersIndexRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, PaginationRouteMixin, { @@ -17,16 +17,20 @@ var UsersIndexRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, sty model: function () { var self = this; - return this.store.find('user', 'me').then(function (currentUser) { - if (currentUser.get('isEditor')) { - // Editors only see authors in the list - paginationSettings.role = 'Author'; - } - return self.store.filter('user', paginationSettings, function (user) { + + return self.store.find('user', {limit: 'all', status: 'invited'}).then(function () { + return self.store.find('user', 'me').then(function (currentUser) { if (currentUser.get('isEditor')) { - return user.get('isAuthor'); + // Editors only see authors in the list + paginationSettings.role = 'Author'; } - return true; + + return self.store.filter('user', paginationSettings, function (user) { + if (currentUser.get('isEditor')) { + return user.get('isAuthor'); + } + return true; + }); }); }); }, diff --git a/core/client/templates/settings/users/index.hbs b/core/client/templates/settings/users/index.hbs index 62b521864e..3ccb9a3484 100644 --- a/core/client/templates/settings/users/index.hbs +++ b/core/client/templates/settings/users/index.hbs @@ -1,12 +1,12 @@ -
- {{#link-to "settings" class="btn btn-default btn-back"}}Back{{/link-to}} -

Users

-
- -
-
- {{#view "settings/users/users-list-view" tagName="section" class="content settings-users" }} +
+ {{#link-to "settings" class="btn btn-default btn-back"}}Back{{/link-to}} +

Users

+
+ +
+
+ {{#if invitedUsers}}