Ghost/ghost/admin/routes/posts.js
Manuel Mitasch 275f623278 Amend fixtures & put body classes in styleBody mixin
- Change fixture response of posts route to actual format.
- Extracted classNames logic of routes into style-body mixin.
- Additionally replaced all double-quotes with single-quotes for style conformance.
2014-03-09 15:30:54 +00:00

20 lines
464 B
JavaScript

import ajax from 'ghost/utils/ajax';
import styleBody from 'ghost/mixins/style-body';
var PostsRoute = Ember.Route.extend(styleBody, {
classNames: ['manage'],
model: function () {
return ajax('/ghost/api/v0.1/posts').then(function (response) {
return response.posts;
});
},
actions: {
openEditor: function (post) {
this.transitionTo('editor', post);
}
}
});
export default PostsRoute;