0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Show correct type in publish button

Closes #5138

Shows the correct type (post or page)  in the publish button
This commit is contained in:
Paul Adam Davis 2015-04-14 11:48:31 +01:00
parent 8f354ddbc2
commit f8696575a0

View file

@ -9,7 +9,7 @@ var EditorSaveButtonView = Ember.View.extend({
return this.get('controller.model.isPublished') !== this.get('controller.willPublish');
}),
publishText: Ember.computed('controller.model.isPublished', 'controller.pageOrPost', function () {
publishText: Ember.computed('controller.model.isPublished', 'controller.postOrPage', function () {
return this.get('controller.model.isPublished') ? 'Update ' + this.get('controller.postOrPage') : 'Publish Now';
}),
@ -21,7 +21,7 @@ var EditorSaveButtonView = Ember.View.extend({
return 'Delete ' + this.get('controller.postOrPage');
}),
saveText: Ember.computed('controller.willPublish', function () {
saveText: Ember.computed('controller.willPublish', 'publishText', 'draftText', function () {
return this.get('controller.willPublish') ? this.get('publishText') : this.get('draftText');
})
});