Ghost/ghost/admin/app/controllers/posts-loading.js
Kevin Ansfield 758f5285fb Added access level filter to posts and pages lists in admin
no issue

- adds `visibility` query param to posts and pages controllers/routes that is tied to the `filter` query param used in API requests
- adds dropdown for selecting post/page visibility to `<GhContentFilter>`
2020-06-09 12:19:40 +01:00

23 lines
1006 B
JavaScript

import Controller, {inject as controller} from '@ember/controller';
import {readOnly} from '@ember/object/computed';
import {inject as service} from '@ember/service';
/* eslint-disable ghost/ember/alias-model-in-controller */
export default Controller.extend({
postsController: controller('posts'),
session: service(),
ui: service(),
availableTypes: readOnly('postsController.availableTypes'),
selectedType: readOnly('postsController.selectedType'),
selectedVisibility: readOnly('postsController.selectedVisibility'),
availableVisibilities: readOnly('postsController.availableVisibilities'),
availableTags: readOnly('postsController.availableTags'),
selectedTag: readOnly('postsController.selectedTag'),
availableAuthors: readOnly('postsController.availableAuthors'),
selectedAuthor: readOnly('postsController.selectedAuthor'),
availableOrders: readOnly('postsController.availableOrders'),
selectedOrder: readOnly('postsController.selectedOrder')
});