Template.productList.helpers({
products: function() {
return Product.find();
})
Template.productList.helpers({
products: function() {
return Product.find(Session.get('filterStatus'));
})
Template.productList.events({
'click #allProducts': function() {
Session.set('filterStatus', {});
},
'click #filterStatus1': function() {
Session.set('filterStatus', {
status: 1
});
}
});
renderTasks: ->
this.getTasks().map(task) =>
<Task key={task._id} task={task}/>
@renderName = Routing.findOne({link: url}).name
ym() {
return (
"<script src='https://mc.yandex.ru/metrika/watch.js' type='text/javascript'></script>\
<script type='text/javascript'>\
try {\
var yaCounterXXXXX = new Ya.Metrika({\
id:XXXXX,\
clickmap:true,\
trackLinks:true,\
accurateTrackBounce:true,\
webvisor:true,\
trackHash:true\
});\
} catch(e) { }\
</script>"
);
},
<div dangerouslySetInnerHTML={{__html: this.ym()}}/>
Schema.User = new SimpleSchema({
role: {
type: String,
defaultValue: "editor",
}
});
{{#autoForm collection='Meteor.users' doc=currentUser type='update' id='accountForm'}}
{{> afQuickField name='profile'}}
<button type='submit' class="btn btn-primary">Save profile</button>
{{/autoForm}}