2014-07-31 23:36:20 +04:00
|
|
|
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
|
|
|
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
|
|
|
import styleBody from 'ghost/mixins/style-body';
|
|
|
|
|
2015-05-25 21:17:10 +03:00
|
|
|
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
|
|
|
titleToken: 'Settings - Code Injection',
|
2014-07-31 23:36:20 +04:00
|
|
|
classNames: ['settings-view-code'],
|
|
|
|
|
|
|
|
beforeModel: function () {
|
2015-04-14 18:04:16 +03:00
|
|
|
return this.get('session.user')
|
2014-07-31 23:36:20 +04:00
|
|
|
.then(this.transitionAuthor())
|
2015-04-09 19:52:41 +03:00
|
|
|
.then(this.transitionEditor());
|
2014-07-31 23:36:20 +04:00
|
|
|
},
|
|
|
|
|
|
|
|
model: function () {
|
|
|
|
return this.store.find('setting', {type: 'blog,theme'}).then(function (records) {
|
|
|
|
return records.get('firstObject');
|
|
|
|
});
|
2014-11-28 14:09:45 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
save: function () {
|
|
|
|
this.get('controller').send('save');
|
|
|
|
}
|
2014-07-31 23:36:20 +04:00
|
|
|
}
|
|
|
|
});
|