1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/views/post-item-view.js
Fabian Becker 1eb90249fd Content screen: Featured posts
fixes #2748
- Properly handle marking post as featured/non-featured
- Show correct notifications
2014-06-16 09:32:40 +00:00

17 lines
516 B
JavaScript

import itemView from 'ghost/views/item-view';
var PostItemView = itemView.extend({
classNameBindings: ['isFeatured'],
isFeatured: function () {
if (this.get('controller.model.featured')) {
return 'featured';
}
}.property('controller.model.featured'),
openEditor: function () {
this.get('controller').send('openEditor', this.get('controller.model')); // send action to handle transition to editor route
}.on('doubleClick')
});
export default PostItemView;