LeitnerProgress.updateGraphLabels(); new ResizeSensor($('#boxChart'), function () { LeitnerProgress.updateGraphLabels(); }); }); /* * ############################################################################ * progress * ############################################################################ */ Template.progress.helpers({ isStatsOwner: function () { return Meteor.userId() === Router.current().params.user_id; }, gotProgressAccess: function () { return Meteor.userId() === Router.current().params.user_id || UserPermissions.isOwner(Cardsets.findOne({_id: Router.current().params._id}).owner) || UserPermissions.isAdmin(); } }); Template.progress.events({ "click #backButton": function () { if (Meteor.userId() === Router.current().params.user_id) { Router.go('cardsetdetailsid', { _id: Router.current().params._id }); } else { Router.go('cardsetstats', { _id: Router.current().params._id }); }
import { Template } from 'meteor/templating'; import { Scores } from '../api/scores.js'; import './progress.html'; Template.progress.helpers({ scores() { return Scores.find(); } });