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 8ae1edffa5 Implements page class toggling.
- Toggles page class when post is marked as static/non-static
2014-06-16 17:08:58 +03:00

23 lines
680 B
JavaScript

import itemView from 'ghost/views/item-view';
var PostItemView = itemView.extend({
classNameBindings: ['isFeatured', 'isPage'],
isFeatured: function () {
if (this.get('controller.model.featured')) {
return 'featured';
}
}.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')
});
export default PostItemView;