mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
74205134ef
ref #3004 - this is unnecessary and causing bugs
33 lines
923 B
JavaScript
33 lines
923 B
JavaScript
import styleBody from 'ghost/mixins/style-body';
|
|
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
|
|
|
var paginationSettings = {
|
|
status: 'all',
|
|
staticPages: 'all',
|
|
page: 1
|
|
};
|
|
|
|
var PostsRoute = AuthenticatedRoute.extend(styleBody, {
|
|
classNames: ['manage'],
|
|
|
|
model: function () {
|
|
// using `.filter` allows the template to auto-update when new models are pulled in from the server.
|
|
// we just need to 'return true' to allow all models by default.
|
|
return this.store.filter('post', paginationSettings, function () {
|
|
return true;
|
|
});
|
|
},
|
|
|
|
setupController: function (controller, model) {
|
|
this._super(controller, model);
|
|
controller.set('paginationSettings', paginationSettings);
|
|
},
|
|
|
|
actions: {
|
|
openEditor: function (post) {
|
|
this.transitionTo('editor', post);
|
|
}
|
|
}
|
|
});
|
|
|
|
export default PostsRoute;
|