mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
cef680aa6b
Closes #2747 - Added new 'editor-save-button' view and template. - Added save action to post controller. - Set a new post as the default model for the /editor/ route. - Set the `posts/post` controller as the controller for the /editor/ route. - Needs ghost-popover #2418 component for full pop-up functionality
18 lines
430 B
JavaScript
18 lines
430 B
JavaScript
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
|
import styleBody from 'ghost/mixins/style-body';
|
|
import Post from 'ghost/models/post';
|
|
|
|
var NewRoute = AuthenticatedRoute.extend(styleBody, {
|
|
controllerName: 'posts/post',
|
|
classNames: ['editor'],
|
|
|
|
renderTemplate: function () {
|
|
this.render('editor');
|
|
},
|
|
|
|
model: function () {
|
|
return Post.create();
|
|
}
|
|
});
|
|
|
|
export default NewRoute;
|