From 6deb206e845e4e1043ffc7625bf2615e75b66fec Mon Sep 17 00:00:00 2001 From: Fabian Becker Date: Mon, 16 Jun 2014 09:38:29 +0000 Subject: [PATCH] Implements page class toggling. - Toggles page class when post is marked as static/non-static --- ghost/admin/controllers/posts/post.js | 2 +- ghost/admin/templates/posts.hbs | 1 - ghost/admin/views/post-item-view.js | 8 +++++++- 3 files changed, 8 insertions(+), 3 deletions(-) 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}}