Vulcan/client/views/posts/post_item.js
2014-12-13 17:43:52 +09:00

23 lines
577 B
JavaScript

var post = {};
Template[getTemplate('post_item')].created = function () {
post = this.data;
};
Template[getTemplate('post_item')].helpers({
postModules: function () {
return postModules;
},
getTemplate: function () {
return getTemplate(this.template);
},
moduleContext: function () { // not used for now
var module = this;
module.templateClass = camelToDash(this.template) + ' ' + this.position + ' cell';
module.post = post;
return module;
},
moduleClass: function () {
return camelToDash(this.template) + ' post-module';
}
});