2016-05-24 15:06:59 +03:00
|
|
|
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
|
|
import base from 'ghost-admin/mixins/editor-base-route';
|
2014-03-10 07:44:08 +04:00
|
|
|
|
2015-06-13 17:34:09 +03:00
|
|
|
export default AuthenticatedRoute.extend(base, {
|
2014-11-25 23:56:08 +03:00
|
|
|
titleToken: 'Editor',
|
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
model() {
|
|
|
|
return this.get('session.user').then((user) => {
|
|
|
|
return this.store.createRecord('post', {
|
2014-07-17 09:54:32 +04:00
|
|
|
author: user
|
|
|
|
});
|
|
|
|
});
|
2014-06-06 05:18:03 +04:00
|
|
|
},
|
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
renderTemplate(controller, model) {
|
2015-06-13 17:34:09 +03:00
|
|
|
this.render('editor/edit', {
|
2015-10-28 14:36:45 +03:00
|
|
|
controller,
|
|
|
|
model
|
2015-06-13 17:34:09 +03:00
|
|
|
});
|
2014-03-10 07:44:08 +04:00
|
|
|
}
|
|
|
|
});
|