diff --git a/ghost/admin/controllers/posts/post.js b/ghost/admin/controllers/posts/post.js index 7bab3eea7a..84d0c6bf85 100644 --- a/ghost/admin/controllers/posts/post.js +++ b/ghost/admin/controllers/posts/post.js @@ -11,7 +11,7 @@ var PostController = Ember.ObjectController.extend({ this.get('model').save().then(function () { self.notifications.showSuccess('Post successfully marked as ' + (featured ? 'featured' : 'not featured') + '.'); - }, function() { + }, function () { self.notifications.showError('An error occured while saving the post.'); }); } diff --git a/ghost/admin/templates/posts.hbs b/ghost/admin/templates/posts.hbs index a0ba148d9f..5d34716772 100644 --- a/ghost/admin/templates/posts.hbs +++ b/ghost/admin/templates/posts.hbs @@ -9,7 +9,6 @@ {{#view "content-list-content-view" tagName="section"}}
    {{#each itemController="posts/post" itemView="post-item-view" itemTagName="li"}} - {{!-- @TODO: Restore functionality where 'featured' and 'page' classes are added for proper posts --}} {{#link-to "posts.post" this class="permalink" title="Edit this post"}}

    {{title}}

    diff --git a/ghost/admin/views/post-item-view.js b/ghost/admin/views/post-item-view.js index 5b283a8307..99ac893d43 100644 --- a/ghost/admin/views/post-item-view.js +++ b/ghost/admin/views/post-item-view.js @@ -1,7 +1,7 @@ import itemView from 'ghost/views/item-view'; var PostItemView = itemView.extend({ - classNameBindings: ['isFeatured'], + classNameBindings: ['isFeatured', 'isPage'], isFeatured: function () { if (this.get('controller.model.featured')) { @@ -9,6 +9,12 @@ var PostItemView = itemView.extend({ } }.property('controller.model.featured'), + isPage: function () { + if (this.get('controller.model.page')) { + return 'page'; + } + }.property('controller.model.page'), + openEditor: function () { this.get('controller').send('openEditor', this.get('controller.model')); // send action to handle transition to editor route }.on('doubleClick')