mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Display real member count in publish menu
This commit is contained in:
parent
56cfbf2cd2
commit
d77b059716
4 changed files with 9 additions and 4 deletions
|
@ -3,10 +3,10 @@ import PostModel from 'ghost-admin/models/post';
|
|||
import boundOneWay from 'ghost-admin/utils/bound-one-way';
|
||||
import config from 'ghost-admin/config/environment';
|
||||
import isNumber from 'ghost-admin/utils/isNumber';
|
||||
import moment from 'moment';
|
||||
import {alias, mapBy} from '@ember/object/computed';
|
||||
import {computed} from '@ember/object';
|
||||
import {inject as controller} from '@ember/controller';
|
||||
import {get} from '@ember/object';
|
||||
import {htmlSafe} from '@ember/string';
|
||||
import {isBlank} from '@ember/utils';
|
||||
import {isArray as isEmberArray} from '@ember/array';
|
||||
|
@ -543,6 +543,9 @@ export default Controller.extend({
|
|||
limit: 'all'
|
||||
});
|
||||
this.set('actionsList', actions);
|
||||
|
||||
let membersResponse = yield this.store.query('member', {limit: 1});
|
||||
this.set('memberCount', get(membersResponse, 'meta.pagination.total'));
|
||||
}).restartable(),
|
||||
|
||||
/* Public methods --------------------------------------------------------*/
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
<div class="flex-grow-1">
|
||||
<div class="gh-publishmenu-radio-label">Email post</div>
|
||||
<div class="gh-publishmenu-radio-desc">Send post to 56 members when published</div>
|
||||
<div class="gh-publishmenu-radio-desc">Send post to {{this.memberCount}} members when published</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
saveType=saveType
|
||||
setSaveType=(action "setSaveType")
|
||||
backgroundTask=this.backgroundTask
|
||||
deliveredAction=this.deliveredAction}}
|
||||
deliveredAction=this.deliveredAction
|
||||
memberCount=this.memberCount}}
|
||||
{{/if}}
|
||||
|
||||
{{!--
|
||||
|
|
|
@ -57,7 +57,8 @@
|
|||
setSaveType=(action "setSaveType")
|
||||
onOpen=(action "cancelAutosave")
|
||||
backgroundTask=this.backgroundLoader
|
||||
deliveredAction=this.deliveredAction}}
|
||||
deliveredAction=this.deliveredAction
|
||||
memberCount=this.memberCount}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue